i need to create a new contentDocumentLink record, which will give access to custom object. but i am not able to get the contentDocumentId once i uploaded in any action sequence. if i query contentdocumentlink with entitylinkid it returns all records to that entity. i want the latest contentdocumentId. Thanks in adavance
Hi Prasanna,
On the model (ContentDocumentLink object) set the “Fields to order records by” property to “SystemModstamp DESC” to get the latest file. NOTE: Make sure the “SystemModstamp” field is in your model. If only one record needed set the “Max # of records (Limit)” to 1.
Let me know if this is NOT what you are looking to accomplish.
Thanks,
Matt
Thanks Matt, perfect solution but what if 100 users are working on the same entity almost same time,
is this solution feasible? i think there is a probability of getting some other documentid. i am doing file upload -> file storage location = in content document (with record context), i want the way that returns document id in on-upload actions -> on-upload success actions
once again thanks for your reply.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.