Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Answered

Is there any way to apply payment automatically in business central

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? 

Categories:
  • 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
    Inge M. Bruvik 32,744 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.

  • 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
    Inge M. Bruvik 32,744 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.

  • 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
    Inge M. Bruvik 32,744 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.

  • 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

  • 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
    Inge M. Bruvik 32,744 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?

  • 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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,537 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,520 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans