Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

CRM Online Plugin - Create records using early bound classes

(0) ShareShare
ReportReport
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,056 on at
  • Verified answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans