Help

Re: Bulk Insert of Linked Records

1141 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Jeremy_Taylor
6 - Interface Innovator
6 - Interface Innovator

I have 2 tables (Part Processes Table and Jobs Processes Table). The Part Processes Table contains all the operations for making a part. Every time a new purchase order comes in a job is created and linked to a particular part. I would like to create a script that grabs the linked records in the Part Processes Table and inserts them into the Jobs Processes Table every time a new job is created. Can anyone provide me with an example of something similar that I can modify for my purposes?

4 Replies 4
Stephen_Suen
Community Manager
Community Manager

Hey @Jeremy_Taylor:

You should be able to repurpose the Record template example for your use case. The main modification you would need to make is to fetch the template records from your Part Processes Table instead of hardcoding them in the script.

Let me know if this makes sense!

Hey @Stephen_Suen

Yes, That makes sense. What syntax do I use to fetch those records?

Hi @Jeremy_Taylor

You can fetch records with table.selectRecordsAsync(). This returns a RecordQueryResult with the a list of all the records (queryResult.records), as well as a function for fetching a single record by ID (queryResult.getRecord()).

hello how can i use this?