We have a very strange and "bug type" problem.We have developed some workflows activities. Some of the activities include Input / Output parameters from type of Lookup. In addition, the workflow itself (from the workflow designer) include conditions and conditions branch that contains values from Lookup fields (by selecting values from a lookup list/window).
When working in the workflow designer and insert to the parameters lookup value (by selecting it from a lookup list/window), it's all working jest fain. The problems start when we export the customizations to another environment by export / import tools (we export the workflows separately from the entities, into a XML file and imports them by using the xml file, into the other environment).
At the new environment, the workflows that were copied seem to be OK, but we can't publish some of them (At the new environment). In the cases of custom workflow activities with input\output parameters, we gets an error in the workflow designer window (the error is in the window when clicking on the workflow step from the workflow designer) that says that "The record is not exists, or you don't have permissions …".After some checking we figure it out: the workflow is searching a Guid / Lookup value from the other environment (that the customizations were imported from).By building that WF from the WF designer again by deleting the current and create new entry / step will solve the problem, but we have hundreds WF and it will be very hard thing to do.In the cases of workflows that include conditions with fields from Lookup, there is a "red cross" that indicating about error, clicking on the row with the condition (properties button) will open the properties window but we have to reselecting the lookup fields from list.My question: Is it possible that the WF export the data with the Schema? because that what seems to be … When I looked at the xml file created in the customization.xml that export the WF I saw a item calls "uidata", that includes a serialization or binary data that embedded in the Xml file, maybe the export tool is including the schema of the WF and includes somehow all of the Input parameters typed Lookup and gets its data hardcoded.
Maybe we are not working correctly? Is there another way to export / import WF (that include Custom workflow Activities with parameters) between environments?We do not want to use the redeployment tool , we jest want to move customization from one environment to another. We have build a deployment program, that simply writes (bulk) the assemblies (Plug-in , Workflows activities …) , other process is to export / import customizations (including Workflows).
Thanks
Itzik BS
Nov 5, 2008
Oct 7, 2008
Deletion Service in CRM 4.0 - No !!!
Apparently, the service that was known as Crmdeletionservice.exe in crm 3.0 not exists in CRM 4.0 !!!
Sep 26, 2008
An error occurred while retrieving Date - Or Http Sessions / Requests Limitation
My issue is in CRM 4.0
My problem was that in forms (edit.aspx) that includes attributes type date, sometimes cause the browser freeze and not responding , after 5 or 6 minutes I gets a global error alert (client - Ok Cancel dialogbox – not modal dialog !!! that Exception Accrued ….) , after hit on OK button I get an alert dialogbox that says "An error occurred while retrieving Date"
I have tried everything, including running the CRMTrace - didn't gets us any ideas …
We getting this exception jest in that cases:All Entities (Custom or not ) with date time (Jest Date Data) attributesAND The value of the date is DAY value <> MONTH value (NOT equal) All cases of date and month that equal like 1/1/yyyy , 2/2/yyyy … there will not be exception and the form will be loaded jest fine.
To make the problem more complicate, I will add the amazing fact that in Browser IE version 7 , this problem not accrued what so ever at all … Please don't respond that all clients should have IE 7 installed – because most of our clients (Intranet) have IE 6 , and I can't change it.
The solution
The solution for my problem, is not about a date format , but it was an issue of limitation of Internet Explorer that limits the number of simultaneous downloads to two downloads, plus one queued download – probably a crm form goes with AJAX to do something with date fields, and that limitation was stop it from working currect.
My solution was to increase that amount by using this :
How to configure Internet Explorer to have more than two download sessions
I'm sure everyone who developing WEB apps will find this article very interesting.
ItzikBS
My problem was that in forms (edit.aspx) that includes attributes type date, sometimes cause the browser freeze and not responding , after 5 or 6 minutes I gets a global error alert (client - Ok Cancel dialogbox – not modal dialog !!! that Exception Accrued ….) , after hit on OK button I get an alert dialogbox that says "An error occurred while retrieving Date"
I have tried everything, including running the CRMTrace - didn't gets us any ideas …
We getting this exception jest in that cases:All Entities (Custom or not ) with date time (Jest Date Data) attributesAND The value of the date is DAY value <> MONTH value (NOT equal) All cases of date and month that equal like 1/1/yyyy , 2/2/yyyy … there will not be exception and the form will be loaded jest fine.
To make the problem more complicate, I will add the amazing fact that in Browser IE version 7 , this problem not accrued what so ever at all … Please don't respond that all clients should have IE 7 installed – because most of our clients (Intranet) have IE 6 , and I can't change it.
The solution
The solution for my problem, is not about a date format , but it was an issue of limitation of Internet Explorer that limits the number of simultaneous downloads to two downloads, plus one queued download – probably a crm form goes with AJAX to do something with date fields, and that limitation was stop it from working currect.
My solution was to increase that amount by using this :
How to configure Internet Explorer to have more than two download sessions
I'm sure everyone who developing WEB apps will find this article very interesting.
ItzikBS
Sep 22, 2008
How to manage configuration settings in workflow Activities / Plug-in in CRM 4.0
How to manage configuration settings in workflow Activities / Plug-in in CRM 4.0
This way(that recommended from Microsoft that comes with the registration tool) of manage configuration keys is very "strange" and most likely it is a "default option" – it seems to be that the team who developed the product (that there no question about it – it is a distributed system and it should act like it) forgotten what most developers will have to use: The ability to manage configuration keys and value that can be read and access from any context (Sync plug-in, A-Sync , Workflow activities or from yours ISV web site … ).
I don't want to paste for every step I have registered a string of XML , I want the ability to hold my keys in one place \ file \ table and that I can access it from any code that runs from at any context.
From my and our experience there few ways:
1. Use the default way and read keys from the string that provided with the registration steps Disadvantages: see the above …
2. Store it in a CRM entity and read it every time from the CRMDisadvantages: There is no Cache managed and every call or read key will get it by the SDK and from the DB – very low performance!!!
3. Using / Build a Central Configuration Manager that can be read and access at any time from any place and context.This can be achieve by developing a configuration utility that work against .Config file for any system and module.you can to the follow:Create a file name myApp.config and Store it in particular folderPoint the file from the local Machine.config.It will be available from any context , and by default it manage Cache with file dependency.
link to discussion with this issue:
http://blogs.msdn.com/crm/archive/2008/10/24/storing-configuration-data-for-microsoft-dynamics-crm-plug-ins.aspx
Thanks
ItzikBS
This way(that recommended from Microsoft that comes with the registration tool) of manage configuration keys is very "strange" and most likely it is a "default option" – it seems to be that the team who developed the product (that there no question about it – it is a distributed system and it should act like it) forgotten what most developers will have to use: The ability to manage configuration keys and value that can be read and access from any context (Sync plug-in, A-Sync , Workflow activities or from yours ISV web site … ).
I don't want to paste for every step I have registered a string of XML , I want the ability to hold my keys in one place \ file \ table and that I can access it from any code that runs from at any context.
From my and our experience there few ways:
1. Use the default way and read keys from the string that provided with the registration steps Disadvantages: see the above …
2. Store it in a CRM entity and read it every time from the CRMDisadvantages: There is no Cache managed and every call or read key will get it by the SDK and from the DB – very low performance!!!
3. Using / Build a Central Configuration Manager that can be read and access at any time from any place and context.This can be achieve by developing a configuration utility that work against .Config file for any system and module.you can to the follow:Create a file name myApp.config and Store it in particular folderPoint the file from the local Machine.config.It will be available from any context , and by default it manage Cache with file dependency.
link to discussion with this issue:
http://blogs.msdn.com/crm/archive/2008/10/24/storing-configuration-data-for-microsoft-dynamics-crm-plug-ins.aspx
Thanks
ItzikBS
Retrieving Many-to-Many Relationships
Hi,
I have Entity A that link to Entity A (Link to itself) with Many-to-Many Relationships,For example: I have entity "new_role" and it's can represent a role that is stands for one role , or it's can represent a Team that team can be 2 or more roles (Many-to-Many Relationships to the same entity).
I have try to retrieve (SDK) data by using the LinkFromEntityName but it's work fine jest between 2 difference entities – when I try to run the same logic to Many-to-Many Relationships to the same entity I got the Error that the attribute in the LinkFromAttributeName properties is not exists in the linkek entity
Here is the sample from SDK:
// Set up the CRM Service.
CrmAuthenticationToken token = new CrmAuthenticationToken();
token.AuthenticationType = 0;
token.OrganizationName = "AdventureWorksCycle";
CrmService service = new CrmService();
service.Url = ""http://:/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
// Get the GUID of the current user.
WhoAmIRequest who = new WhoAmIRequest();
WhoAmIResponse whoResp = (WhoAmIResponse)service.Execute(who);
Guid userid = whoResp.UserId;
// Create a query expression.
QueryExpression qe = new QueryExpression();
qe.EntityName = "role";
qe.ColumnSet = new AllColumns();
// Create the link entity from role to systemuserroles.
LinkEntity le = new LinkEntity();
le.LinkFromEntityName = "role";
le.LinkFromAttributeName = "roleid";
le.LinkToEntityName = "systemuserroles";
le.LinkToAttributeName = "roleid";
LinkEntity le2 = new LinkEntity();
le2.LinkFromEntityName = "systemuserroles";
le2.LinkFromAttributeName = "systemuserid";
le2.LinkToEntityName = "systemuser";
le2.LinkToAttributeName = "systemuserid";
// Create the condition to test the user ID.
ConditionExpression ce = new ConditionExpression();
ce.AttributeName = "systemuserid";
ce.Operator = ConditionOperator.Equal;
ce.Values = new object[]{userid};
// Add the condition to the link entity.
le2.LinkCriteria = new FilterExpression();
le2.LinkCriteria.Conditions = new ConditionExpression[]{ce};
// Add the from and to links to the query.
le.LinkEntities = new LinkEntity[]{le2};
qe.LinkEntities = new LinkEntity[]{le};
// Retrieve the roles and write each one to the console.
BusinessEntityCollection bec = service.RetrieveMultiple(qe);
foreach (BusinessEntity e in bec.BusinessEntities)
{
role r = (role)e;
Console.WriteLine(r.name.ToString());
}
Thanks
ItzikBS
I have Entity A that link to Entity A (Link to itself) with Many-to-Many Relationships,For example: I have entity "new_role" and it's can represent a role that is stands for one role , or it's can represent a Team that team can be 2 or more roles (Many-to-Many Relationships to the same entity).
I have try to retrieve (SDK) data by using the LinkFromEntityName but it's work fine jest between 2 difference entities – when I try to run the same logic to Many-to-Many Relationships to the same entity I got the Error that the attribute in the LinkFromAttributeName properties is not exists in the linkek entity
Here is the sample from SDK:
// Set up the CRM Service.
CrmAuthenticationToken token = new CrmAuthenticationToken();
token.AuthenticationType = 0;
token.OrganizationName = "AdventureWorksCycle";
CrmService service = new CrmService();
service.Url = ""http://
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
// Get the GUID of the current user.
WhoAmIRequest who = new WhoAmIRequest();
WhoAmIResponse whoResp = (WhoAmIResponse)service.Execute(who);
Guid userid = whoResp.UserId;
// Create a query expression.
QueryExpression qe = new QueryExpression();
qe.EntityName = "role";
qe.ColumnSet = new AllColumns();
// Create the link entity from role to systemuserroles.
LinkEntity le = new LinkEntity();
le.LinkFromEntityName = "role";
le.LinkFromAttributeName = "roleid";
le.LinkToEntityName = "systemuserroles";
le.LinkToAttributeName = "roleid";
LinkEntity le2 = new LinkEntity();
le2.LinkFromEntityName = "systemuserroles";
le2.LinkFromAttributeName = "systemuserid";
le2.LinkToEntityName = "systemuser";
le2.LinkToAttributeName = "systemuserid";
// Create the condition to test the user ID.
ConditionExpression ce = new ConditionExpression();
ce.AttributeName = "systemuserid";
ce.Operator = ConditionOperator.Equal;
ce.Values = new object[]{userid};
// Add the condition to the link entity.
le2.LinkCriteria = new FilterExpression();
le2.LinkCriteria.Conditions = new ConditionExpression[]{ce};
// Add the from and to links to the query.
le.LinkEntities = new LinkEntity[]{le2};
qe.LinkEntities = new LinkEntity[]{le};
// Retrieve the roles and write each one to the console.
BusinessEntityCollection bec = service.RetrieveMultiple(qe);
foreach (BusinessEntity e in bec.BusinessEntities)
{
role r = (role)e;
Console.WriteLine(r.name.ToString());
}
Thanks
ItzikBS
Subscribe to:
Posts (Atom)