Hide prompting message 'Do you want to rename the record?'

nasheernasheer Member Posts: 78
edited 2007-02-27 in Navision Attain
Dear Friends

I need your advise regarding the below.
When I modify the field that included in the Primary Key of the table,
the system prompts the message 'Do you want to rename the record?'.

Anyone can tell me How I can hide/disable that prompt message.

Thanks & Regards
Nasheer.

Comments

  • SavatageSavatage Member Posts: 7,142
    perhaps you can explain what you are doing.
    These messages have reasons.
  • nasheernasheer Member Posts: 78
    Thanks for your reply.

    I dont want to see the prompting message after modify any of the fields which included in the Primary Key of the table.

    Is there any way to prevent display the message?

    I have customised table with following fields
    Customer No, Name, Date, Time, Action, Status.
    Primary key defineds as Customer No, Date, Time, Status.

    When modify the field Status, I want to prevent display the prompt message.

    Best Regards
  • DenSterDenSter Member Posts: 8,307
    There is no way you can suppress the DBMS warning message. The only way you can simulate (and this is dangerous stuff, since you will screw up data integrity if you don't take care of all related records in your code) is to delete the first one and insert the new one. Something like this:
    NewRecord.TRANSFERFIELDS(OldRecord);
    NewRecord.Status := 'new status value';
    NewRecord.INSERT(FALSE);
    OldRecord.DELETE(FALSE);
    
    You must put FALSE in the trigger, because you will have to program this yourself. You don't want to run the OnDelete trigger, you want to make sure that all records related to the old record now point to the new record.
  • nasheernasheer Member Posts: 78
    Thanks for your reply Mr.Daniel.
  • kinekine Member Posts: 12,562
    You need to use RENAME function to change PK fields on the record.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.