While preparing myself for teaching a NAV Development class in over 8 years I stumbled across this issue various times. As the topic was already on my possible-subjects-to-blog-about list for so long it’s clearly time now to write it.
So what’s this about?
Never noticed that when you have developed a report or a page and for one reason or another you have to rename it – i.e. change the object id – that when you call the object from RTC you get the following error message:
The Object Metadata does not exist. Identification fields and values: Object Type=’<object type>‘,Object ID=‘<old object id>’
Needles to say that <object type> indicates the type of the object you are calling. However <old object id> clearly shows the former id of this object even though you are calling the renamed object.
Apparently renaming an CSIDE object does not update the metadata of that object. Having read Lars Lohndorf-Larsen’s post on the NAV Team Blog I first thought the Object Metadata table (2000000071) was missing a record for the renamed object. But no, a record for the renamed object was present. Just to check I deleted the record and tried to call the object again. This clearly raises a different error message:
Object of type <object type> with id <new object id> could not be found.
Note that this message references the new object id!
Nothing special, no rocket science. To get the metadata updated you just have to (re)compile the object, which will update the metadata linked to my object’s metadata record in the Object Metadata table (2000000071).