dynamics crm 2011 - Referenced properties of generated custom entites class doesn't work -


i have generated class crm devtoolkit. got entity throught organizationservicecontext.createquer<customentitytype>().where(someexpression).firstofdefault(). result fine. has own properties related entities:

    /// <summary>     /// n:n inv_inv_templatedelivery_account     /// </summary>     [microsoft.xrm.sdk.relationshipschemanameattribute("relashionshipname")]     public system.collections.generic.ienumerable<customentity> inv_inv_templatedelivery_account     {                 {             return this.getrelatedentities<customentity>("relashionshipname", null);         }         set         {             this.onpropertychanging("somepointer");             this.setrelatedentities<customentity>("relashionshipname", null, value);             this.onpropertychanged("somepointer");         }     } 

this code generated sdk developer toolkit! why returns null???? tried generate classes crmsvcutil.exe - same result.

great thanks.

you have force loading of these related properties contact.loadproeprty method:

context.loadproperty(entity, "inv_inv_templatedelivery_account");

you wouldn't want crm pull of data of related items each time, have specify each time want load.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -