Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Refresh the general journal line while removing applied entries

(2) ShareShare
ReportReport
Posted on by 55
Hi,
 
In the payment journal, if I have a payment line and i apply some entries to it then the payment line amount will update to the sum amount of all the applied entries. 
 
I'm wondering if there is a way directly in Business Central for the opposite to happen. What I mean is I'd like that if I remove some applied entries on the payment line than the sum amount of all the applied entries is recalculated. Is there a setting in Business Central that allows this and if not, is there someone who knows which codeunit is run when applying entries so I could extend it?
 
I'm wondering if it would be possible to simply validate() the line after the entries have been removed to solve this issue?
 
Cordially, 
  • Philippe P Profile Picture
    Philippe P 55 on at
    Refresh the general journal line while removing applied entries
    Well when it comes to the code, i believe it is this procedure that does the update of the amount on the line (Table 81 line 3895) but when I try to extend it and modify it, some field are block for security reason :
    local procedure UpdateApplyToAmount()
        var
            IsHandled: Boolean;
        begin
            IsHandled := false;
            OnBeforeUpdateApplyToAmount(Rec, xRec, CurrFieldNo, IsHandled);
            if IsHandled then
                exit;
     
            if (Amount <> xRec.Amount) and (CurrFieldNo <> 0) then begin
                if ("Applies-to Doc. No." <> '') or ("Applies-to ID" <> '') then
                    SetApplyToAmount;
                if (xRec.Amount <> 0) or (xRec."Applies-to Doc. No." <> '') or (xRec."Applies-to ID" <> '') then
                    PaymentToleranceMgt.PmtTolGenJnl(Rec);
            end;
        end;
  • Suggested answer
    Jun Wang Profile Picture
    Jun Wang 7,440 Super User 2024 Season 2 on at
    Refresh the general journal line while removing applied entries
    that is a good observation. when you unapply entries, the amount does stay the same. 
  • Suggested answer
    Valentin Castravet Profile Picture
    Valentin Castravet 25,190 Super User 2024 Season 2 on at
    Refresh the general journal line while removing applied entries
    No, there is no setting in Business Central that allows this. Perhaps other members can help with the specific codeunit to extend.
     
     
    Valentin Castravet
    Zander ERP Services

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans