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 :
Finance | Project Operations, Human Resources, ...
Answered

Automate bank reconciliation matching rule process in D365FO

(0) ShareShare
ReportReport
Posted on by 2,114

Hi Techies,

I am working on one requirement where I am automating a complete bank reconciliation process. So, from creating the customer/vendor transactions till bank reconciliation header I have automated it. Now once the header is created we need to mark the matching transactions with statement to reconcile them. We need to run the matching rules for this.

Does anyone already worked on this, how we can trigger this step in separately written classes by providing the required details. 

pastedimage1604914416368v1.png

As I am digging more in deep, any response is appreciated!

Thanks.

I have the same question (0)
  • Sangram Shinde Profile Picture
    2,114 on at

    I am checking below two classes, seems these will help-

    BankReconciliationmatchRuleAutoBatch

    BankReconMatchingRuleAutoProcessor

    Regards,

    Sangram Shinde

  • Verified answer
    Sangram Shinde Profile Picture
    2,114 on at

    So it worked using below code, the original method(run()) is from BankReconciliationMatchRuleAutoBatch class. Will parameterize rule set and rule id.

     public void runMatchingRules(BankReconciliationHeader   _bankReconHeader)
        {
            BankReconciliationMatchRuleSetId    matchRuleSetId;
            BankReconciliationMatchRuleId       matchRuleId;
            matchRuleSetId = "";
    
            if (_bankReconHeader)
            {
                if (matchRuleSetId)
                {
                    BankReconMatchingRuleAutoProcessor::processMatchRuleSet(
                        _bankReconHeader.RecId,
                        BankReconciliationMatchRuleSet::findBySetId(matchRuleSetId).RecId);
                }
                else if (matchRuleId)
                {
                    BankReconMatchingRuleAutoProcessor::processMatchRule(
                        _bankReconHeader.RecId,
                        BankReconciliationMatchRule::findByRuleId(matchRuleId).RecId);
                }
            }
        }

    Regards,

    Sangram

  • MATTGUO Profile Picture
    22,349 Moderator on at

    Thanks for coming back with the solution. Verified your answer.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans