MorfeusTech

Invoice From Transfer Order

Create Invoice From Transfer Order

For the client’s convenience, we were tasked to add a button on the Transfer Order form that creates a new Invoice record. The client also requested that pertinent fields from the Transfer Order be automatically copied onto the newly-opened Invoice record, including the inventory detail. This button must only be available for Transfer Orders with the “Received” status.

To accomplish this task, we first created the following custom fields in Customization > Lists, Records, & Fields > Transaction Body Fields > New (custbody is automatically prepended on the field IDs):

  • custbody_customer_name
  • custbody_note
  • custbody_source_transfer_order
  • custbody_created_invoice

We created a client script and a user event script for both the Transfer Order and the Invoice, as follows:

Client Script (Transfer Order)

User Event Script (Transfer Order)

Client Script (Invoice)

User Event Script (Invoice)

Expected Behaviors

  1. On the Transfer Order, only TOs marked as “Received” will have the button available. The button will be unavailable for TOs marked otherwise.
  2. The user will be prompted that the invoice is being created upon clicking the button.
  3. If the Invoice was successfully created, a notification will appear above the form with a link to the newly-created Invoice.
  4. The created Invoice will also be accessible from the TO under the Related Records subtab.
  5. If an Invoice has already been generated for a TO, the user will be alerted and provided a link to the relevant Invoice.
  6. The Invoice fields are automatically populated upon creation. The Inventory Detail for the items will also be accessible on the Invoice.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top