check type in regardingobjectid field in crm 2013 c# -


how can know type in regardingobjectid field in crm c#?

(in our task entity can contact, account or incident). thank foe answer.

davlumbaz's code correct it's bound style. in case of late bound, code be:

entityreference regardingref = (entityreference)record["regardingobjectid"]; bool iscontact = regardingref.logicalname == "contact"; 

Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -