Notifications
Announcements
No record found.
dear all
i am trying to learn JS for Dynamics, but i am facing a serious issue with understanding the returned error log.
anyone can tell what /how i can understand this text :
displayName@win-agqoeadqke1/.../new_displayNameUsingformContext@win-agqoeadqke1/.../ClientApiWrapper.aspx line 157 > eval:1:1RunHandlerInternal@win-agqoeadqke1/.../ClientApiWrapper.aspxRunHandlers@win-agqoeadqke1/.../ClientApiWrapper.aspxExecuteHandler@win-agqoeadqke1/.../ClientApiWrapper.aspx$Cb_1@win-agqoeadqke1/.../formcontrols.jsexecuteHandler@win-agqoeadqke1/.../formcontrols.jsexecuteHandlerByDescriptor@win-agqoeadqke1/.../formcontrols.jsgetHandler/<@win-agqoeadqke1/.../formcontrols.jsgetHandler/<@win-agqoeadqke1/.../global.ashx$Dd_1@win-agqoeadqke1/.../formcontrols.js$LI_1@win-agqoeadqke1/.../formcontrols.jssaveInternal@win-agqoeadqke1/.../formcontrols.jssave@win-agqoeadqke1/.../formcontrols.jssave@win-agqoeadqke1/.../formcontrols.js$J5_5@win-agqoeadqke1/.../formcontrols.jsFunction.createDelegate/<@win-agqoeadqke1/.../MicrosoftAjax.jsb@win-agqoeadqke1/.../MicrosoftAjax.js
thanks,
*This post is locked for comments
Hello,
It seems that you have new_displayNameUsingformContext webresource and it contains an error. Can you post it here please?
thanks Andrew, i know i have an error in the sample web resource, my point is how to know (myself) in which line/block/keyword is the error, i cant keep asking people to debug my code :(
thanks anyway.
Wow. No WOW. You're a great exception because people usually drop the code here and do not want to find an answer themselves.
Here is a good article that describes troubleshooting of JavaScript - blogs.msdn.microsoft.com/.../debugging-custom-javascript-code-in-crm-using-browser-developer-tools
Hi Ahmad,
When you can see some system JS file name in the error you can say the error is related to the format of your JavaScript wbresource which is unable to build the page.
So to debug this I would suggest always write JavaScript code inside Visual Studio and press ctrl+ k+ D same time so that you can find any syntax issue will be highlighted there.
Once done write the debugger; in the function
and debug your code find which line causes the error.
Take a look below article.
m.youtube.com/watch
thanks a lot.
thanks a lot Andrew
thanks Andrew, but is there anyway were i can test my JS code without uploading it as a webresource everytime? is there any kind of simulator?
one more thing Mr. Goutam
below is a JS that is validated using visual studio, but still failing with "JS filename in the error" , can you please help.
function create_new_account() {
var data =
{
"name": "Sample Account",
"creditonhold": false,
"address1_latitude": 47.639583,
"description": "This is the description of the sample account",
"revenue": 5000000,
"accountcategorycode": 1
}
// create account record
Xrm.WebApi.createRecord("account", data).then(
function success(result) {
console.log("Account created with ID: " + result.id);
// perform operations on record creation
},
function (error) {
console.log(error.message);
// handle error conditions
);
error :
_______________________
create_new_account@win-agqoeadqke1/.../new_create_sample_account
@win-agqoeadqke1/.../ClientApiWrapper.aspx line 157 > eval:1:1
RunHandlerInternal@win-agqoeadqke1/.../ClientApiWrapper.aspx
RunHandlers@win-agqoeadqke1/.../ClientApiWrapper.aspx
ExecuteHandler@win-agqoeadqke1/.../ClientApiWrapper.aspx
$Cb_1@win-agqoeadqke1/.../formcontrols.js
executeHandler@win-agqoeadqke1/.../formcontrols.js
executeHandlerByDescriptor@win-agqoeadqke1/.../formcontrols.js
getHandler/<@win-agqoeadqke1/.../formcontrols.js
getHandler/<@win-agqoeadqke1/.../global.ashx
$Dd_1@win-agqoeadqke1/.../formcontrols.js
$LI_1@win-agqoeadqke1/.../formcontrols.js
saveInternal@win-agqoeadqke1/.../formcontrols.js
save@win-agqoeadqke1/.../formcontrols.js
Mscrm.CommandBarActions.saveForm@win-agqoeadqke1/.../commandbaractions.js
Mscrm.RibbonActions.saveForm@win-agqoeadqke1/.../ribbonactions.js
Mscrm.Utilities.executeJavascriptFunction@win-agqoeadqke1/.../global.ashx
$Cf_1@win-agqoeadqke1/.../ribbon.js
$Ag_1@win-agqoeadqke1/.../ribbon.js
handleCommand@win-agqoeadqke1/.../ribbon.js
executeCommand@win-agqoeadqke1/.../ribbon.js
click@win-agqoeadqke1/.../ribbon.js
onClickHandler@win-agqoeadqke1/.../ribbon.js
Function.createDelegate/<@win-agqoeadqke1/.../MicrosoftAjax.js
b@win-agqoeadqke1/.../MicrosoftAjax.js
Download the visual studio developer extension where you just need to connect Dynamics CRM solution , Map the JS to your local VS solution and right click , publish JS web resource.
github.com/.../CRMDeveloperExtensions
thanks Goutam
i am new to these extension, anyway, i did download the file but i cant compile it, any idea?
also , if you can share any compiled version of this app and some documentation of how to use it.
regards.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2