Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

CRM 2011 Plugin - not able to retrieve list of all attributes(columns) of an entity 'x' using LINQ

$
0
0

Hi,

I have LINQ query as like below:

if(some condition) { var Column = "new_columnname"; var key = new Guid("xxxxxx.. - guid - value -...xx "); var Q1 = (from d context.CreateQuery(entity_name) where((guid)d[primary_key])== key select d).First();

foreach(var items in Q1.Attributes)

{

//if I suppose to print the attributes from the record available in query Q1 -

// It display only few columns(attributes) of that particular entity

}

if(Q1..Attributes.Contains(Column)) { tempbody = Q1.Attributes[Column].ToString(); } }

Is there any other way to achieve this using linq or SQL syntax.

Kindly Reply ASAP .


If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"


Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>