deepakkumar1984 / XrmToolBoxPlugins

Tools for Dynamics CRM
MIT License
33 stars 36 forks source link

Recycle Bin exception: Unable to cast object #2

Closed jklosinski closed 7 years ago

jklosinski commented 7 years ago

The Recycle Bin plugin worked great for most of the entities I tried it on, but when I try it on our contact entity, I get the following exception:

System.InvalidCastException: Unable to cast object of type 'Microsoft.Crm.Sdk.Messages.AuditDetail' to type 'Microsoft.Crm.Sdk.Messages.AttributeAuditDetail'. at BDK.XrmToolBox.RecycleBin.PluginControl.b__11_0(BackgroundWorker w, DoWorkEventArgs ev) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

I get it after choosing the entity, specifying a date range, and then clicking Show Deleted. Possibly relevant is that we relabeled our contact entity to another name. Is there anything I can do to work around the error?

Thanks, Jeff

deepakkumar1984 commented 7 years ago

Hello Jeff,

Thanks for pointing it out. Renaming the Display Name shouldn't make any difference since the schema name will remain the same. Seems like it's another issue which I will try to reproduce, probably some missing null checks. I will publish with more conditional check to see if the issue you are facing is resolved. If that also doesn't work, then would need some sample data from you to reproduce it, if you can

Regards, Deepak

deepakkumar1984 commented 7 years ago

Hey Jeff,

Are you still facing the issue?

Regards, Deepak

jklosinski commented 7 years ago

Hey Deepak. If you published an update, I will try again today or tomorrow and let you know how it goes.

jklosinski commented 7 years ago

The plugins store in my toolbox is not seeing any updates available to the Recycle Bin; the latest version available is the same as the one that caused the error, 2016.11.1. Have you published an update?

deepakkumar1984 commented 7 years ago

Hi,

Sorry for the delay as I was not finding time to work on this. I have uploaded the new package. Please test it from your end.

Regards, Deepak

On Tue, Jan 3, 2017 at 6:03 PM, polshgiant notifications@github.com wrote:

The plugins store in my toolbox is not seeing any updates available to the Recycle Bin; the latest version available is the same as the one that caused the error, 2016.11.1. Have you published an update?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/deepakkumar1984/XrmToolBoxPlugins/issues/2#issuecomment-270062719, or mute the thread https://github.com/notifications/unsubscribe-auth/AGCQKbc--zhWbZfXmGwtoRMvOfdstpb_ks5rOfnbgaJpZM4LM_9v .

-- Take care, Deepak

jklosinski commented 7 years ago

Same error. If you give me instructions on how to enable tracing I can try to get more information for you.

deepakkumar1984 commented 7 years ago

Hi,

Can you please fork the project from git and build the solution. Copy the debug dlls along with PDB file and replace in the XrmToolBox/Plugin folder Attach the solution to the XrmToolBox process and run the scenario.

The code will break automatically with more information.

Please let me know if you need more information.

Regards, Deepak

On Sun, Jan 8, 2017 at 3:28 PM, polshgiant notifications@github.com wrote:

Same error. If you give me instructions on how to enable tracing I can try to get more information for you.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/deepakkumar1984/XrmToolBoxPlugins/issues/2#issuecomment-271130066, or mute the thread https://github.com/notifications/unsubscribe-auth/AGCQKX2hJkMt7k5pYiIS7CzMB1zkKbDAks5rQGzjgaJpZM4LM_9v .

-- Take care, Deepak