In versions prior to TaroWorks 4.9, in order for a record to appear in a Job's drill-down hierarchy, it needed to first exist in Salesforce. For some field processes, you may want to create a record and then take that record through an unknown number of steps in your process. For example, let's say the mobile user has the following process:
- Create an Account
- Create a Contact related to the Account from (1)
- Update the Contact (3)
For some interactions, the mobile user may only do step 1, then do steps 2 and 3 next week. Or do steps 1 and 2 today and then step 3 next week. I want these different process steps to be distinct Jobs so I can choose to do a singular step of the process at anytime and sync that step into Salesforce. However, if I want to do steps 1-3 all while being offline, these Jobs are going to need to talk to each other. I'd like to be able to choose the Account created offline in step 1, in order to use it for step 2, without have to sync that account into Salesforce. This article will show you how to do just that! The following steps will demonstrate how to make record created in a particular Job available to other Jobs without syncing.
- A. Create a field to hold offline ID - create a text field on the object where you'd like to make offline records available in TaroWorks.
- B. Map the offline ID in Form - doing an upsert using a unique identifier will always result in record creation (as if the ID field was blank).
- C. Feature Notes - More information about using this feature.
Before you Begin:
- Ensure you have TaroWorks version 4.9 or higher installed on both Salesforce and your mobile device.
- Click Setup in the upper right.
- Open the object for which you'd like newly created records to be shared in TaroWorks Jobs.
- Go to Field & Relationships and click New.
- Choose Text.
- Click Next.
- Enter a Field Label and Description.
- Enter a Length of 255.
- Mark the field as an External ID.
- Click Next.
- Click Visible (or minimally the profile for your TaroWorks mobile users require access).
- Click Next.
- To remove this field from your page layouts, uncheck Add Field.
- In TaroWorks, click on the Forms Tab.
- To edit a form that creates records in the object we used in A., click on the pencil icon next to the form.
- Click OK.
- Click on the tab Question Builder.
- Add a Free Text question.
- Enter a Caption.
- Check Required.
- Check Hidden.
- Select Calculation.
tw.account.account_offline_id.value = tw.generateTWOfflineID();
- In the last line, "tw.account.account_offline_id.value", replace "account" with the name of the section this question is in.
- Also in the last line, "tw.account.account_offline_id.value", replace "account_offline_id" with the Question name of the question you're editing.
- Click Save.
- Click on the Field Mapping tab.
- Map the field you created in A. to the Free Text question we just created.
- Select your offline ID field as your Id Field for the object you'd like newly created record to made available to other Jobs. Note: you are only using this offline ID on Forms where you are creating records you'd like to be made available offline. For subsequent Jobs that references these offline records, you'd leave your existing auto-number field to uniquely represent records in Salesforce.
- Click Save.
- Click the Forms tab.
- Publish your changes to the by clicking the green play button.
A few notes to highlight when using Offline Jobs Integration:
- If a users uses contextual menu to Go to End of Form, skipping over the hidden Dynamic Operation calculation with our offline ID generating function, user will receive an error that a required field is blank.
- To create a local record (a record created in TaroWorks that is not in Salesforce), you must mark the Task creating that record Complete.
- Once a local record has been referenced by another Job, the saved Job that created the record cannot be deleted or edited. To delete or edit the original record, you'd have to first delete the referring Jobs.
- You CANNOT pass data in between tasks. Record creation offline is done at job level.
- For the local record, any field that would be populated by Salesforce (formula fields, rollup summaries, auto-numbers), would not be available offline. Validate that your Jobs drill-down hierarchy filters have the desired behavior for your process if formula fields are in use.
- In a future release, the object field and form question will be necessary to use this feature.
If you're experiencing any challenges please email firstname.lastname@example.org.