Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Answered

CRM Online Plugin - Create records using early bound classes

Posted on by 10

I've generated early bound classes using crmsvcutils tool, and need to use them in plugins

the IOrganizationService Create method needs to take an Entity type, 

How do i use it with my early bound types?

heres my code:

cpr_number number = new cpr_number();
number.cpr_numberint = 2;
service.Create(number); //compile error becuase it accepts Entity type 

i want to work with early bound entities, what to do in this situation? 

(i have like 10 more entities to do and it'll be frustrating to type the fields schemas and entity names everytime)

  • Suggested answer
    Nya Profile Picture
    Nya 29,054 on at
  • Verified answer
    Bipin D365 Profile Picture
    Bipin D365 28,962 Moderator on at
    RE: CRM Online Plugin - Create records using early bound classes

    Hi,

    I think the process of creating early bound class is not correct.

    Can you please try to generate Early bound class using XRMToolbox too -

    dynamics-chronicles.com/.../xrmtoolbox-presentation-early-bound-generator

    when you check your class for Early Bound, you will see it is getting inherited from from Entity class

    public partial class Account : Microsoft.Xrm.Sdk.Entity, System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans