dynamics-crm-2011

Not able to perform Filter on Dynamics CRM “Opportunity” transaction type with estimatedclosedate

狂风中的少年 提交于 2019-12-23 04:43:55
问题 I am using QueryExpression to generate the filter for the Dynamics crm filters and then passing that to the my CRM made service to retrieve the result. QueryExpression queryCRM = new QueryExpression { EntityName = SourceID, ColumnSet = new ColumnSet(FieldSet), Criteria = new FilterExpression() }; and then queryCRM.Criteria.AddCondition(strFilterColumnName,ConditionOperator.On , strFilterValue); Here i am not able to fetch the result can anybody help me to figure out the issue? It doesn't work

CRM 2011 OData relationship query tutorials

时光总嘲笑我的痴心妄想 提交于 2019-12-23 03:28:12
问题 I am looking for some tutorials regarding oData in CRM 2011. In particular I am looking for detailed, in-depth explanations and examples around how to use OData for querying entity relationships Please do not point me at the CRM 2011 OData query designer. While i agree that the tool is great, it offers no explanations as to why/how it generates queries the way they are. 回答1: I suggest you to first look this video. This links were useful for me: MSDN - OData System Query Options Using the REST

Generate Mail Merge documents programatically on Microsoft Dynamics CRM 2013

核能气质少年 提交于 2019-12-23 02:48:19
问题 Is there any way to generate a mail merge document programatically via the Microsoft Dynamics CRM 2013? Trying to generate a mail merge document via a custom plugin in the back end. The merged document would then be sent to sharepoint. But... can't find a "Create Merged Document" feature in the CRM SDK, anyone know of a way of doing this? Thanks in advance! 回答1: This can't be done with Mail Merge documents insofar as the way they work with out of the box Dynamics CRM - you need MS Word

Retrieving “two option” field value on the plugin in CRM 2011

我的未来我决定 提交于 2019-12-23 02:32:50
问题 Am trying to update child contacts based on a "Two Options" field in the account form. I update all child contacts to the updated address of parent account if the "Two Option" field is set to "Yes". I try to retrieve the value using the following code, bool? updateContactsValue = entity.GetAttributeValue<bool?>("abc_yesNoField"); if (updateContactsValue) { String[] details = new string[7]; String telephoneNum = String.Empty, ... , country = String.Empty; telephoneNum = entity

Dynamically Construct Linq in CRM 2011

落爺英雄遲暮 提交于 2019-12-23 02:17:55
问题 I am trying to retrieve all records of an entity with Linq with the condition that one of the properties that are true in the parameter are true in the record. I am trying to achieve a logical 'or', please look at the code as it will make more sense there. In FetchXML it is working: public void GetLock(bool account = false, bool contact = false, bool incident = false) { var fetch = @" <fetch mapping='logical'> <entity name='de_processimport'> <attribute name='de_processimportid' /> <filter

Using SQL Server application locks to solve locking requirements

允我心安 提交于 2019-12-23 01:07:07
问题 I have a large application based on Dynamics CRM 2011 that in various places has code that must query for a record based upon some criteria and create it if it doesn't exist else update it. An example of the kind of thing I am talking about would be similar to this: stk_balance record = context.stk_balanceSet.FirstOrDefault(x => x.stk_key == id); if(record == null) { record = new stk_balance(); record.Id = Guid.NewGuid(); record.stk_value = 100; context.AddObject(record); } else { record.stk

The given key is not present in the dictionary

安稳与你 提交于 2019-12-22 11:22:42
问题 Hi I am trying to fetch the accounts from CRM 2011. I am fetching the data in the EntityCollection . But when I am trying to read or access data from entityCollection it displayed first record but throwing an error after that record. Kindly have a look to below code and suggest me. string fetch2 = @" <fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'> <entity name='account'> <attribute name='name' /> <attribute name='address1_city' /> <attribute name=

The given key is not present in the dictionary

痴心易碎 提交于 2019-12-22 11:20:52
问题 Hi I am trying to fetch the accounts from CRM 2011. I am fetching the data in the EntityCollection . But when I am trying to read or access data from entityCollection it displayed first record but throwing an error after that record. Kindly have a look to below code and suggest me. string fetch2 = @" <fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'> <entity name='account'> <attribute name='name' /> <attribute name='address1_city' /> <attribute name=

Dynamics CRM - Caller not authenticated to service

霸气de小男生 提交于 2019-12-22 10:33:47
问题 I have an MVC4 Web Application on Web Server A that is consuming the Dynamics CRM Web Service using the OrganizationServiceProxy, which is on Web Server B. The MVC4 application is setup with ASP .NET Impersonation and Windows Authentication enabled. When I call the WhoAmI I get an error: 'The caller was not authenticated by the service.' Now if I move the MVC4 Application to Web Server B (same as CRM) with the same Authentication as it had on Web Server A it calls WhoAmI without an exception.

How to get current user record in CRM plugin?

二次信任 提交于 2019-12-22 09:05:20
问题 I am developing a plugin . Whenever a plugin gets invoked, I need to get current user information ? Is there any way to retrieve that? 回答1: The information is available in the PluginExecutionContext. The code below is from the Execute method your plugin must implement. public void Execute(IServiceProvider serviceProvider) { IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext)); IOrganizationServiceFactory serviceFactory =