web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Warning message on Purchase Order

(0) ShareShare
ReportReport
Posted on by

Hello Experts,

Stuck in one scenario need your help i am using NAV 2009 R2  in it  have added one Boolean field in Purchase Header and another Boolean filed in Purchase Line.

If Boolean filed from Header is (ticked) Yes then updating all Boolean filed in Purchase line.

Functionality working fine but when i am clicking on Boolean filed from header one warning message comes up as "Do you want to Rename the record?" if i click on Yes getting error as "You cannot rename a purchase line. (select refresh to discard errors) " and if i click on No then my functionality works properly.

Have googled for this issue and found that if we are trying to update primary key filed from table this warning message comes up. but here i am not updating primary key.

Anyone can suggest solution for this please. Thanks in advance

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mohana Yadav Profile Picture
    61,003 Super User 2025 Season 2 on at

    Please check the code you have added for above functionality.

    it seems something to do with customized code only.

  • mmv Profile Picture
    11,471 on at

    Hi Aditi,

    Is your Boolean field in the Purchase Line a part of the Purchase Line table's primary key?

    Could you paste your code of updating Purchase Line Boolean field?

  • Community Member Profile Picture
    on at

    Hi Mahesh,

    Thanks for the reply.

    Filed from Purchase line is not included in primary key

    PH Boolean filed name - Edit PO Update

    PL Boolean filed name - PO Updated

    Purchase Header page (50) code as below

    Edit PO Updated - OnValidate()

    IF CONFIRM('Do you want to update all PO Updated Lines?') THEN

    CurrPage.PurchLines.FORM.ManagePOUpdate("No.", TRUE);

    Purchase Order Subform page(54) code as below

    ManagePOUpdate(PONO : Code[10];Check : Boolean)

    IF Check = TRUE THEN

    BEGIN

      SETRANGE("Document No.",PONO);

      IF FINDSET THEN

      REPEAT

       "PO Updated":= TRUE;

       MODIFY(TRUE);

      UNTIL NEXT=0;

      CurrPage.UPDATE;

    END;

  • Verified answer
    mmv Profile Picture
    11,471 on at

    Hi,

    The above code has few issues.  My suggestion is why don't you use a Flow Field in the Purchase Line? As you are updating all the lines, it's better to use a flow field to know the Status on the Purchase Header (whether it's updated).

  • Community Member Profile Picture
    on at

    Hi Mahesh,

    Thanks for your reply.

    Requirement is user will tick filed form PH and if it is tick then only lines from PL would update.

    Can you please let me know issues form the code, so i can correct and check.

    Thanks

    Regards,

    Aditi

  • Community Member Profile Picture
    on at

    Thanks for update

    I have resolved the issue by writing Function on Purchase line table instead of Purchase Order Subform page. :)

    Regards,

    Aditi

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans