The error message indicates that Dynamics 365 is trying to execute a JavaScript function named test from the web resource awr_requestjs, but the function does not exist in the script. Here’s a step-by-step approach to troubleshoot and resolve the issue:
1. Verify the Web Resource
Open the Dynamics 365 instance and navigate to Settings > Customizations > Customize the System.
Under Web Resources, locate awr_requestjs.
Open the script and check if a function named test is defined in the file.
2. Update the Form Script
Go to the entity where the script is attached (e.g., Account, Contact, etc.).
Open the Form Editor for the specific form.
Under Form Properties, check the Event Handlers for the OnSave event.
Ensure that the function name specified matches an existing function in the awr_requestjs script.
3. Correct the Function Reference
If the function name is incorrect or missing in the script:
Open the awr_requestjs web resource.
Add or rename the function to test (if it matches the intended functionality).
If the test function is unnecessary, update the event handler to reference the correct function name or remove the handler.
4. Save and Publish
After making changes, save the script and publish all customizations.
Test the form by triggering the OnSave event to ensure the error is resolved.
5. Debugging Tips
Use the Browser Developer Tools (F12) to check the JavaScript console for additional error details.
Download the log file as suggested in the error message for further insights.
Add debugging logs (console.log) or alerts in the script to confirm if it’s executing as expected.