*This post is locked for comments
*This post is locked for comments
Hi Sandeep,
1. Make sure you are putting the correct field schema name.
For Example: If you are getting option set length
var length=Xrm.Page.getAttribute("field Name").getOptions().length;
and the field schema name is incorrect, this error will appear.
2. Check the null or empty before play with the object. For Example:
var obj = Xrm.Page.getAttribute("provide fieldSchemaName here");
if (obj != null) {
{
//then get the length
}
3. Before using .length property, check whether the variable is null/undefined/or some other falsy value. If Yes then assign length 0 else calculate the length. Eg :
var reference, // ref is undefined
refLength;
if(reference) {
refLength = reference.length;
}
else {
refLength = 0;
}
If my answer helped to resolve your issue, kindly verify it by clicking 'Yes'. It would be helpful to the other community members seeking to resolve a similar issue.
Cheers
Arpit
https://arpitmscrmhunt.blogspot.in
Hi,
Please check the web resources (JavaScript files) used in opportunity form.
Find out the js statement uses length.
Thanks
Hi ,
Seems the object getting null in your web resource and thats why length property is not identifying . So you need to check null like below. Go to the web resource which causing error check find where you have use length property.
if(obj != null)
{
// obj.length
}
André Arnaud de Cal...
292,516
Super User 2025 Season 1
Martin Dráb
231,387
Most Valuable Professional
nmaenpaa
101,156