Skip to main content
Solved

Apex Toolkit : Completed Docs Title is not updated

  • February 27, 2025
  • 5 replies
  • 58 views

Forum|alt.badge.img+2

Hello, 

I have used the Apex Toolkit to define the writeback of my envelope.
The docs are correctly attached to the case and the status on the case is correctly updated.
However, the doc title is not updated as specified in the writeback. It retains the original name. I need to add ‘_completed’ to the initial title when it is signed. 
Anyone encountered this issue or has an idea how to resolve this? Thanks

Code Snippet : 

            myEnvelope.withOptions(new dfsle.Envelope.Options(

                false,

                new dfsle.Document.WriteBack(caseRecord.Id,  ‘Signed Contracts’, false, true),

                new Map<String, Map<String, Object>> {

                    dfsle.Envelope.STATUS_COMPLETED => new Map<String, Object> {

                        'Case.Status' => 'Docs received'

                    }

                },

                new Map<String, Map<String, Object>>()

            ));

Best answer by karan.kaushik

Hi ​@Darsh , according to our Apex Toolkit documentation referenced here, the nameFormat parameter takes in specific values. 

The naming format for the completed envelope documents. Refer to the dfsle.Document.WRITE_BACK_* constants for supported options.

So if you use WRITE_BACK_NAME_ENVELOPE_STATUS 

(or something similar, from our documentation) as the value there, that should writeback the name of the document along with the envelope status. Custom names are not supported at this time. 

View Original
Is this content helpful?

5 replies

karan.kaushik
Docusign Employee
Forum|alt.badge.img+3
  • Docusign Employee
  • 23 replies
  • Answer
  • March 2, 2025

Hi ​@Darsh , according to our Apex Toolkit documentation referenced here, the nameFormat parameter takes in specific values. 

The naming format for the completed envelope documents. Refer to the dfsle.Document.WRITE_BACK_* constants for supported options.

So if you use WRITE_BACK_NAME_ENVELOPE_STATUS 

(or something similar, from our documentation) as the value there, that should writeback the name of the document along with the envelope status. Custom names are not supported at this time. 


Forum|alt.badge.img+2
  • Author
  • New Voice
  • 5 replies
  • March 3, 2025

Hi ​@karan.kaushik ,
This constant worked correctly and I am able to get the documents back with the correct name. Thank you very much :)


Do you know where I can find the list of correct constants? On the link of Apex Toolkit, I can find the properties and methods. There is no link click on ‘dfsle.Document.WRITE_BACK_*’

 


karan.kaushik
Docusign Employee
Forum|alt.badge.img+3
  • Docusign Employee
  • 23 replies
  • March 3, 2025

I’m glad that worked! ​@Darsh 

The constants are on the same page, under the Properties section for “Document” 

 


Forum|alt.badge.img+2
  • Author
  • New Voice
  • 5 replies
  • March 5, 2025

@karan.kaushik Thank you very much. Found them 👍🏼

Is there a way using Apex Toolkit to :

  • block the recipient of the envelope to delegate it to another person for signature and
  • remove the option of ‘print’ and ‘download’ on the side bar
  • add reminders: Every week
  • add envelope expiration : 1 year please?

 

 


karan.kaushik
Docusign Employee
Forum|alt.badge.img+3
  • Docusign Employee
  • 23 replies
  • March 25, 2025

Hi ​@Darsh sorry for the late response

 

Add reminders and expiration: Yes - via the Envelope.Notification property: https://developers.docusign.com/docs/salesforce/apex-toolkit-reference/notifications.html

https://developers.docusign.com/docs/salesforce/apex-toolkit-reference/envelope.html

using the Envelope.withNotification() method.

It doesn’t appear there is a way to do the other two things via the Apex Toolkit.


Reply