To include the document status of an invoice when printing the record, user needs to create a custom transaction body field and a workflow to copy the value the standard document status field into the custom field.
To create the custom transaction body field, perform the following steps:
1. Navigate to Customization > Lists, Records & Fields > Transaction Body Fields > New.
2. Set the following:
Label: Provide a Label (e.g. Invoice Status)
Type: Free-Form Text
Store Value: True
Applies To: Sale
Display Subtab: Main
Display Type: Inline Text
3. Click Save and Apply to Forms.
4. In the Apply Custom Field to Forms page, select the invoice form where the field is to be applied. Check Show and Print checkboxes for the form selected.
Next part is to create the workflow. To create the workflow, perform the following steps:
Note: Make sure that SuiteFlow is enabled in Setup > Company > Enable Features > SuiteFlex tab > SuiteScript section, before proceeding.
1. Navigate to Customization > Scripting > Workflows > New.
2. Set the following:
Name: Provide a Name (e.g. Set Document Status)
Record Type: Transaction
Sub Types: Invoice
Released Status: Released
Initiation: On Create, On Update
3. Click Save.
4. In the new workflow record page, click New State.
5. Provide a State Name.
6. Click Save.
7. Click the State created.
8. In the Actions tab, click New Action.
9. Set the following:
Type: Set Field Value
Trigger On: After Record Submit
Field: Invoice Status (custom field)
From Field > Record: Current Record
From Field > Field: Document Status
10. Click Save.
To test, create or update existing invoice. Print the invoice to verify that custom field value appears in the printout of the invoice.
Note: Enhancement 128977 has been filed for the ability to print the System generated status of the invoice when printing the invoice.
No comments:
Post a Comment