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
0
Answers
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
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.
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
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;