dynamics-crm-2011

CRM 2011: Reauthentication with _serviceProxy.Authenticate()

前提是你 提交于 2019-12-11 01:35:06
问题 I have developed a client software for ms dynamics 2011 using WCF channel and organization service. After creating the channel I put it into dictionary Dictionary<string, OrganizationServiceProxy> and after 8 hours waiting was over, the security token was not valid any more. Now I call serviceProxy.Authenticate() method (serviceProxy is an object retrieved from my collection) and nothing happens. My token has not been renewed and I can not use my channel to retrieve data from dynamics. As I

Cannot add Currency field to Entity after Importing

穿精又带淫゛_ 提交于 2019-12-11 01:14:37
问题 A custom entity was created in our DEV environment. It originally had a Currency field, but we decided to remove it and use a Float field for simplicity. After exporting the solution and importing it into QA for the first time, I can no longer add a Currency field to the entity in QA (and the "leftover" transactioncurrencyid column in DEV did not get migrated to QA). The main problem is that I cannot remove the transactioncurrencyid column and now my Filtered views are different between DEV

CRM 2011: Wsdl web service doesn't contain my entities

别来无恙 提交于 2019-12-11 00:49:10
问题 We will soon upgrade to CRM 2011 so I'm doing some tests. The problem is that when I change my web service reference to the 2011 one, my application stops compiling. It just won't find any entity (example of line that stops working: Account acc = new Account() -> It says that I must miss a reference). When I compare the web services of the CRM 4 to the one of the CRM 2011, I see that it's true. The CrmService of CRM 4 contains the definition of every entity of the CRM, but they do not appear

Linq to Dynamics - compare two properties in where clause

瘦欲@ 提交于 2019-12-11 00:27:17
问题 I am using Dynamics sdk dll's ver 5.0.9689.2165 and trying to use Linq to get all Accounts where the Account.XDate is less than the Account.YDate (both are custom DateTime properties - I use the genenerated proxy classes in project to access these) from a Dynamics Online account. I have this basic expression: var accounts = myOrganizationServiceContext.CreateQuery<Account>().Where(a => a.XDate < a.YDate) But I get the exception below when it gets processed - can't you compare 2 Entity

Retrieve a list of entites from CRM 2011, each with all of their related entities

本秂侑毒 提交于 2019-12-11 00:26:45
问题 I have two entities in CRM 2011 - EmailMatchingRule and EmailMatchingRuleField, in a standard parent-child relationship. What I want to retrieve is a set of all of the rules, each with all of its fields pre-fetched as related entities. Is this even possible? I can get a flattened list using the QueryExpression AddLinkEntity functionality, but that's not really what I'm after. Using early bound entities and Linq, I can only figure out how to get a list of each, but without the related items.

Is it possible to stop plugin execution in MS CRM 2011 silently?

蹲街弑〆低调 提交于 2019-12-10 23:25:56
问题 Is it possible to stop execution of MS CRM plugins without firing exception? I want to forbid user action and thus created plugin listing Pre event step. My plan it to cancel all further actions after that Pre step. How could I achieve this? Without showing error message, of course. 回答1: Unfortunately the only way to stop execution and rollback the changes inside a plugin is to throw an exception ( InvalidPluginExecutionException ) If the plugin is registered as synchronous the exception will

How to save a record and immediately use its GUID

耗尽温柔 提交于 2019-12-10 22:49:07
问题 I'm executing some javascript from a ribbon button and what I want to do is save the record that I am creating and then immediately use its GUID for some code a bit further on. Each time I try it the GUID is coming back null even though I'm requesting it after the record has been saved. If I try the button again after I've saved it then it works, but not as I'm saving it. Is there a way to do this? function RibbonButton_AddProduct() { //Save the Record Xrm.Page.data.entity.save();

Multiple Early Bound Files in Web Service

若如初见. 提交于 2019-12-10 21:04:51
问题 I have a WCF service with 3 different endpoints that need to use different Dynamics CRM early bound class files. I have them in separate namespaces, and have removed: [assembly: Microsoft.Xrm.Sdk.Client.ProxyTypesAssemblyAttribute()] I can't seem to figure out how to specify which early bound file to use to when enabling proxy types. I am trying to avoid having each early bound file in a separate project. The files share some similar entities, but most importantly there are unique fields and

“cannot be assigned to — it is read only” error on ConditionExpression

寵の児 提交于 2019-12-10 20:34:43
问题 I have to create "between date" condition. When I write like this: ConditionExpression modifiedOnCondition = new ConditionExpression(); modifiedOnCondition.AttributeName = "modifiedon"; modifiedOnCondition.Operator = ConditionOperator.Between; modifiedOnCondition.Values = new Object[] { startDate, endDate }; startDate and endDate are DateTime . I got an error on modifiedOnCondition.Values . It says: Property or indexer 'Microsoft.Xrm.Sdk.Query.ConditionExpression.Values' cannot be assigned to

How To Improve Delete Timeout Issues In CRM 2011 On Prem Dev Environment?

元气小坏坏 提交于 2019-12-10 20:22:15
问题 Background I have a unit test framework that creates entities for my unit tests, preforms the test, then automagically deletes the entities. It had been working fine except that some entities take 15 - 30 seconds to delete in our dev environment. I recently received a VM setup in the Amazon Cloud to perform some long term changes requiring a couple release cycles to complete. When I run a unit test on VM, I'm continually getting SQL Timeout Errors attempting to delete the entity. Steps I've