Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

I got Action in page extension -Reference to symbol 'Release' is ambiguous.

Posted on by Microsoft Employee

Hi,

I wanted to add a new field Status RPE in Purchase header Table and update this field when Release and Reopen actions are clicked.

So used code In AL

I could write for Reopen Action but not for Release . May I knoe how to solve this.

Thanks

Ruvini.

*This post is locked for comments

  • Kishor T Profile Picture
    Kishor T 60 on at
    RE: I got Action in page extension -Reference to symbol 'Release' is ambiguous.

    OnAfterGetRecord( ) and OnModifyRecord( )  Wright on below code 

    IF REC.Status = Status::Released then Begin

       IF PurchaseOrderRec.GET("Document Type", "No.") Then Begin

        PurchaseOrderRec."Status RPE":= true;

        PurchaseOrderRec.MODIFY;

    END;      

    END ELSE Begin

      IF   PurchaseOrderRec.GET("Document Type", "No.") Then Begin

          PurchaseOrderRec."Status RPE":= False;

          PurchaseOrderRec.MODIFY; 

    END;

    END;  

    (or)

     Wright code in Release and Reopen button.

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: I got Action in page extension -Reference to symbol 'Release' is ambiguous.

    Why you write a code in the OnAfterAction event? It's not so good writing a code in a page extension.

    My suggestion is to subscribe the OnAfterValidate event of the Status field and then here write your code by checking the status:

    if Status = Status::Released then

     //...

    else

     //...

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: I got Action in page extension -Reference to symbol 'Release' is ambiguous.

    Can you tell me how to do

    what I try is this

    actions

      {    

          modify(Reopen)

          {

             trigger OnAfterAction();

             begin

                  PurchaseOrderRec.GET("Document Type", "No.");  

                  PurchaseOrderRec."Status RPE":= true;

                  PurchaseOrderRec.MODIFY;        

             end;

          }

          modify(Release)

          {

              trigger OnAfterAction();

             begin

                  PurchaseOrderRec.GET("Document Type", "No.");  

                  PurchaseOrderRec."Status RPE":= false;

                  PurchaseOrderRec.MODIFY;                            

             end;

          }

      }

    But cannot use Release.Reopen works fine

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: I got Action in page extension -Reference to symbol 'Release' is ambiguous.

    My code is

    actions

       {    

           modify(Reopen)

           {

              trigger OnAfterAction();

              begin

                   PurchaseOrderRec.GET("Document Type", "No.");  

                   PurchaseOrderRec."Status RPE":= true;

                   PurchaseOrderRec.MODIFY;        

              end;

           }

           modify(Release)

           {

               trigger OnAfterAction();

              begin

                   PurchaseOrderRec.GET("Document Type", "No.");  

                   PurchaseOrderRec."Status RPE":= false;

                   PurchaseOrderRec.MODIFY;                            

              end;

           }

       }

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: I got Action in page extension -Reference to symbol 'Release' is ambiguous.

    I cannot see your code (image is broken?) but you can create an event subscriber to the OnAfterValidate of the Purchase Header's Status field and act accordingly.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans