Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Is there any way to apply payment automatically in business central

(0) ShareShare
ReportReport
Posted on by 55

Hi I am working on business central on prem 18. I wanted to know is there any way to apply payments automatically in business central. We integrated web shop with business central, whenever the order comes from webshop into business central then we create a payment entry through code. we want to apply this payment automatically whenever the sales order gets converted into posted sales invoice. I just wanted to know that is there any standard way in business central to automatically close the payment? 

  • Business central com Profile Picture
    55 on at
    RE: Is there any way to apply payment automatically in business central

    Thanks, Inge for this much concern. I tried to uninstall my extension and after that the payment is not being applied automatically. So, the crux is my custom code is applying payment automatically and I need to figure it out.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,021 Moderator on at
    RE: Is there any way to apply payment automatically in business central

    Then you need to look at extension management to see what other apps are installed.

    Look especially for PTE apps.

  • Business central com Profile Picture
    55 on at
    RE: Is there any way to apply payment automatically in business central

    unfortunately, all job queues are already on hold :(

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,021 Moderator on at
    RE: Is there any way to apply payment automatically in business central

    Check the job queues to see if there are any schedule jobs there that might cause this.

  • Business central com Profile Picture
    55 on at
    RE: Is there any way to apply payment automatically in business central

    Yes, that is what I am trying to figuring it out.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,021 Moderator on at
    RE: Is there any way to apply payment automatically in business central

    Code looks fine.

    Can there be any other customization in the "old company" that cause this.

    Because we have been through the config you can do in the standard system, being the payment method and the apply to method on the customer.

  • Business central com Profile Picture
    55 on at
    RE: Is there any way to apply payment automatically in business central

    Hi here is the code which creates payment entry when sales order created in business central

    createAndPostPayment.txt

  • Business central com Profile Picture
    55 on at
    RE: Is there any way to apply payment automatically in business central

    Yes, I can share the code with you but my mind is not accepting that the same code is working on fresh company but not working on the old company. That's why, I think so there are some configuration which makes this happen.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,021 Moderator on at
    RE: Is there any way to apply payment automatically in business central

    Are you sure you do not fill in any apply to information in the journal? There are fields in the journal for both apply to document type and apply to document no.

    Maybe you can share the code that creates the journal lines?

    Or maybe your invoice is referencing the payment when the invoice is posted?

  • Business central com Profile Picture
    55 on at
    RE: Is there any way to apply payment automatically in business central

    Yes, but we create payment when sales order creates in business central. but how a payment can be applied when it is posted from gen journal and no invoice is created or posted yet ?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March 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... 294,095 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans