dynamics-crm-2011

Fetch DateTime CRM 2011

旧城冷巷雨未停 提交于 2019-12-08 01:38:11
问题 Im having some trouble with DateTime: Using Fetch <attribute name='new_startdate' groupby='true' dategrouping='day' alias='new_startdate' /> <attribute name='new_enddate' groupby='true' dategrouping='day' alias='new_enddate' /> <attribute name='new_duedate' groupby='true' dategrouping='day' alias='new_duedate' /> Think this is the bit thats Wrong.... DateTime scheduledstart = ((DateTime)((AliasedValue)a["new_startdate"]).Value); tracer.Trace("DateTime 1 Done"); DateTime enddate = ((DateTime)(

CRM 2013: Calling actions from javascript

拟墨画扇 提交于 2019-12-07 22:25:50
问题 I was trying to call action from javascript using the below function: function ExecuteActionCreateProject(reason, entityId, entityName, requestName) { // Creating the request XML for calling the Action var requestXML = "" requestXML += "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">"; requestXML += " <s:Body>"; requestXML += " <Execute xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">"; requestXML += "

What is the differences between RetrieveRequest and IOrganizationService.Retrieve in CRM?

痞子三分冷 提交于 2019-12-07 19:16:16
问题 I'm new in CRM workflow step development by C#. I need to know what is the main difference between RetrieveRequest and Retrieve in IOrganizationService . When must use which one? And is there any example to show how use this objects to run in a performer manner? 回答1: In most cases the Retrieve method suffices. The RetrieveRequest however adds an interesting feature: it provides the option to query data associated with the retrieved object in one go. Imagine you need invoice data along with

Issue with mocking IOrganizationService.Execute in CRM 2011 plugin

家住魔仙堡 提交于 2019-12-07 15:33:22
问题 I am still new to mocking and I am having trouble with this code: //create the request SendEmailFromTemplateRequest emailUsingTemplateReq = new SendEmailFromTemplateRequest { Target = email, TemplateId = new Guid("07B94C1D-C85F-492F-B120-F0A743C540E6"), RegardingId = toParty[0].PartyId.Id, RegardingType = toParty[0].PartyId.LogicalName }; //retrieve response SendEmailFromTemplateResponse emailUsingTemplateResponse = (SendEmailFromTemplateResponse)service.Execute(emailUsingTemplateReq); var

How to get the Contact Guids from a PartyList in a Plugin?

丶灬走出姿态 提交于 2019-12-07 13:30:57
问题 I'm making a plugin that triggers on the create message of a custom activity SMS. These plugin will send the actual sms using a third party sms service provider. Therefore i need to get the mobilephone numbers for every contact in the "To" field of the SMS activity. This is a field of type: PartyList. I'm currently using the following code: EntityCollection Recipients; Entity entity = (Entity) context.InputParameters["Target"]; IOrganizationServiceFactory serviceFactory =

How to check the total number of contacts in CRM 2011?

馋奶兔 提交于 2019-12-07 12:36:52
问题 The method used right now is to check the size of the array read from DB. As long as there are other operations performed on it, such a piggy-back is fine. However, I'd like to know if there's a more direct method to query for the number of contact existing. I'm coding in C# but JS would be to get to know too, just in case. QueryExpression query = new QueryExpression { EntityName = "contact", ColumnSet = new ColumnSet(true), }; EntityCollection response = organizationService.RetrieveMultiple

MS Dynamics CRM 2012: Script Editor Enhancements

时光怂恿深爱的人放手 提交于 2019-12-07 12:09:03
问题 I have been trying to find some more information about the next Microsoft Dynamics CRM product (2012 / 6). Mainly I am interested in any enhancements that will be made to the scripting editor. There was great improvements between version 4 and 5 (2011), the most welcome for me being the ability to share script functions across form/field events. What I really miss though is the complete lack of formatting in the editors. Yes, it would be great to have intellisense and the likes, but I would

Thread safety for OrganizationServiceProxy and generated xrm service context

孤街醉人 提交于 2019-12-07 12:08:43
问题 This is a best practices question. Per this best practices article and per MSDN, the OrganizationServiceProxy is not thread safe. If you have a multi threaded client application in which you are creating an instance of an OrganizationServiceContext (on a per thread basis), the constructor of which accepts an IOrganizationService instance and you pass in a global instance of the OrganizationServiceProxy (i.e a static instance allocated once at the "process level"), will this cause threading

MS Dynamics CRM 2011 SDK - Update entity record using late-binding

感情迁移 提交于 2019-12-07 11:02:37
问题 does anyone know how to save changes to a late-bound entity using the SDK for Dynamics CRM 2011? This is what I've tried: // retrieve and modify a pet... // (This part works) Guid findId = new Guid("6CA57D73-30CC-E111-B155-00505630052F"); ColumnSet attributes = new ColumnSet(new string[] { "name", "foodtype" }); // try to retrieve // (this also works) pet = xrm.Retrieve("pet", findId, attributes); if( pet!=null ) { Console.WriteLine( String.Format( "Retrieved pet {0} successfully!", pet["name

How to debug jScript for Dynamics CRM?

自闭症网瘾萝莉.ら 提交于 2019-12-07 10:38:49
问题 Are there any tricks or tools for debugging those jScripts that you write in the web resources and attach to an event on a form ? I have to customize a Dynamics CRM 2011 instance, which includes writing some jScripts. The best I found until now is to click "I want to see the error that's being sent to Microsoft". Better than nothing, but I guess there must be something better ? Thanks! 回答1: If you use a decent version of IE (I hope you do), you could use the developer tools (F12). They also