dynamics-crm-2011

ExecuteMultipleResponse; How to read and store Guids from the response

蹲街弑〆低调 提交于 2019-12-01 08:29:09
问题 I am using ExecuteMultipleResponse method to insert 10 account records at a time using SSIS. List<Entity> _Accounts = new List<Entity>(); // Check the batch size and process public override void InputAccount_ProcessInput(InputAccountBuffer Buffer) { //List<int> personIDs = new List<int>(); int index = 0; while (Buffer.NextRow()) { _Accounts.Add(InputAccountFromBuffer(Buffer)); //personIDs.Add(int.Parse(Buffer.sPersonID)); index++; if (index == 10) { ImportBatch(); index = 0; } } ImportBatch()

Is it possible to place an org in it's own process

我只是一个虾纸丫 提交于 2019-12-01 07:38:55
So we have 2 Orgs in our dev CRM environment. Both orgs are using the same worker process (w3wp.exe). So whenever one developer hits a breakpoint in a plugin it locks the process and both orgs stop responding. My question is.. is it possible to put each org in its own process? I don't think that is possible. However, the newest SDK has a new feature in the Plugin Tool that lets you debug plugins locally. Basically, you enable "Profiling" for your plugin through the tool, then go do the action in CRM that would normally fire your plugin. You'll get a pop-up exception, at which point you

MS CRM - setVisible

巧了我就是萌 提交于 2019-12-01 06:42:58
I am newbie with CRM and I was googling for how to hide and show a text field using jScript library in MS CRM (online) and found several options of using the function setVisible . I tried those options: Xrm.Page.ui.tabs.get('new_fieldname').setVisible(false); Xrm.Page.data.entity.attributes.get('new_fieldname').setVisible(false); Xrm.Page.getAttribute('new_fieldname').controls.get(0).setVisible(false); But only the last one is really working. The first option gives me an error message. What is the different between them? glosrob Just to add to the points already made.. The difference between

Using QueryByAttribute cannot retrieve null values

Deadly 提交于 2019-12-01 06:21:36
I am new to CRM Development. I would like to update the custom field values in addtion to its existing values in the CRM 2011 from my C# application. If the field has some values then it is working fine, but if it null then i am receiving "The given key was not present in the dictionary." error. The code below is what i am trying to achieve. IOrganizationService service = (IOrganizationService)serviceProxy; QueryByAttribute querybyattribute = new QueryByAttribute("salesorder"); querybyattribute.ColumnSet = new ColumnSet(new String[] { "salesorderid", "new_customefield" }); querybyattribute

Assign new owner to appointment. “There should be only one owner party for an activity”

*爱你&永不变心* 提交于 2019-12-01 05:48:17
I need to change the owner of an appointment record when creating a new appointment. I'm using a plugin for the create message and i've found this code to assign a new owner to the appointment: entity = context.PostEntityImages["PostImage"]; ...... AssignRequest request = new AssignRequest(); //request.RequestName request.Assignee = new EntityReference("systemuser", owners.ToList()[0].Id); request.Target = new EntityReference(Appointment.EntityLogicalName, entity.Id); service.Execute(request); But when I test this i get the following error: Invalid Argument: There should be only one owner

Can LINQ be used in Dynamics CRM to get all Accounts not in a Collection?

眉间皱痕 提交于 2019-12-01 05:27:34
问题 How can a LINQ query be written to return all Accounts where the account number is not in a List? The list is going to be pulled from an excel document. private bool GetAccounts() { List<String> accountIds = new List<String>(); accountIds.Add( "[unknown]"); var query = from accounts in context.AccountSet where !accountIds.Contains(accounts.AccountNumber) select accounts; } It does not have to be a List. EDIT This is what happens when the above query runs - Is this CRM's fault? 回答1: I don't

MS CRM - setVisible

我只是一个虾纸丫 提交于 2019-12-01 05:19:38
问题 I am newbie with CRM and I was googling for how to hide and show a text field using jScript library in MS CRM (online) and found several options of using the function setVisible . I tried those options: Xrm.Page.ui.tabs.get('new_fieldname').setVisible(false); Xrm.Page.data.entity.attributes.get('new_fieldname').setVisible(false); Xrm.Page.getAttribute('new_fieldname').controls.get(0).setVisible(false); But only the last one is really working. The first option gives me an error message. What

TimeZoneCode to TimeZoneInfo

瘦欲@ 提交于 2019-12-01 00:28:38
In our MS dynamics CRM project we created a mass-user upload batch. The batch reads from an excel file and does a mass upload of the users. One of the things this batch needs to set is the timezonecode. In the excel file the timezone will be written as eg "UTC+1" The code used by CRM seems to be the timezonecode SQL-server is using as can be found here . What is the cleanest way of mapping these? My ideas so far: Hardcode a conversion store Fetch the codes from CRM somehow Fetch the codes from SQL somehow Currently we just implemented our own conversion class with hard coded values. Is there a

CRM 2011: Global JavaScript and button in status bar

大憨熊 提交于 2019-11-30 23:14:31
I'm not so new in CRM 2011, but I faced with one big problem... I found some solution on net that makes some scoring/ranking system in CRM. I was completely confused when I saw star in top status bar, above ribbon buttons bar, next to username on right corner of screen. When I click on this button, I open div with some information about users, and scores they have. Where I can put Java Script function (jQuery for example) that can be executed globally? How to call that function, what event to catch? I need this button/function be active on all pages in CRM like this one. What is id of that

How to update a CRM 2011 Entity using LINQ in a Plugin?

南笙酒味 提交于 2019-11-30 23:02:38
问题 We are able to create new entities without any issues, but updating an existing entity in a plugin this does not appear to be working. This is for CRM 2011. var crmContext = new CustomCrmContext(service); var contact = crmContext.Contact.FirstOrDefault(c=>c.Id == targetEntity.Id); contact.new_CustomField = "Updated"; crmContext.SaveChanges(); 回答1: You have to mark the object as modified in order to get it submitted to the server. See OrganizationServiceContext.UpdateObject (Entity) You should