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

  • RE: Warning message on Purchase Order

    Thanks for update

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

    Regards,

    Aditi

  • RE: Warning message on Purchase Order

    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

  • Verified answer
    mmv Profile Picture
    mmv 11,467 on at
    RE: Warning message on Purchase Order

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

  • RE: Warning message on Purchase Order

    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;

  • mmv Profile Picture
    mmv 11,467 on at
    RE: Warning message on Purchase Order

    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?

  • Verified answer
    Mohana Yadav Profile Picture
    Mohana Yadav 60,161 Super User 2025 Season 1 on at
    RE: Warning message on Purchase Order

    Please check the code you have added for above functionality.

    it seems something to do with customized code only.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans