Submit (download) a web browser url and run it in the background in APEX
Does Apex / Visualforce provide a URL that is stored as a string at the top and runs it in the web browser in the background.
Actually, this URL is returned from the Docusign RestAPI callout to place the envelope in a "patch" state. The envelope correction status is not activated until I manually paste the URL (link) into a web browser and run it.
Does anyone know how to run a URL programmatically in a web browser via Apex / Visualforce in the background?
(or) Is there anyway I can activate the "correction" status of the envelope in Docusign, other than triggering the URL in the web browser?
source to share
As I understand your question (s), the simple answer is NO / YES, but let me break it down:
- Execute string url from Apex - Yes - See pagereference
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_system_pagereference.htm
- Can the url run in the background? Yes, you can use the HTTP class
-
You can run the correct DocuSign URL in the background - NO, the returned URL requires the browser to render the UI as well.
-
Another way is YES through the DocuSign REST API you can fix the envelope if it hasn't been completed yet or the signer hasn't completed the signature action. Also, I have a lab I set up to demonstrate this on Amazon if you're interested in a step-by-step example of DocuSign correctness.
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_restful_http_http.htm#apex_classes_restful_http_http
The HTTP FEEDBACK PROGRAM over DS REST API is below for an existing envelope:
PUT /restapi/v2/accounts/437977/envelopes/ed3be3c1-be06-41c2-c68c-10ddccbd655e/recipients
Host: demo.docusign.net
X-DocuSign-Authentication: {"Username":"yourdsemailorID","Password":"yourpasswordorDSapipassword","IntegratorKey":"yourDSintegratorkey"}
Content-Type: application/json
Accept: application/json
{ "signers": [ { "recipientId": "1", "name": "David W. Grigsby (corrected)", "email": "youremail@yourdomain.com" } ] }
source to share