Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Answered

BC24 Purchase Invoice approval workflow

(1) ShareShare
ReportReport
Posted on by 4
BC24 how can we set up below?
 
Purchase Invoice with line type G/L account, has to go through the regular approval flow (same as a purchase order)
 
Purchase invoice where we use the functionality "get receipt lines" we don't want to go through the approval flow as the lines are coming from a PO which already went through the approval flow
 
 
  • Suggested answer
    Valentin Castravet Profile Picture
    Valentin Castravet 25,794 Super User 2025 Season 1 on at
    BC24 Purchase Invoice approval workflow
    Great! I'm happy to help!
     
  • MU-20110937-0 Profile Picture
    MU-20110937-0 4 on at
    BC24 Purchase Invoice approval workflow
    Dear Valentin,
     
    Thank you so much for taking the time to answer my question, much appreciated. I have configured it exactly as you described and it works perfectly. Once again, thank you so much for you assistance.
     
    Kind regards,
     
    Mirella
  • Verified answer
    Valentin Castravet Profile Picture
    Valentin Castravet 25,794 Super User 2025 Season 1 on at
    BC24 Purchase Invoice approval workflow
    You can configure and use the standard Purchase Invoice Approval workflow by adding one condition/filter.
     
    Set the workflow to activate only for purchase invoices where the purchase line includes a non-empty 'Receipt No.' field. The filter criteria should be set to <>''
     
    This will work out of the box without customization. Only lines added using the Get Receipt Lines function will have a non-empty 'Receipt No.' field. Lines manually added will have this field empty. 
     
     
     
  • Suggested answer
    Ramiz Profile Picture
    Ramiz 474 on at
    BC24 Purchase Invoice approval workflow
    Hi,

    You need an identifier to specify whether to run the approval flow or not.  You can create a boolean field on purchase header and control it with that.

     
    Get Receipt Lines has an event that you can subscribe to update the identifier.
     
    tableextension 50000 "Purchase Header RA" extends "Purchase Header"
    {
        fields
        {
            field(50000; "Need Approval"; Boolean)
            {
                Caption = 'Need Approval';
                InitValue = true;
                DataClassification = CustomerContent;
            }
        }
    }
    
    
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch.-Get Receipt", OnAfterCreateInvLines, '', false, false)]
        local procedure OnAfterCreateInvLines(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line")
        begin
            PurchaseHeader."Need Approval" := false;
            PurchaseHeader.Modify(false);
        end;
     

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

Announcing Our 2025 Season 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,994 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans