Tuesday, 20 May 2014

CRM 2011 / 2013 Convert Late Bound Entity Class to Early Bound

In the plugin code, first you will get the Entity class :

// Obtain the target entity from the input parameters.
Entity entity = (Entity)context.InputParameters["Target"];

Sometimes, you need to have logic using Early Bound for this entity class for easier life.

Here you can achieve this :

//create target entity as early bound
Opportunity targetEntityEarlyBound = entity.ToEntity<Opportunity>();

*Opportunity is your Target Entity Class

Congratulation, now you can use the Early Bound for target entity on your plugin.

image

Hope it helps!

2 comments:

  1. Ich schreibe sehr gute Artikel. Und ich helfe den Studenten https://der-aufsatz.com/essay-schreiben-lassen ihre akademischen Schulden zu decken. Also, Studenten, bitte kontaktieren Sie uns. Wir helfen Ihnen gerne weiter.

    ReplyDelete

My Name is..