Object with document field referencing latest version
AnsweredHello.
I have an Object with a Document Reference field where the Document Version Reference is set to "Latest Version".
I have to interrogate the selected document in a BEFORE INSERT trigger, but the value of the field is null:
I know getting/setting the unbound field is not supported.
How can I get the ID of the selected document in a BEFORE INSERT trigger? The reference type must be Latest Version.
Thank you.
Steve Lisowski, Stemline Vault Support Team
-
Official comment
Hi Steve,
You cannot use recordChange.getNew().getValue() to retrieve that document ID in a BEFORE_INSERT event. You would either need to query the documents to retrieve that ID, or execute your logic in an AFTER_INSERT event.
https://developer.veevavault.com/sdk/#system-populated-fields
Please sign in to leave a comment.
Comments
1 comment