Thursday, June 14, 2012
Retrieving entity information programmatically
There are times that we need to retrieve information related to an entity separately. For an instance if we want to know the primary key field name in an entity or primary field id (this can be taken using the entityname + “id”) of an entity this is useful. The code snippet needed for this given below.
RetrieveEntityRequest retrieveEntityRequest = new RetrieveEntityRequest
EntityFilters = EntityFilters.Attributes,
LogicalName = “contact”
RetrieveEntityResponse retrieveEntityResponse = (RetrieveEntityResponse)Execute(retrieveEntityRequest);
if (retrieveEntityResponse != null)
The above will return the primary field name of the entity.
There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...
There is a bit of change in CRM 2011 than CRM 4. The code is below. Microsoft.Xrm.Sdk. EntityReference Moniker1 = new Microsoft.Xrm.S...
When you create a new security role from scratch and then assign only that role to a system user and when you log to the CRM site you might ...
Error message “User does not have send-as privilege.” when sending emails programmatically in CRM 2011We were working on sending emails programmatically using CRM and all were working fine. Suddenly we got this error when we tried to send an ...