Skip to main content

TypeError: Cannot read property 'Metadata' of undefined at Object.GetOrderType - resolved

Auto Number Workflow: Lessons learned with decimal separators

I read several blog articles how easy it is to use realtime workflow based auto number solution with a new auto number entity.

In one of the recent project I thought I will use this approach instead of a third party solution.
It worked fine but I struggled with this issue:

image

As you can see the value has decimal separators.
So I was upset and thought about how to solve it.
A blog article wrote about how we could change the user and the global format settings to work around this issue.
I did not like this approach neither would my customers like it.

Finally, I smart tip was found on this blog article written by Prashant Shukla:
http://dynamicscrmcoe.com/auto-numbering-real-time-workflows-no-customization-no-add/

Quote:
“To remove the comma from the Auto-Number field (whole number), copy it to a calculated field of Single Line of Text.”

Only thing after the creation of this new field I had to update the workflow to reference the new calculated field which ended in this perfect result:

image

Most articles forget to mention this issue and I thought this would be a nice addendum to all of those.

Comments

Popular posts from this blog

Regarding SPFieldMultiLineText (Add HTML/URL content to a field) programmatically

I recently tried so set some HTML content in a SharePoint list column of type SPFieldMultiLineText.

My first approach was this piece of code:

SPFieldMultiLineText field = item.Fields.GetFieldByInternalName("Associated Documents") as SPFieldMultiLineText; StringBuilder docList = new StringBuilder(); docList.Append(""); foreach (DataRow docRow in addDocs) { DataRow[] parent = dr.Table.DataSet.Tables[0].Select("DOK_ID=" + docRow["DOK_MGD_ID"].ToString()); if (parent != null && parent.Length > 0) { docList.AppendFormat("{1}", parent[0]["FilePath"].ToString(), parent[0]["Title"].ToString()); } } if (docList.Length > 0) { // remove trailing tag docList.Remove(docList.Length-5, 5); } docList.Append(" "); string newValue = docList.ToString(); item[field.Title] = newValue;
What this code does is to get all associated documents to the main document and to add these document uri links to the "Assoc…

Migration of CRM 4.0 to CRM 2011

In this blog I will show you all the steps it took for me to migrate an CRM 4.0 organization to CRM 2011:

1. Created backups of my CRM 4.0 organization DB and report server DB
2. Imported backups on target environment / SQL Server
3. Connected report server instance to my imported CRMReports DB
4. Restored the SSRS encryption key (you need a password for your encryption key file)
5. Within the CRMReports DB in the table "Key" I deleted multiple entries so that it should look like this:
6. Started the Deployment Manager:
7. Started to import organization:

8. Selected my restored CRM 4.0 organization DB
9. Finished auto-mapping of AD-users and replaced one of the old CRM administrator accounts with my current new administrator account (might not be important for you).
10. Clicked next and started the migration.
11. Error appeared:

12:42:11| Error| Exception occured during Microsoft.Crm.Tools.Admin.OrganizationUpgrader: Fehler bei der Aktion Microsoft.Crm.Tools.Admin.UpgradeD…

CRM 2016 SP1: Solution import failed with Solution With Id = 12ac16ec-41d5-1685-a230-0b1c31499250 Does Not Exist

Importing Solutions with the upgrade solution (holding solution) option is still not stable with CRM 2016 SP1 On-Premise.

Ronald Lemmon already posted the same issue on his blog:
http://ronaldlemmen.blogspot.de/2015/11/solution-with-id-86ac16ec-41d7-4685.html

I expected it to be fixed with SP1 but it is still happening every now and then.

With this query and the solution id (guid) of the error message you are able to find records in the ProcessTriggerBase table that reference the guid of a failed import from a holding solution that is not existing in the system anymore.

select * from ProcessTriggerBase where solutionid = 'YOUR_SOLUTION_GUID'
Due to this reference to a solution id not existing in the system you will not be able to import a new version of the target solution to be updated.

What I did and this is probably not a supported solution is to update the guid to the actual target solution that is currently deployed in the system.

To find out the id of the target solution y…