Introduction:
There are some common mistakes which we do while scripting which forms an error on Dynamics CRM mobile forms. For instance, while adding ribbon buttons on the form there are possibilities of mistakes made by us which does not form an error on Web form but we can get an error on Mobile form.
In this blog we will see some common errors that we may get on Dynamics CRM mobile app forms and will see the possible cause of these errors and solution for the same based on our observations.
1. There was an error with this field’s customized event.
Error: scope[scopeSplit[scopeSplit.length – 1]].apply is not a function.
You may see this error when you open any entity record through Dynamics CRM mobile app. Below screen shot shows the error. From the error details, it becomes very difficult to understand the error.
If you open same record from web you will not see this error.
Cause:
It is possible that you have defined incorrect function name for example NaN while adding action on command of the ribbon button for common java script library which you want to use as a reference( like JQuery, Json, XrmServiceToolkit etc.).
This error still occurs even if your button is not visible on that form. Since you have added a reference of script web resource on ribbon, when form loads this reference gets executed and due to incorrect function name, an error gets prompted.
Solution:
Make sure you have added correct function name for these libraries. We should add isNaN as a function name while adding reference scripts like jquery, json, XrmServiceToolkit as an action.2. Also it might be possible that you will get an error because of syntactical mistakes done in java script code.
Error: There was an error with this field’s customized event.
Error: Script Error
Sometimes we face an issue on mobile saying Script Error. This issue was not there on Web still we face this on mobile as shown in below screenshot.
Cause:
It might be possible that you have added script web resources on Dynamics CRM forms and while coding you have done minor mistakes. Some syntax related mistakes might not cause any issue on web but they can cause an issue on Dynamics CRM mobile app (Mobile Forms).
Solution:
Make sure that you have not done any mistake while doing code. This mistake could be function not ended with “;”, addition of an extra “,” in an array, etc. Also make sure that you are doing all possible null/undefined value checking.
So basically, you have to review all scripts that you have added on your Dynamics CRM forms and need to make sure that code does not contain any syntax errors.
Conclusion:
If you are facing any errors on Dynamics CRM mobile forms, it is recommended to review ribbon customization, Dynamics CRM forms, and javascript web resources to check if there is any mistakes in the code.
Access Maps from within Dynamics CRM mobile App…..Now possible.
One Pic = 1000 words! Analyze data 90% faster with visualization apps!
Get optimum visualization of Dynamics 365 CRM data with –
Kanban Board – Visualize Dynamics 365 CRM data in Kanban view by categorizing entity records in lanes and rows as per their status, priority, etc.
Map My Relationships – Map My Relationships – Visualize connections and relationships between Dynamics 365 CRM entities or related records in a Mind Map view.