Skip to main content

Sample Code to Create Service Document Automatically

Dear Customers

 

I am thrilled to share the sample code using Apex Trigger to listen on DocumentRecipent entity to automatically create a service document.

 

The Apex Trigger Sample Code

https://github.com/forcedotcom/LWC-Mobile-Samples/blob/main/projects/ServiceDocumentSamples/force-app/main/default/triggers/ServiceDocumentCreation.trigger

 

The sample method to invoke the invocable create service document action.

https://github.com/forcedotcom/LWC-Mobile-Samples/blob/main/projects/ServiceDocumentSamples/force-app/main/default/classes/FireCreateServiceDocumentInvocableAction.cls#L24

 

#Document Generation 

1 comment
  1. Jan 28, 2024, 9:47 PM

    @Daniel Zheng good to know :)

    Just to understand the use case: the signature collection is the trigger for service document creation, right? But the signatures are not collected using the mobile app in this scenario (as otherwise the Generate button could simply be used), or are they? Thx!

0/9000