Tuesday, November 3, 2009

Allow to Work with all CRM DB tables

Hi

I try to ask tables in CRM which I am not Authorized to ask.. what can I do?

You need to wrap the Query, Insert etc with this example


WindowsImpersonationContext impersonation = WindowsIdentity.Impersonate(IntPtr.Zero);
try {
// my code
} finally {
impersonation.Undo();
}

This solution will help you to work with all Database, CRM tables.

Enjoy,
Rami Heleg