Invalid cast exception in CRM plugin
If you have any doubt in the post please post comments. I will try to solve your problem.
In plugin if it throws invalid cast exception then you have to check what are the values assigned to the entity is miss match. The input attributes please check..
1)Entityreference --Proper entity reference with logical entity,name and id.
2)Optionset -- have to pass value(unique no) not name
3)Check box --have to pass as true and false
One more way to solve the issue, If you update the entity then get the data using query expression, in which pass attribute name that you are going to give input then check what values are come from the entity and compare with your existing code.
If you have any doubt in the post please post comments. I will try to solve your problem.
In plugin if it throws invalid cast exception then you have to check what are the values assigned to the entity is miss match. The input attributes please check..
1)Entityreference --Proper entity reference with logical entity,name and id.
2)Optionset -- have to pass value(unique no) not name
3)Check box --have to pass as true and false
One more way to solve the issue, If you update the entity then get the data using query expression, in which pass attribute name that you are going to give input then check what values are come from the entity and compare with your existing code.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.