dynamics-crm-2011

Strange behavior CRM 2011 plugin

試著忘記壹切 提交于 2019-12-05 06:25:54
I have registered a plugin for our quote products. The plugin worked well in our test environment. I have tested it lots of times. Then registered the plugin in the main server. However, the below scenario occurs: When I create or update the quote products first the quote product form greys out: After I click on the quote form the error appears. No log files are available (as you see). I debugged the plugin, but there is no error also. After I click the OK, the error disappears and the required business takes place on the quote product (for tax field). Means that the code of plugin has no

Can I disable the login prompt for MS CRM 2011 SDK if credentials are wrong?

帅比萌擦擦* 提交于 2019-12-05 05:29:56
问题 Right now I access the CRM SDK as follows IServiceManagement<IDiscoveryService> serviceManagement = ServiceConfigurationFactory.CreateManagement<IDiscoveryService>(discoveryUri); ClientCredentials credentials = new ClientCredentials(); credentials.Windows.ClientCredential = new System.Net.NetworkCredential(userName, password, domain); using (DiscoveryServiceProxy serviceProxy = new DiscoveryServiceProxy(new DiscoveryServiceProxy(serviceManagement, credentials)) { RetrieveOrganizationsRequest

How to filter w.r.t. multiple fields in oData using $filter?

帅比萌擦擦* 提交于 2019-12-05 05:21:41
What is the correct way to filter w.r.t. multiple fields when applying $filter command on more than one field/value pair from JavaScript? It's very canonical. http://192.168.75.8:5555/Konrad01/ xrmservices/2011/OrganizationData.svc/ LeadSet%28%29?$filter= Field1%20eq%20%27Value1%27%20and%20Field2%20eq%20%27Value2%27 EDIT: More readable version. http://Server:Port/Organization/XrmServices/2011/OrganizationData.svc/ LeadSet()?$filter=Field1 eq 'Value1' and Field2 eq 'Value2' Put an and in between Example: http://YourServer.com/YourOrg/xrmservices/2011/OrganizationData.svc/ContactSet()?$filter

Do I need to dispose both the CRM OrganizationServiceProxy and the OrganizationServiceContext?

梦想与她 提交于 2019-12-05 04:50:11
问题 Both the OrganizationServiceProxy and the OrganizationServiceContext support the dispose method. Do I need to wrap both of them in a using statement? using (var proxy = GetOrganizationServiceProxy(Constants.OrgName)) { using (var context = new OrganizationServiceContext(proxy)) { // Linq Code Here } } Or will disposing of the context close properly close the proxy, meaning only this is needed? var proxy = GetOrganizationServiceProxy(Constants.OrgName) using (var context = new

Error in QueryExpression with PartyList

浪子不回头ぞ 提交于 2019-12-05 04:02:25
问题 I'm trying to retrieve appointments whose "requiredattendees" contains on one of entities from account list. requiredattendees have a type of PartyList. My query looks like: var query = new QueryExpression("appointment") { ColumnSet = columnSet, Criteria = new FilterExpression(LogicalOperator.Or) }; And adding conditions : GetAccounts() .Select(a => new ConditionExpression("requiredattendees", ConditionOperator.Contains, a.Id)) .ForEach(c => query.Criteria.AddCondition(c)); a.Id is the

Invalid CRM 2011 LINQ Query: “Invalid 'where' condition. An entity member is invoking an invalid property or method.”

邮差的信 提交于 2019-12-05 03:14:15
I am trying to execute this query to retrieve Audit items for specific entity types public List<Audit> GetAuditChangesSince(DateTime since, string entityType) { return (from a in OrgContext.CreateQuery<Audit>() where a.ObjectId != null && a.ObjectId.LogicalName == entityType && a.CreatedOn > since select a).ToList(); } The a.ObjectId != null && a.ObjectId.LogicalName == entityType && clause is causing problems. I know .Equals() may cause problems (hence ==) and there are these limitations to the LINQ Provider: The left side of the clause must be an attribute name and the right side of the

Advanced Find - combine related entitie with OR

大兔子大兔子 提交于 2019-12-05 03:04:04
Is there any way to create that query? I need data from Adress and Contact Adress, normally i can just combine them by Combine OR but not in this case. I guess that i must write new plugin with PreExecute() method, get my query, parse data and then manualy get equal address OR there are other way? I am unaware of any way to do the above. Rather than write a plugin however I would do a report. Simplest way I can think of is to do your fetchXML without filters like so. <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true"> <entity name="account"> <attribute name=

Microsoft Dynamics Crm Sdk - Is this query possible?

为君一笑 提交于 2019-12-05 02:21:53
问题 I am exploring the "QueryExpression" mechanism used to Retrieve data via the Dynamics CRM SDK, and I think I have hit a problem / limitiation with the SDK, but I would like to ascertain that for certain.. Given this desired SQL: Select C.firstname, C.lastname FROM contact C INNER JOIN customeraddress A on C.contactid = A.parentid WHERE ((C.firstname = 'Max' AND C.lastname = 'Planck') OR (C.firstname = 'Albert' AND C.lastname = 'Einstein')) OR A.Line1 = 'The secret moonbase' I cannot appear to

Pre & Post-Entity Images on Update-Plugin CRM 2011

有些话、适合烂在心里 提交于 2019-12-05 01:34:36
问题 I hope somone can help me with a problem I been trying to deal with over some time now. I have a create plugin and a update plugin. For testing purposes my create plugin (Pre-Operation) does a simple calculation and puts the result on a field after save. My update-plugin works fine when I register it on the pre-operation and change the fields I have my logic for. HOWEVER if I only change one of those fields (or get other fields dirty on the form)I get an error that the key was not present in

How to perform an ODATA expand in LinqPad

六月ゝ 毕业季﹏ 提交于 2019-12-04 23:17:19
问题 I'm using LINQPad to connect to the ODATA services on a local CRM organization and I don't know how to perform "joins" or to traverse relationships using LINQPad. Here is my URL OrganizationData.svc/New_locationSet?$select=new_state_new_location/new_Region$expand=new_state_new_location which works just fine in the browser. Here is what I'm doing in LINQPad: from l in new_locationSet from s in l.new_state_new_location select s.new_Region but I'm getting an error: An expression of type 'LINQPad