dynamics-crm-2011

Dynamically Change Option Set Values in CRM

為{幸葍}努か 提交于 2019-12-02 04:40:10
I am using CRM Online 2013. I am trying to remove 3 values from an optionset under a certain condition. The optionset has six options by default: they are listed at the top of my JS code below. When I run my code, the correct amount of options appear; but they all say undefined. Here is what I have at the moment: var customer = 100000000; var partner = 100000001; var partnerCustomer = 100000002; var customerAndBeta = 100000003; var partnerAndBeta = 100000004; var partnerCustomerAndBeta = 100000005; function populateBetaOptionSet(beta) { var options = Xrm.Page.getAttribute("intip_websiteaccess"

CRM 2011, Date in plugin and DST

妖精的绣舞 提交于 2019-12-02 04:15:37
问题 I have one issue which I resolved by myself but yet need some confirming words whether I am 100% correct on my thought, just because there is not any documentation I found to prove myself correct. My server is in DST time currently, CRM UI is also showing 1 hour up then data stored in db. that's fine. When I calculate and store date with plugin, after my plugin update operation finishes, CRM platform deducts 1 hour from data I saved. I have read that when we do some operation via SDK related

LINQ where clause throwing error with 2nd where

荒凉一梦 提交于 2019-12-02 03:07:55
问题 UPDATE Even doing a search on the contacts firstName or LastName causes issues: var contacts = ( from c in context.ContactSet join m in context.py3_membershipSet on c.ContactId equals m.py3_Member.Id where m.statuscode.Value == 1 && ((c.FirstName != null && c.FirstName == searchTerm) || (c.LastName!=null && c.LastName == searchTerm) || (c.FullName != null && c.FullName == searchTerm)) orderby c.LastName select new { ContactId = c.ContactId, FirstName = c.FirstName, LastName = c.LastName,

Trying to execute a WHERE IN: Invalid 'where' condition. An entity member is invoking an invalid property or method

不羁岁月 提交于 2019-12-02 02:46:47
问题 I'm trying to get a list of cases whose AccountID is found in a previous list. The error occurs on the last line of the following: // Gets the list of permissions for the current contact var perms = ServiceContext.GetCaseAccessByContact(Contact).Cast<Adx_caseaccess>(); // Get the list of account IDs from the permissions list var customerIDs = perms.Select(p => p.adx_accountid).Distinct(); // Get the list of cases that belong to any account whose ID is in the `customerID` list var openCases =

Trying to execute a WHERE IN: Invalid 'where' condition. An entity member is invoking an invalid property or method

穿精又带淫゛_ 提交于 2019-12-02 02:24:16
I'm trying to get a list of cases whose AccountID is found in a previous list. The error occurs on the last line of the following: // Gets the list of permissions for the current contact var perms = ServiceContext.GetCaseAccessByContact(Contact).Cast<Adx_caseaccess>(); // Get the list of account IDs from the permissions list var customerIDs = perms.Select(p => p.adx_accountid).Distinct(); // Get the list of cases that belong to any account whose ID is in the `customerID` list var openCases = (from c in ServiceContext.IncidentSet where customerIDs.Contains(c.AccountId) select c).ToList(); I'm

Retrieve list of all accounts in CRM through C#?

[亡魂溺海] 提交于 2019-12-02 02:21:35
问题 I'm trying to retrieve all Account records from CRM 2011 so that I can cycle through them using a ForEach loop and populate a drop down. I was reading this post (Retrieving list of Entities) and am able to retrieve all accounts which meet a certain condition, but how can I retrieve all? That is every single Account record, no matter of the condition? This is the code I was working with but I don't know which method to use after context.AccountSet. to get all accounts. var context = new

CRM 2011 KeyNotFoundException exception

南笙酒味 提交于 2019-12-02 02:01:53
I am new to CRM development. I have a Custom Entity "customer". This Entity has a Field called "defaultcustomer", which can be TRUE or FALSE. I am working on a Plug-In where i need to set the "defaultcustomer" to FALSE for all the "Customers". I am doing it as below: FACTS: I have registered the plugin for the entity "customer" itself. So when the Entity "customer" is updated, the plugin fires. private void MakeAllNonDefault() { try { QueryExpression query = new QueryExpression("customer"); query.ColumnSet = new ColumnSet("defaultcustomer"); EntityCollection retrieved = service

How to retrieve entity names in CRM 2016

倖福魔咒の 提交于 2019-12-02 01:41:13
问题 In our solution, we are building HTTP/ODATA requests dynamically. For example, we will build a URL that looks like this: [http://org....api/v8.1/]accounts(00000000-0000-0000-0000-000000000001)/primarycontactid?$select=fullname How do we dynamically get a list of all the entities such as 'accounts'? In 2011, we would simply execute against LeadSet/AccountSet/etcSet, what is the strategy in 2016? 回答1: I don't know if there is some "language" trick (obviously the name of the set is just plural

LINQ where clause throwing error with 2nd where

白昼怎懂夜的黑 提交于 2019-12-02 00:23:26
UPDATE Even doing a search on the contacts firstName or LastName causes issues: var contacts = ( from c in context.ContactSet join m in context.py3_membershipSet on c.ContactId equals m.py3_Member.Id where m.statuscode.Value == 1 && ((c.FirstName != null && c.FirstName == searchTerm) || (c.LastName!=null && c.LastName == searchTerm) || (c.FullName != null && c.FullName == searchTerm)) orderby c.LastName select new { ContactId = c.ContactId, FirstName = c.FirstName, LastName = c.LastName, BranchCode = c.py3_BranchArea, Branch = (c.FormattedValues != null && c.FormattedValues.Contains("py3

Pass a parameter to a CRM 2011 Workflow via the API

五迷三道 提交于 2019-12-01 23:18:53
问题 I have a workflow that has a 'Prompt and Response' dialogue. I can run the workflow from the API using ExecuteWorkflowRequest but how do I provide values for the prompt and response inputs? 回答1: Workflows don't take parameters. Dialogs take parameters, which are generally passed from other dialogs or queries. The only thing I managed to do is to pass a related entity from parent workflow as the primary entity to a child workflow. 回答2: I'm going to retract my earlier answer and upvote @Grigory