CRMScript Link Appointment to Document in the BeforeSaveDocument Trigger

Hi again,

In the BeforeSaveDocument Trigger we are creating an Activity that the customer would like linked to the Document (as per their previous VBScript)

Is this possible?

I see that the DocumentEntity as a Links property but how would I add a link before the Entity has been saved?

Cheers James

Hi James,

Before events will not have an ID yet, i.e. No DocumentId, and you need it to complete the link. This will have to be in the AfterSaveDocument trigger.

When adding a Link to the List array. only fill in the Link EntityName - in this case is "document" (without quotes), and the Link Id is the document ID.

Hope this helps.

Av: Tony Yates 19. sep 2019

Hi Tony,

thanks for the reply - I didn't think i could do it, but thought that I would ask before adding StateValues and passing them between the DocumentBeforeSave and the DocumentAfterSave

Cheers James

Av: James Carter 20. sep 2019