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?
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!
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?