Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Retrieve EntityRerence from an AliasedValue and convert that to a string - FetchXML

$
0
0

Hi

I'm retrieving data using FetchXML but I'm struggling to check for the AliasValues, retrieve them and then make them strings for insertion in a SQLserver db.

I have it working for non Alias values as below;

if (c.Attributes.Contains("tri_school1type")){
        gSchoolType1 = c.GetAttributeValue<EntityReference>("tri_school1type").Id;
                }
gSchoolType1 is declared as a Guid then i convert out of the fetch loop to a string with;

var sSchoolType1Guid = gSchoolType1;
string sSchoolType1String = sSchoolType1Guid.ToString();


Many thanks


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images