Custom DocGen Button

  • 8 May 2019
  • 1 reply
  • 108 views

I'm creating a custom button and running into some issues.  When users click the button, it should automatically run a few different docgen packages.  It should run 2 packages and also run 2 other packages if certain conditions are met.  On my custom object, I have it setup so the required conditions are met for the 2 additional packages, but when I click the button I only get 1 package to run and that package is one of the conditional packages.

 

Below is my code:

/apex/loop__looplus?&eid={!Client_Checklist__c.Id}&accountId={!Client_Checklist__c.CompanyId__c}&autorun=true&ddpIds=a0jK0000003k9ucIAA%2Ca0jK0000003kF1PIAU,{!IF(Client_Checklist__c.sdocs_web_indicator__c=TRUE, "a0jK0000003k9svIAA", "")},
{!IF(ISPICKVAL(Client_Checklist__c.CBP_Checklist_Status__c, "Complete"), "a0jK0000003sRqCIAU", "")}

 

The only package I get to run is the last one that is dependent on the checklist status picklist equal to complete.  Any thoughts on how to get the others to work?


1 reply

Userlevel 2
Badge +4

Hi Jen,

 

Are you attempting to run two packages simultaenously? Unfortunately using our standard looplus interface, you're only able to run one package at a time. The ddpIds parameter allows your users to see a specific list of pacakges on the interface, and since you are using an autorun=true parameter, this will choose a package (the last one), and run that package automatically. You can alternatively create a button that opens several windows (however many packages you ultimately need to generate), and run one on each page. If your users would need to download, or interact with the final output, they would just need to navigate to each tab, and complete the process there. 

 

Alternatively, if you are comfortable with Apex, we do also have a programmatic way for you to generate several documents simultaenously with the Process DDP Component. You can access the documentation here:

https://help.nintex.com/en-US/docgen/docservices/#docgen-sfdc/Services/apex/T_ProcessDdpParameters.htm%3FTocPath%3DExtend%2520the%2520platform%7CApex%2520for%2520Nintex%2520Drawloop%2520DocGen%25C2%25AE%2520for%2520Salesforce%2520%7CLoop%2520namespace%7CProcessDdpParameters%2520class%7C_____0

Reply