Salesforce is trying to create or edit a record as requested but has encountered a problem.
An Error 00004 with this message "System.NullPointerException Attempt to dereference a null object" is often due to a completed job in the device trying to create / update a record but that record cannot be found. Either the name of the record you have entered is incorrect or the record has already been deleted or changed in salesforce.
Another cause of this issue could be if your system was recently upgraded to TaroWorks 4.3.X and the administrator did not complete all of the steps. If this is the case, please contact your administrator that conducted the upgrade and confirm that articles 02 and 03 were completed.
To debug this issue:
- In your device, there would be completed job(s) that stayed after pressing sync. Find them. (Access by pressing Jobs, looking for a red circle with a number in it, then pressing that job, then "Saved Job" then "Completed Job".)
- Look at the answers by pressing on the task. You will be taken back into that survey.
- Look for questions that you have mapped to Id Fields - it is helpful to have the published survey open on the field mapping page. Check your answers to these questions, and make sure the record you are trying to edit / lookup to exists.
Often you will discover one of three things:
- The Mobile User has mistyped the Id Field of the record, and so it cannot be found by Salesforce. Make the change in the completed job on the device. See this video on Editing and Deleting Jobs.
- The back office user has deleted the record. This is usually problematic, you can undelete the record in Salesforce (please consult salesforce.com documentation on "Recycle Bin")
- The back office user has renamed the record. You should rename the record back and then try syncing again.
If you are unable to resolve this, or if the completed job on the device does not have any valuable data, you may wish to delete that job instead. See this video on Editing and Deleting Jobs.
- Avoid deleting or renaming records in Salesforce unless necessary.
- Mobile users should check the answer before saving a job and syncing.
- Prefill questions using the information from the Hierarchy Drill Down as you build your job.