Hello! I want for user A to set an answer to a transaction, for example a confirmation of delivery, so within user A's own record of the transaction I want to change a single selection field in order to trigger a Record Extension Point that changes both the fields in the user A record and in user B so it changes the status from Pending to Delivered for example.
This also triggers a transaction for user B to get the payment from the Escrow wallet, which works fine, but I need to automatically change the appropiate fields in B's record so it can see the payment has been done.
However despite all of my attempts, I cannot seem to find user B's records in the record EP, and thus I cannot change them. Is there a way to make this work?
Editing another user's records in a record extension point
Moderators: alexandre, hugo, rmvanarkel
Editing another user's records in a record extension point
- Attachments
-
- 2- Escrow record seller.png (63.2 KiB) Viewed 85744 times
-
- 1- Escrow record buyer.png (87.22 KiB) Viewed 85744 times
-
jakob.schumann
- Posts: 63
- Joined: Thu Apr 23, 2020 5:37 pm
Re: Editing another user's records in a record extension point
Hello Eddomin,
could you post (the relevant parts of) your EP script?
If you are using the "record extension point" you have to traverse the reference graph yourself: from the "record" script binding over the "seller" field and the shared webshop order number, that is equal for the "Sale" and "Purchase" records that belong together, to that "Sale record". Then updating this should produce no complications.
For finding a record you have to first find the recordType and with that query for the record itself:
Best regards,
Jakob
could you post (the relevant parts of) your EP script?
If you are using the "record extension point" you have to traverse the reference graph yourself: from the "record" script binding over the "seller" field and the shared webshop order number, that is equal for the "Sale" and "Purchase" records that belong together, to that "Sale record". Then updating this should produce no complications.
For finding a record you have to first find the recordType and with that query for the record itself:
Code: Select all
var rType = entityManagerHandler.find(UserRecordType, "saleRecordTypeInternalName")
// or use QUserRecord to search more specifically, including the order ID
var records = recordService.listUser(rType, seller)
Jakob