Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Where is SystemUser refer

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

i added Reference (i use Dynamics 2016 SDK)

Microsoft.Crm.Sdk.Proxy

Microsoft.Xrm.Sdk

Microsoft.Tooling.Connector

and i add using

using System;

using Microsoft.Crm.Sdk.Messages;



using Microsoft Xrm.Sdk;

using Microsoft.Xrm.Sdk.Query;

using Microsft Xrm.Tooling.Connector


but iv got error when define the SystemUser.

it shows 'CS2046' The type or namespace name ''SystemUser'' could not be found (are you missing a using directive or an assembly reference?)

where is SystemUser???

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Where is SystemUser refer

    iv checked generated my custom field. which you used parameter /

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Where is SystemUser refer

    Great. If you don't need all the entities that are part of the default solution, you can use the XrmToolbox Early Bound Generator. It's a great tool with a lot of flexibility, and no need to remember the command parameters.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Where is SystemUser refer

    thx i just found how to Use CrmSvcUtil ; http://www.infralib.com/page/3

    .\CrmSvcUtil.exe /url:orgname.api.crm5.dynamics.com/.../Organization.svc /username:domain\crmadmin /password:pass /out:CRMSdkTypes.cs

  • abhishek_255 Profile Picture
    abhishek_255 1,612 on at
    RE: Where is SystemUser refer

    Use SDK that resembles with your CRM version and regenerate the proxy using crmsvcutil.

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Where is SystemUser refer

    If you want to use early bound class names, you will have to use the crmsvcutil utility (that comes with the SDK) to generate those classes. You can also use the Early Bound Generator that is part of XrmToolBox.

    If you don't need to use Early Binding, then see Alex's code mentioned above.

  • Verified answer
    ashlega Profile Picture
    ashlega 34,475 on at
    RE: Where is SystemUser refer

    Hi,

      SDK assemblies do not define any of the entity-specific classes. If you want to use early-bound classes, you need to do this:

    https://msdn.microsoft.com/en-us/library/gg327844.aspx

     Otherwise, you can use late-bound:

     Entity e = new Entity("systemuser");

     or

     Entity e = service.Retrieve("systemuser", <GUID>, new ColumnSet(..));

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans