Skip to main content

Notifications

Dynamics 365 general forum

CallerId of OrganizationServiceProxy

Posted on by Microsoft Employee

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

Categories:
  • Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: CallerId of OrganizationServiceProxy

    If my answer is helpful & solved your problem, mark it as answer to help others.

    This will close the thread as well. Stack Overflow too.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: CallerId of OrganizationServiceProxy

    Thanks a lot.

  • Suggested answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: CallerId of OrganizationServiceProxy

    Like I answered in Stack Overflow pls verify the security role privilege of that “normal user” so that any one role must have minimum user level create privilege for order entity under sales tab.

    stackoverflow.com/.../7920473

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans