Skip to content

Instantly share code, notes, and snippets.

@jamesonwildwood
Last active August 29, 2015 14:15
Show Gist options
  • Save jamesonwildwood/4cf913108cc27db3eda6 to your computer and use it in GitHub Desktop.
Save jamesonwildwood/4cf913108cc27db3eda6 to your computer and use it in GitHub Desktop.
Example usage of the SFDC Create-Job usage.
<batch:step name="Batch_Step1">
<batch:commit size="1000" doc:name="Batch Commit">
<data-mapper:transform
config-ref="Pojo_To_List_Order_Line_Items__c__1Pojo_To_List_Order_Line_Items__c__2"
doc:name="Pojo To List&lt;Order_Line_Items__c&gt;"/>
<set-variable variableName="batchPayload" value="#[payload]" doc:name="Variable"/>
<sfdc:create-job config-ref="SalesforceOrderConfig"
operation="upsert" type="Order_Line_Items__c" doc:name="sfOrderJob"
externalIdFieldName="EXT_OrderShipToLine_Number__c" />
<set-variable variableName="job" value="#[payload]"
doc:name="Job Variable" />
<set-payload value="#[flowVars.batchPayload]" doc:name="Set Payload" />
<logger level="INFO" message="Upsert Lines job id: #[flowVars.job.id]"
doc:name="Lines JobId logger" />
<logger message="SFDC Order Lines Batch Incoming Payload: #[payload]"
level="DEBUG" doc:name="Order Line Batch Logger" />
<logger message="SFDC Order Lines Batch Starting:" level="INFO" doc:name="Order Line Batch Logger" />
<sfdc:create-batch config-ref="SalesforceOrderConfig" doc:name="sfOrderLineBatch" >
<sfdc:job-info ref="#[flowVars.job]" />
<sfdc:objects ref="#[payload]"/>
</sfdc:create-batch>
@jamesonwildwood
Copy link
Author

To use Relational fields in SFDC. In Datamapper, manually create an Element with the __r field, and then the related field as an attribute of that Element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment