Promoted categories after upgrade to NAV2017

ACaignie
Member Posts: 91
Hello,
We are upgrading from NAV 2009RTC to 2017 cu11, and we discovered have an annoying "problem" during testing.
It seems that if a user has changed his ribbon in 2009, then after conversion the promoted categories are displayed as "Category4", "Category5" ... instead of the values entered in the page designer.
At this point the user has to restore the defaults to get the proper captions back, losing all his customisations.
Does anyone know how this could be solved (without clearing the metadata tables).
kind regards,
Andy Caignie
We are upgrading from NAV 2009RTC to 2017 cu11, and we discovered have an annoying "problem" during testing.
It seems that if a user has changed his ribbon in 2009, then after conversion the promoted categories are displayed as "Category4", "Category5" ... instead of the values entered in the page designer.
At this point the user has to restore the defaults to get the proper captions back, losing all his customisations.
Does anyone know how this could be solved (without clearing the metadata tables).
kind regards,
Andy Caignie
0
Best Answer
-
Removing the PromotedActionCategoriesOrder seems to work without any problems.
Here is the solution I used to remove the node, perhaps someone else can use it.
LOCAL Function UpdateUserMetaData()
Variables:
lrecUserMetaData= record User Metadata,
lcunFileMgt = codeunit File Management,
ltServerFile = text
lrecUserMetaData.RESET();
IF lrecUserMetaData.FINDSET( TRUE, FALSE) THEN BEGIN
ltServerFile := lcunFileMgt.ServerTempFileName( 'XML');
REPEAT
RemovePromotedCategories( lrecUserMetaData, ltServerFile);
UNTIL lrecUserMetaData.NEXT() = 0;
END;
LOCAL Function RemovePromotedCategories(VAR precUserMetaData : Record "User Metadata";ptServerFile : Text)
Variables:
lnetXMLDocument = dotnet System.Xml.XmlDocument.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
lnetNode = dotnet System.Xml.XmlNode.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
lnetNodeList = dotnet System.Xml.XmlNodeList.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
ltName = text
precUserMetaData.CALCFIELDS( "Page Metadata Delta");
IF NOT precUserMetaData."Page Metadata Delta".HASVALUE() THEN
EXIT;
precUserMetaData."Page Metadata Delta".EXPORT( ptServerFile);
lnetXMLDocument := lnetXMLDocument.XmlDocument();
lnetXMLDocument.Load( ptServerFile);
lnetNode := lnetXMLDocument.DocumentElement;
lnetNodeList := lnetXMLDocument.SelectNodes( 'delta/changes/update');
FOREACH lnetNode IN lnetNodeList DO BEGIN
IF UPPERCASE( cunXMLDomMgt.GetAttributeValue( lnetNode, 'name')) = 'PROMOTEDACTIONCATEGORIESORDER' THEN BEGIN
lnetNode.ParentNode().RemoveChild( lnetNode);
lnetXMLDocument.Save( ptServerFile);
precUserMetaData."Page Metadata Delta".IMPORT( ptServerFile);
precUserMetaData.MODIFY();
COMMIT;
EXIT;
END;
END;
0
Answers
-
The data is stored as blob field and thus cannot be changed or fixed. The blob could be an xml format, but I'm not sure. You can export it to a file and take a look at it0
-
Just went live with a 2017 upgraded from 2009 RTC yesterday.
I deleted all personalizations and customizations from the db before upgrade. Too much have change, and these things are easy set again. So that's unnecessary problems to throw into the mix.Follow me on my blog juhl.blog0 -
Hi Juhl,
Our users have done a lot of customizations, and these have to be kept (not my decision). I have done some testing, and it seems that if I delete the “PromotedActionCategoriesOrder” node from the page metadata this is solved.
Does anyone else have experience with this?
Kind regards,
Andy
0 -
Removing the PromotedActionCategoriesOrder seems to work without any problems.
Here is the solution I used to remove the node, perhaps someone else can use it.
LOCAL Function UpdateUserMetaData()
Variables:
lrecUserMetaData= record User Metadata,
lcunFileMgt = codeunit File Management,
ltServerFile = text
lrecUserMetaData.RESET();
IF lrecUserMetaData.FINDSET( TRUE, FALSE) THEN BEGIN
ltServerFile := lcunFileMgt.ServerTempFileName( 'XML');
REPEAT
RemovePromotedCategories( lrecUserMetaData, ltServerFile);
UNTIL lrecUserMetaData.NEXT() = 0;
END;
LOCAL Function RemovePromotedCategories(VAR precUserMetaData : Record "User Metadata";ptServerFile : Text)
Variables:
lnetXMLDocument = dotnet System.Xml.XmlDocument.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
lnetNode = dotnet System.Xml.XmlNode.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
lnetNodeList = dotnet System.Xml.XmlNodeList.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
ltName = text
precUserMetaData.CALCFIELDS( "Page Metadata Delta");
IF NOT precUserMetaData."Page Metadata Delta".HASVALUE() THEN
EXIT;
precUserMetaData."Page Metadata Delta".EXPORT( ptServerFile);
lnetXMLDocument := lnetXMLDocument.XmlDocument();
lnetXMLDocument.Load( ptServerFile);
lnetNode := lnetXMLDocument.DocumentElement;
lnetNodeList := lnetXMLDocument.SelectNodes( 'delta/changes/update');
FOREACH lnetNode IN lnetNodeList DO BEGIN
IF UPPERCASE( cunXMLDomMgt.GetAttributeValue( lnetNode, 'name')) = 'PROMOTEDACTIONCATEGORIESORDER' THEN BEGIN
lnetNode.ParentNode().RemoveChild( lnetNode);
lnetXMLDocument.Save( ptServerFile);
precUserMetaData."Page Metadata Delta".IMPORT( ptServerFile);
precUserMetaData.MODIFY();
COMMIT;
EXIT;
END;
END;
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions