Thursday, September 22, 2011

'Xrm.Page.data.entity.attribute.get(...)' is null or not am object

sometimes if you will get error like 'Xrm.Page.data.entity.attribute.get(...)' is null or not am object
make sure the following things...
1. you have the attribute name in th form
2. make sure the spelling is correct
3. make sure its not case sensitive as "CaseType" is not same as "casetype"
4. also make sure that there no space at the end "casetype " is not same as "casetype"
 i faced this minor issue.
hope this will help someone to figure it out...

in MS CRM 2011 we have two things if we will create an attribute
1. Display Name
2. Name
 but in the fields list you will find three things as follows
1. Name
2. Schema Name (Extra)
3. Display Name

The Difference between the Name and Schema Name is as follows
### If you have given the Field Dispaly Name as "Test" then the Name will display as "new_Test".
So your things will as follows after you saved it
1. Name : new_test
2. Schema Name (Extra) : new_Test
3. Display Name : Test
### If you have given the Field Dispaly Name as "Test" then the Name will display as "new_Test", but u changed it to "new_test", then
So your things will as follows after you saved it
1. Name : new_test
2. Schema Name (Extra) : new_test
3. Display Name : Test
Okei now one more catch, related to the Entity Name scenario
If i use "mcys_Name" in my Query for entity "mcys_aptype", i get an exception as image
So its highlighting the entity as "mcys_APType".

then if  i use the enity name as "mcys_APType" in the query i got the exception as image
so it highlights the entity was not found

thanks,
yes.sudhanshu

No comments:

Post a Comment