Hi everyone,
I want to create a record from external service in Order entity in dynamic 365 crm. For that i tried using the CallerId property on the OrganizationServiceProxy class. I am setting the CallerId property by the user of CRM who is actually wanting to create a record. But i'm only able to create record in order entity if the user of crm has System Administrator role.
Pseudo code is something look like below:
public void Get(Guid userId){
var proxy = // creating authentication through OrganizationServiceProxy
var Context = // using proxy
// now setting caller id
proxy.CallerId = userId;
// generating order entity
var t = new SalesOrder();
t.Name = "Demo";
.....
...
Context.AddObject(t);
Context.SaveChanges(); // getting error on save changes
}
Now my question is how to overcome the error if the user of crm has not System Administrator role.
Thanks,
Protap