Search

Anything in the Dynamics CRM Platform

Microsoft Dynamics CRM Partner Introduction Video all PageButton


Hello Guest  
Rely on the products and services from contributing Exchange members!

Microsoft Dynamics crm Stayconnected

Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll

Microsoft Dynamics CRM Home>CRM Answer Center "Wiki"

The CRM AnswerCenter Wiki is a managed collection of user community raised problems and issues in the implementation and practice of a Microsoft Dynamics CRM solution together with the researched and edited solutions and support information. This is the one place to look first for all Dynamics CRM issues. This is also the one place to give back to the global community by adding to the Wiki of information as you discover and resolve Dynamics CRM related issues. Browse or search the resource to increase your knowledge or solve problems and update information with your knowledge.

CO - Configuration
CU - Customization
DA - Database
DE - Deployment
DV - Development
EM - Email
EX - Export
GE - General
IN - Integration
IM - Import
JS - Java Script
MA - Marketing
OC - Outlook Client
PI - Product Info
RE - Reports
SA - Sales
SE - Service
WC - Web Client
WF - Workflow


Check fields to search, enter your search words, click search. Apply further criteria with column pull down selection.



Problem Topic or QuestionCategoryProblem Solution or AnswerCredit ToRating
Change page: < 1 2 3 4 5 6 7 8 9 10 ... >  |  Displaying page 1 of 162, items 1 to 5 of 807.
JS
" + 5: "" + 9: "" + 10: "" + 12: "" + 13: workFlowProcessID + 14: "" + 15: "" + 16: "" + 17: entityId + 18: "" + 19: "" + 20: entityName + 21: "" + 22: "" + 23: "" + 24: "" + 25: "" + 26: ""; 27: 28: var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP"); 29: 30: xmlHttpRequest.Open("POST", 31: "/mscrmservices/2006/CrmService.asmx", 32: false); 33: 34: xmlHttpRequest.setRequestHeader("SOAPAction", 35: "http://schemas.microsoft.com/crm/2006/WebServices/Execute"); 36: 37: xmlHttpRequest.setRequestHeader("Content-Type", 38: "text/xml; charset=utf-8"); 39: 40: xmlHttpRequest.setRequestHeader("Content-Length", xml.length); 41: xmlHttpRequest.send(xml); 42: 43: var resultXml = xmlHttpRequest.responseXML; 44: return resultXml.xml; 45: } Step 3: Add code to the OnChange Event of the Form Attribute This code goes in the OnChange Event for the Form Attribute we're checking. Since we must have an ID assigned to the record, this code will only work if you are Updating the record. You may also wish to add additional logic to check various conditions before running the Workflow Rule. Note: Replace the ID assigned to workflowProcessID with the value you found in step 1. 1: if (crmForm.FormType == 2) 2: { 3: var workflowProcessID = '3B6CFF1A-A117-4243-8134-8DA612CC3A5C'; 4: var entityName = crmForm.ObjectTypeName; 5: var entityID = crmForm.ObjectId; 6: 7: var retVal = ''; 8: 9: retVal = StartWorkflow(entityName, entityID, workflowProcessID); 10: 11: //alert(retVal); 12: } That's pretty much it. I would advise that you remove the comment in line 11 so that you can see the XML that is returned by the CRM web service so that you can ensure that the code is working properly.' style="display:none ;"> I was looking if I could launch a Workflow rule when a CRM user changed a specific field on the Opportunity form. That topic sounded familiar and after digging around a bit, I found a newsgroup where Steven G had provided just such a solution. I've reworked Steven's code a bit to make it more generic and here is what you need to do to make this solution work: Step 1: Locate the Workflow Process ID You will need the ID of the CRM Workflow Process that you will be running. Open SQL Query Analyzer or SQL Server Management Studio and run the following script against the MSCRM database. Note: Replace "my workflow rule" with the name of the rule you are searching for. 1: select 2: ProcessID, 3: [name] 4: from 5: wfprocess 6: where 7: [name] like 'my workflow rule%' 8: and 9: ProcessTypeCode = 1 10: Copy the ProcessID value that is returned by the script. Step 2: Add code the the OnLoad Event of the CRM Entity you will be using The following code needs to be added to the OnLoad Event of the Form. 1: StartWorkflow = function(entityName, entityId, workFlowProcessID) 2: { 3: var xml = "" + 4: "" + 5: "" + 9: "" + 10: "" + 12: "" + 13: workFlowProcessID + 14: "" + 15: "" + 16: "" + 17: entityId + 18: "" + 19: "" + 20: entityName + 21: "" + 22: "" + 23: "" + 24: "" + 25: "" + 26: ""; 27: 28: var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP"); 29: 30: xmlHttpRequest.Open("POST", 31: "/mscrmservices/2006/CrmService.asmx", 32: false); 33: 34: xmlHttpRequest.setRequestHeader("SOAPAction", 35: "http://schemas.microsoft.com/crm/2006/WebServices/Execute"); 36: 37: xmlHttpRequest.setRequestHeader("Content-Type", 38: "text/xml; charset=utf-8"); 39: 40: xmlHttpRequest.setRequestHeader("Content-Length", xml.length); 41: xmlHttpRequest.send(xml); 42: 43: var resultXml = xmlHttpRequest.responseXML; 44: return resultXml.xml; 45: } Step 3: Add code to the OnChange Event of the Form Attribute This code goes in the OnChange Event for the Form Attribute we're checking. Since we must have an ID assigned to the record, this code will only work if you are Updating the record. You may also wish to add additional logic to check various conditions before running the Workflow Rule. Note: Replace the ID assigned to workflowProcessID with the value you found in step 1. 1: if (crmForm.FormType == 2) 2: { 3: var workflowProcessID = '3B6CFF1A-A117-4243-8134-8DA612CC3A5C'; 4: var entityName = crmForm.ObjectTypeName; 5: var entityID = crmForm.ObjectId; 6: 7: var retVal = ''; 8: 9: retVal = StartWorkflow(entityName, entityID, workflowProcessID); 10: 11: //alert(retVal); 12: } That's pretty much it. I would advise that you remove the comment in line 11 so that you can see the XML that is returned by the CRM web service so that you can ensure that the code is working properly.
Jitender Panwar Rating Stars
DA Jitender Panwar Rating Stars
DE Jitender Panwar Rating Stars
CU Jitender Panwar Rating Stars
DV
The server is not operational. Now at this point, I really don’t know what happened, but my development CRM 4.0 server was in some type of non-functional state that required me to perform an IISRESET to recover from. That is not the interesting thing here today. The interesting thing is where the error message was found. Here is an example the code that normally use to detect an error when using the CRM Web Service: catch (SoapException ex) { MessageBox.Show(ex.Detail.InnerText, Properties.Resources.MSG_AN_ERROR_HAS_OCCURRED, MessageBoxButtons.OK, MessageBoxIcon.Error); } Usually, the actual error message is found in the SoapException.Detail property and you can access it via the InnerText or InnerXml properties, depending on how you wish to handle it. Today, the error message was actually in the SoapException.Message property, which I find very odd. As I said, I’ve never seen this before so I don’t know what happened, but in order to prevent a blank error message from appearing to the user, I created the following work around: catch (SoapException ex) { string errorMessage = ex.Detail.InnerText; if (string.IsNullOrEmpty(errorMessage)) { errorMessage = ex.Message; } MessageBox.Show(errorMessage, Properties.Resources.MSG_AN_ERROR_HAS_OCCURRED, MessageBoxButtons.OK, MessageBoxIcon.Error); } As you can see, I just take into account the possibility that the Detail.InnerText property is blank and if so, just use the standard Message property to be safe.' style="display:none ;"> Exception handling when working with the CRM Web Services: Today I ran into something that I have never seen before related to a SoapException: I was updating my Export JavaScript utility when I received an error message that was blank. Very odd, I thought. After a bit of digging, I found the error: Server was unable to process request. —> Exception has been thrown by the target of an invocation. —> The type initializer for 'Microsoft.Crm.WebServices.CrmAuthenticationSoapExtensionBase' threw an exception. —> The server is not operational. Now at this point, I really don’t know what happened, but my development CRM 4.0 server was in some type of non-functional state that required me to perform an IISRESET to recover from. That is not the interesting thing here today. The interesting thing is where the error message was found. Here is an example the code that normally use to detect an error when using the CRM Web Service: catch (SoapException ex) { MessageBox.Show(ex.Detail.InnerText, Properties.Resources.MSG_AN_ERROR_HAS_OCCURRED, MessageBoxButtons.OK, MessageBoxIcon.Error); } Usually, the actual error message is found in the SoapException.Detail property and you can access it via the InnerText or InnerXml properties, depending on how you wish to handle it. Today, the error message was actually in the SoapException.Message property, which I find very odd. As I said, I’ve never seen this before so I don’t know what happened, but in order to prevent a blank error message from appearing to the user, I created the following work around: catch (SoapException ex) { string errorMessage = ex.Detail.InnerText; if (string.IsNullOrEmpty(errorMessage)) { errorMessage = ex.Message; } MessageBox.Show(errorMessage, Properties.Resources.MSG_AN_ERROR_HAS_OCCURRED, MessageBoxButtons.OK, MessageBoxIcon.Error); } As you can see, I just take into account the possibility that the Detail.InnerText property is blank and if so, just use the standard Message property to be safe.
Jitender Panwar Rating Stars


Ratting

Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll Microsoft Dynamics CRM Image Scroll