Import AR credit memo detail lines from history?

I am hoping to streamline my VI script designed to import AR credit memos. If entered manually I only enter CM <Next Invoice>, Customer Number, Apply To Invoice. I am then asked "Do you want to copy invoice information from history?" Clicking Yes allows me to choose to recall the item cost from history or use current cost.

This is a very efficient way to credit an invoice completely. I'm trying to recreate that ease in VI but can't find a way to trigger Sage to pull the line detail from history: I must provide every line of detail myself.

Is there a trick to this, or is it not possible? I'm using Sage 100 Premium 2021.

Thank you!

  • I looked at the object reference information available at Sage 100 File Layouts and Object Reference Documentation - Sage 100 File Layouts and Object Reference for the SO_Invoice_Bus and SO_Invoice_UI classes but I didn't see anything that appears to do what you want in the Bus class.  The UI class has a ChangeApplyToInvoiceNo method that if I trigger manually (it triggers when you change the field value during data entry), then I do get the prompts you mentioned.  However, the Bus classes only has a ValidateApplyToInvoiceNo and it doesn't seem to trigger the prompts.

    With all of this taken into account, I don't believe you can leverage the BOI to do this and it looks like you'll have to provide the line information yourself.

    Maybe someone from Sage can shed some light on it.