Skip to main content
Question

Error in getEmbeddedSigningUrl

  • April 15, 2026
  • 1 reply
  • 34 views

Forum|alt.badge.img

Can’t get past this in my APEX code: Method does not exist or incorrect signature: void getEmbeddedSigningUrl(Id, System.Url) from the type dfsle.SigningService.

More context:

 String returnRedirect = 'https://<someURL>/s/paperwork-complete';

 Url signingUrl = dfsle.SigningService.getEmbeddedSigningUrl(myEnvelope.id, new Url(returnRedirect));

 return signingUrl.toExternalForm();

1 reply

Forum|alt.badge.img+6

@CSol A working example is found below that you can try and use as a template. 
The class has a method to create the envelope and a secondary method that uses  SigningService.getEmbeddedSigningUrl. 

 

The signing link is logged in Salesforce debug logs and when opened, the signing session is shown. 
I’d try and use the below as an example. Additionally you’ll want to make sure you’re on a recent version of the managed package.

You’ll need to update variables to come from your own account such as the sourceID and the URL value. The URL in the below code is the URL of my Salesforce sandbox and would need to be updated to your own. 
If that does not work creating a case with the developer support team would be the suggested next step. 

 

public class EnvelopeRecipientView {
    public static void  CreateEnvelopeandGetRecipientURL(){
        Id mySourceId = '006ak00000HXlsnAAD'; // The ID of the initiating Salesforce object.
        // Create an empty envelope.
        dfsle.Envelope myEnvelope = dfsle.EnvelopeService.getEmptyEnvelope(
            new dfsle.Entity(mySourceId))
            .withRecipients(new List<dfsle.Recipient> {
                dfsle.Recipient.newEmbeddedSigner().withRole('RoleOne')
                    });
        //myTemplateId contains the DocuSign Id of the DocuSign Template
        dfsle.UUID myTemplateId = dfsle.UUID.parse('64a3e862-0b1b-4642-9d29-143739eac51a');
        
        //create a new document for the Envelope
        dfsle.Document myDocument = dfsle.Document.fromTemplate(
            myTemplateId, // templateId in dfsle.UUID format
            'myTemplate'); // name of the template
        
        //add document to the Envelope
        myEnvelope = myEnvelope.withDocuments(new List<dfsle.Document> { myDocument });

        
        
        // Send the envelope.
        myEnvelope = dfsle.EnvelopeService.sendEnvelope(
            myEnvelope, // The envelope to send
            true); // Send now?
        String envID = String.valueOf(myEnvelope.docuSignId);
        
        //call the future method to generate the signing link
        testCallout(envID);
        
        
    }
    
    
    @AuraEnabled
    @future(callout=true)
    public static void testCallout(String envID){
        system.debug('OUTPUT envelope ID'+ envID); 
        Url mySigningUrl = dfsle.SigningService.getEmbeddedSigningUrl(
            dfsle.UUID.parse(envID), // envId value as a UUID
            new URL('https://docusigntestaccount-dev-ed.develop.lightning.force.com') // url value as a URL
        );
        
        system.debug('OUTPUT The URL'+ mySigningUrl.toExternalForm()); 
    }
    
    
}