Dynamics AX 2009 - Differentiating between Invoice and Credit Note

I was wondering whether or not it was possible to differentiate between an Invoice and Credit Note when using Dynamics AX 2009? As my understanding is that they get printed the same with the exception that a Credit Note contains negative values? The reason for asking is because I wish to get them out of the system in XML format using the AIF but transform each differently using different XSLT documents

Hi Callum,

The difference which you have mentioned in your post is the only difference.

There’s nothing like credit note separate then sales order. Credit note is based on SO form and tables only.

The can be identified by negative lines on sales order or sales order of type returned order.

Pranav…

Hi Pranav,

Thanks for the reply!

So is there no way I can intercept before them being put in the AIF queue to use a different XSLT document based on whether it contains a negative value or not?

Hi Callum,

I didn’t got your point. What i have understood is that you need to move Sales credit note lines in xml format to other system. The issue is you need to identify the credit note lines. Is this the issue?

Pranav…

Hi Pranav,

Yup. I wish to somehow identify the type of document (Credit or Invoice) to apply an XSLT too when using an Outbound Pipeline for the AIF. They XSLT document I use is dependant on whether its an Invoice or Credit. For example I have 2 XSLT documents I have created, 1 for an Invoice, 1 for a Credit. And I wish to apply one or the other.

Hi Callum,

As per my knowledge, there is no such indicator on the SO that the line is created using credit note. May be other members in the group can help you on this.

However, if i had to customize it then i would like to do a customization. What you can do is that when the SO line is created using credit note, then at the line level you can create a boolean field which will be updated as Yes only when line is created using credit note.

That field should have visible as False in general so that users should not be confused.

Pranav…

If I were to do this modification, how would I use this field and intercept it within the AIF prior to applying the correct XSLT?

Part of it will depend upon your processes and the incercept point. So if, for example, the source was a return order it would be a credit note. Your issue will come if you allow negative lines to be entered on a slaes order, because then there is no difference, at invoice point the system sees the total is negative so changes the invoice text to credit note.

Well I’m not sure when the transform occurs? I’ve added an XSLT document to the Outbound Pipeline so it depends on whether the transform occurs when the document is added to the AIF queue or when the AIF queue is processed using a batch job?