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 :
Microsoft Dynamics AX (Archived)

Can anyone give any details about how to send email to customers with their open balance statement?

(0) ShareShare
ReportReport
Posted on by 60

My company wants to set Dynamics AX 4.0 that any customer with a balance equal to or over $2500.00 and is past due by 30 days to send an email to them with the invoice. Can anyone either explain how to do this or give me a direction to research and resolve this task? I understand that there is some STMP work to do and also deals with Financials and maybe using AR --> Customer --> Balance and see what code is there, or the Transaction form. Sample logic or code I recieved is:

  //checksum if order is oke.
        salesTotals = SalesTotals::construct(salesTable, SalesUpdate::All);
        salesTotals.calc();

        totalBalance = BBaytFunction::ConvertDecimalValue2Real(salesOrder.get_GrossAmount());
        salesTotal = salesTotals.totalBalance() + salesTotals.totalMarkup() + salesTotals.totalTaxAmount();
        totalBalanceDelta = totalBalance - salesTotal;
        if(totalBalanceDelta != 0)
        {
            Global::error(strfmt("SalesTotal mismatch on SalesId %1 Delta: %2 of Gross amount: %3", salesTable.SalesId, totalBalanceDelta, totalBalance));
        }

Now I am very new to this product and am trying to get a better understanding. Any additional assistance or guidance to any help on this matter would be greatly appreciated.

 Thanks!

*This post is locked for comments

I have the same question (0)
  • user5555 Profile Picture
    7,437 on at

    Hi,

    Have your partner setup the smtp part in AX or look for a code sample on this forum on the stmp class. You can either use a .net component or a com component which should be installed on the client. In your case I would use the default smtp (but I actually do not know the status in AX if it can be used or that it is just a checkbox 'send electronically'.). If you would need to code I would code for the .net smtp setup since you can run it on the server, which you most likely want to do.

    The report: in AR there is a report 'open balance' I think. There you can take out the code on the open balance of the cusomer or in the form AR -> Customer Details form.

    I think you make live even easier by just sending out an email with a default subject and a default body in which you state the open balance of the customer and the date the balance is measure. That will save you form sending and building + attaching a report.

    Also remind that you should be aware that you never should send > 1000 open balances at once since you might get detected as spam. In that case use Exchange or other 'queue' for processing slowly your emails.

    J.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans