HIMBAP! I see that you helped out in this thread ( https://community.dynamics.com/crm/f/117/t/164406 ) I believe i'm trying to achieve the same thing, can you help?! This is what i have so far, but it fails //Casting the reference to GUID Guid accountId = (Guid)account[0].Attributes["accountnumber"]; Current code: var accountName = "test"; //Query for the GUID of the Account using Account Name QueryExpression query = new QueryExpression("account"); string[] cols = { "accountnumber", "name" }; query.Criteria = new FilterExpression(); query.Criteria.AddCondition("name", ConditionOperator.Equal, accountName); query.ColumnSet = new ColumnSet(cols); var account = _service.RetrieveMultiple(query); //Casting the reference to GUID Guid accountId = (Guid)account[0].Attributes["accountnumber"]; Console.WriteLine("the Guid for test is: " + accountId.ToString());
↧