Dynamics User Group
Since 1995 - The Microsoft Dynamics Online User Community

NAS and Item Rename

rated by 0 users
This post has 5 Replies | 1 Follower

Not Ranked
Male
Posts 6
Points 105
Member since 08-01-2007
dlebech Posted: 01-04-2008 16:12

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 regards
David Lebech
Navi Partner

Top 50 Contributor
Male
Posts 432
Points 3,905
Member since 10-26-2000

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

  • | Post Points: 20
Not Ranked
Male
Posts 6
Points 105
Member since 08-01-2007

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 regards
David

  • | Post Points: 20
Top 50 Contributor
Male
Posts 432
Points 3,905
Member since 10-26-2000

 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:

  1. There is some modification done in OnRename-trigger.
  2. New field created somewhere (in an existing table or a new one), related to the item; when renaming something is clashing.
  3. In NAV versions 3.60 .. 4.0 SP3 OnRename may make a call to codeunit 6205 "Synchronization Management"; I have not looked into that one myself.

 

  • | Post Points: 20
Not Ranked
Male
Posts 6
Points 105
Member since 08-01-2007

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...

Best regards
David

  • | Post Points: 20
Top 50 Contributor
Male
Posts 432
Points 3,905
Member since 10-26-2000

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...?

  • | Post Points: 5
Page 1 of 1 (6 items) | RSS


Copyright Dynamics User Group, 1995-2009, all rights reserved. The Dynamics User Group is not affiliated with Microsoft Corporation.