From time to time i have experienced that importing customizations from one Microsoft Dynamics CRM 4.0 environment to another like from live to development, might cause problems.
For a long time i have been convinced that the issue were caused by missing RoolUps, moving accross native language for CRM installation.
Now, all blogposts i have found on this issue has different approaches to solving the issue. Some has success by increasing filesizelimit in web.config. Others clean up attributes that with no reasonable explanation are missing in schema but still represented on form objects or in views throughout the application. Others again faces oconflict between versions of Rollups.
Latest i read this thread.
Well, now i am convinced that the issue is far more simple than that.
Removing any tags from exported xml file regarding custom entities that define any custom icons make all my previous attempts on different organizations work!
So xml file is just a noline textstring seperated with tags. could it be that that string is missread by the parser on import, and that the mistake is that it is limited by the lenght of some types of tags?
Hope that this will be solved in a future roolup for Microsoft Dynamics CRM 4.0.
Saturday, June 6, 2009
Saturday, November 22, 2008
Execute workflow from ISV button
To optimize the user experience some of the workflows that are executed on demand might be put into an ISV button on the entity form.
Here is what to do:
Go to settings/customization
Open the entity and select the form in the forms/view section
Open the forms onload event
Copy the code below and paste it in at the end of what ever might be in the editor window
After save the form and publish the entity
Export the ISV config File and open it in notepad.
For the entyform you want to execute the workflow from, enter the nodes below:
Import the ISV.Config into CRM
Open the form and run your workflow directly from the form.
Here is what to do:
Go to settings/customization
Open the entity and select the form in the forms/view section
Open the forms onload event
Copy the code below and paste it in at the end of what ever might be in the editor window
"/* the function */
ExecuteWorkflow = function(entityId, workflowId)
{
var xml = ''
''
'<?xml:namespace prefix = soap /><soap:envelope xsd="\'http://www.w3.org/2001/XMLSchema\'" xsi="\'http://www.w3.org/2001/XMLSchema-instance\'" soap="\'http://schemas.xmlsoap.org/soap/envelope/\'">'
GenerateAuthenticationHeader()
' <soap:body>'
' <execute xmlns="\'http://schemas.microsoft.com/crm/2007/WebServices\'">'
' <request type="\'ExecuteWorkflowRequest\'">'
' <entityid>' entityId '</entityid>'
' <workflowid>' workflowId '</workflowid>'
' </request>'
' </execute>'
' </soap:body>'
'</soap:envelope>'
'';
var xmlHttpRequest = new ActiveXObject('Msxml2.XMLHTTP');
xmlHttpRequest.Open('POST', '/mscrmservices/2007/CrmService.asmx', false);
xmlHttpRequest.setRequestHeader('SOAPAction','http://schemas.microsoft.com/crm/2007/WebServices/Execute');
xmlHttpRequest.setRequestHeader('Content-Type', 'text/xml; charset=utf-8');
xmlHttpRequest.setRequestHeader('Content-Length', xml.length);
xmlHttpRequest.send(xml);
var resultXml = xmlHttpRequest.responseXML;
return(resultXml.xml);
}"After save the form and publish the entity
Export the ISV config File and open it in notepad.
For the entyform you want to execute the workflow from, enter the nodes below:
"<entity name="'account'">
<toolbar validforcreate="'0'" validforupdate="'1'">
<Button Icon='/_imgs/ico_16_exportCustomizations.gif'
JavaScript='
var theWorkflowId = '3FD2DD58-4708-43D7-A21B-F0F90A0AA9F2';
ExecuteWorkflow(crmForm.ObjectId, theWorkflowId);
window.location.reload();}'>
<titles>
<title lcid="'1033'" text="'Run">
</titles>
<tooltips>
<tooltip lcid="'1033'" text="'Run">
</tooltips>
</button>
</toolbar>
</entity>"Import the ISV.Config into CRM
Open the form and run your workflow directly from the form.
Subscribe to:
Posts (Atom)