Hi,
I have a plugin registered against a custom entity in CRM to set the stageid of an incident via the regarding Entity . This is done using this snippet of code(I have stripped out the code for "Some ID").
regardingEntity.Attributes.Add( "stageid", "Some ID"); service.Update(regardingEntity);
I have profiled the code and the parameters I am passing in to the Arributes.Add() are correct. I have also changed the field I am updating on the regarding entity to a simple text field to ensure that the plugin code has access to the regarding entity and all seems to work ok. It appears that something else is happening behind the scenes in CRM and all I am getting back from the exception logs is this generic error code
-2147220956 "An unexpected error occurred from ISV code"
I was wondering if anyone has any insight into what this error code could mean. I have ruled out a number of potential problems around Security roles, Owning Users of the entities etc..
Regards,
*This post is locked for comments
If you have process entities there, you might just want to set stage id differently:
Hi Colm,
Can you check if you have any other process, business rule [Entity], plugins etc which could trigger after this plugin?
There is a possibility that the error is occuring from some other place. Best way is to enable/ disable and see where it starts working.
Hope this helps.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156