Insert automatically customer data
I would like insert automatically customer data in another table without having the user fill them in. The data is same, selectd in a lookup table. It's possible? Thank you
Looks like you want a new record created in Robot installation after a user selects the Customer.
Like any script that I'm creating that I want to put in a trigger, I first do it in a button. In the Activity table, you can try the following:
let curRec := this; let newRec := create 'Robot installation' newRec.(Activity := curRec; Customer := curRec.Customer)
Line 1 gathers the data of the current record and puts it in a variable called curRec.
Line 2 creates a new record in the 'Robot installation' table and puts it in the variable newRec. We put it in a variable because we need to do some changes to that new record.
Line 3 and 4, are lines that modify the newly created record to link it to the the current record in Activity and the customer selected in the current record. You can add more lines to this if there are more fields you want modified.
If that works like you want then you can copy the code into the Trigger after update of the Customer field on the Activity table.
- 11 mths agoLast active
- 2 Following