Apex Data Relationships
Use Apex Data Relationships to use your own code to collect and process data before adding it to your DocGen Package. Nintex provides a programming interface for creating Apex Data relationships.
Nintex provides samples to help you get started with developing Apex Data relationships. Get the code here. You can use the developer console to implement the SampleDrawloopApexData1SFObject Apex class in Salesforce to create an Apex Data relationship in a DocGen Package.
Create an Apex Data Class
- Log into your Salesforce and open the Developer Console.
- From the Developer Console, create a new Apex class named SampleDrawloopApexData1SFObject.
-
Paste the contents of the sample file (SampleDrawloopApexData - 1 Sf Object.java) into the Developer Console, which overwrites the existing contents.
-
Save the new Apex class.
- Close the Developer Console.
Create an Apex Data Relationship from a new DocGen Package
- Navigate to the App Launcher by selecting the
in the upper left corner, select Nintex DocGen.
- Select the DocGen Packages tab.
- Click New.
- Type in the DocGen Package details and select your Starting Object.
- Click Save.
- From the Relationships window, under Add Relationships, click Apex Data.
- Select the Apex Class you want to use for your Apex Data Relationship.
- Select the Object you want to create an Apex Data Relationship with.
-
This field is optional. In Alias, type in a short name or keyword that will differentiate a relationship to identify the tags from that relationship in the Field Tagger.
- From the Relationships section, you can edit the Repeat By field to:
Nintex DocGen will automatically add in the Starting Object and any child relationships it's associated with the object in the Relationships section. The starting object can't be edited unless a different object is selected.
For our example, we'll use SampleDrawloopApexData1SFObject.
- Click Save.
Create an Apex Data Relationship from an existing DocGen Package
- Navigate to the App Launcher by selecting the
in the upper left corner, select Nintex DocGen.
- Select the DocGen Packages tab.
- Select and open the DocGen Package you want to work with.
- From the Data tab, access the Relationships window.
- In the Add Relationship section of the window, select Apex Data.
- Select the Apex Class you want to use for your Apex Data Relationship.
- Select the Object you want to create an Apex Data Relationship with.
- This field is optional. In Alias, type in a short name or keyword that will differentiate a relationship to identify the tags from that relationship in the Field Tagger.
- From the Relationships section, you can edit the Repeat By field to:
For our example, we'll use SampleDrawloopApexData1SFObject.
- Click Save.