Hi,
I have a Navision Application Handler (NAS) running every night and I want to rename som item numbers from the Item table. I use the built-in function RENAME but this function gives a dialog popup and the NAS does not like this.
Is there any way to avoid this dialog popup or solve the problem in a another manner?
Best regardsDavid LebechNavi Partner
Which dialog appears? There shouldn't be any if runned by [a simple] code like this:
(reItm and reItmChk variables for table 27; case: rename item number 5 as number 3)
reItm.GET('5');
IF NOT reItmChk.GET('3') THEN IF NOT reItm.RENAME('3') THEN; //Some error occurred
My code looks like yours but I also tried your code without succes. The dialog I am refering to displays a text of something like:"Editing records in item draft buffer" (translated from Danish)And below the text it shows a field which runs through all tables in the company. I guess that this is to prevent corrupted records in the various tables of the database due to the rename of the item?
Any other suggestions?
Best regardsDavid
Do you get a message-box or an error-box? And - did you try to run the code in a report an not a NAS? If running in a report and getting an error-box, then activate the debugger (Tools/Debugger/Activate and check only the Activate-line); when the error is thrown the debugger will pop up showing the line where the error is made.
Anyway - three suggestions:
Hi again,
Thank you for your swift replies. I think we have misunderstood each other. The dialog I am refering to is not an error box nor a message box. It is a window dialog which shows information when renaming a record. The renaming is completed succesfully and there is no problem running my code manually but a NAS cannot handle window dialogs, message dialogs or similar and that is my problem because I need to run my code in a NAS.
I will check the OnRename trigger and search for information about the Synchronization Management...
dlebech:It is a window dialog which shows information when renaming a record
Ahh, that message-window. I don't know how to get rid of hat one; don't think it is possible. Perhaps someone else knows...?