Available in: Axsy Smart Forms
Smart Form Design Best Practices
Recommended Design and Implementation Method
Smart Form design and implementation is most efficiently carried out as an iterative process using the Axsy Smart Form Designer in conjunction with the Axsy mobile app. To do so:
- When you are creating a new Smart Form, do not click the Publish button until you have finished your design and are ready to move over to Smart Form deployment, by not publishing your Smart Form you will always be working with a draft of your Smart Form.
- Make small changes in your Smart Form, especially if you are trying something new, for example mapping to a new object. Make sure you click Save after each change you make.
- In your Axsy mobile app, navigate to Advanced Settings and enable Form Reload.
- Open your partially designed Smart Form in your mobile app, you will notice the presence of a reload icon in the top right hand corner.
- Each time you make a change (and save it) in the Smart Form designer you can tap the reload icon in the mobile app to reload the draft of your Smart Form without the need to logout of the mobile app to check your progress. You must be online for this facility to work.
- If you see an error on reload then you must investigate it right away, the error is very likely due to the most recent change you made in the Smart Form designer.
- If you do click Publish on your saved Smart Form before you have completed your design work then Form Reload will not work as the most recent published version will always be used and not the draft version. You can delete versions if you wish so you are only left with the draft copy of your Smart Form which will re-enable the reload capability. If you wish to keep your version(s) then you must logout / login to access the most recent saved version.
Mapping With Multiple Objects
When designing a Smart Form that will have mappings with multiple objects it is important to bear in mind the following design considerations:
- Which object should the Smart Form launch off? This defines the running record where all Smart Form mappings start from
- Do all the objects have defined object-to-object relationships setup in the Salesforce platform stemming from the running record? If not:
- You should either construct the relationships you need; or
- Consider making separate Smart Forms that address the objects separately if they have no defined relationships.
- If you use mappings in Sections and Sub-sections you can only map up the object hierarchy via many-to-one relationships
- Remember that you can only address a single record when mapping up the object tree, if you change that record then the data action will be Upsert which you cannot change
- Although you are restricted in the changes you can make, having access to object fields up the object hierarchy is very useful for reference purposes and you can show the mapped content in read only elements so users can view this information. For example showing read only parent Work Order records for a Work Order Line Item
- Repeating Sections and Loops allow you to specify data actions (Create / Upsert / Update) and should be used when making or modifying new records
- If you use mappings in Repeating Sections and Loops you can only map down the object hierarchy via one-to-many relationships
- Use Repeating Sections or Loops to create or update multiple records, but you should only use either a Repeating Section or a Loop to create or update records but not both, or you may have errors when syncing back to Salesforce later (see points 8 and 9 below)
- As Repeating Sections and Loops will show any existing records first to you in the Axsy mobile apps before they allow for new records to be created. Making use of the Upsert data action is very useful at this allows you to modify existing and create new records with this single data action.
- You do not have to specify mappings in Repeating Sections, Sections and Sub-sections and you can use these elements as simple containers to conveniently group data input elements together to improve navigation and readability
- Ensure your sync config includes all of the object records you have included in your Smart Form design
- If you design a Smart Form that traverses more than one object either up or down the object hierarchy you need to be very careful making simultaneous record creates or updates and you may see error messages when you come to sync your Smart Form for various reasons:
- Depending on the order Salesforce applies your sync updates you may create an orphan record if the parent has not been first created which may cause errors
- You may have validation rules that expect the logical creation of records to take place
- If your Smart Form needs to support record creation or record updates in a parent-child-grandchild relationship, run the Smart Form twice, once for the parent-child then a second time for the child-grandchild with an online sync to Salesforce between the two Smart Forms, this ensures records are present on the Salesforce platform in the expected order.