How to Display Debit/Credit Caption Next to the Outstanding Amount Field Using Options and Style Settings Without a Background in Sage X3

By | July 30, 2025

One of our clients requested to display the customer’s outstanding amount from the Account Inquiry screen (Financials > Inquiries > Accounts) directly on the Sales Order header screen — along with an indicator showing whether the amount is a Debit or Credit. The goal was to replicate the display format seen in the Account Inquiry screen, where the balance appears alongside a debit/credit caption, as shown below.

New Stuff: Enhancing Sage X3 Reports: The Role of Shared Variables in Crystal Reports

fig1 Account Inquiry – Balance with DebitCredit Indicator
fig1 Account Inquiry – Balance with DebitCredit Indicator

To meet this requirement, we enhanced the Sales Order header screen by adding two fields:

  1. Outstanding Amount
  2. Debit/Credit Status

We have handled the flow of data with the 4GL script, which retrieves the outstanding amount and determines its nature (Debit or Credit) based on the customer’s account balances.
To display the debit/credit caption beside the amount in a clean, non-editable format, we configured the Debit/Credit field in the Screen Dictionary with:

Options: Set to ‘W’ (Displayed as background)
Style: Set to ‘GRAS’

fig2 SOH0 screen
fig2 SOH0 screen

Why We Used ‘W’ (Displayed as Background) and ‘GRAS’ Style Options:

• The ‘W’ option makes the field appear as a read-only label, without borders or input styling, ensuring a clean layout.
• The ‘GRAS’ style (French for “bold”) renders the debit/credit value in bold, making it clearly distinguishable next to the amount.

After implementing the changes, we:

• Saved and validated the Sales Order screen
• Validated the OSOH window
• Validated the Sales Order transaction types from the Setup > Sales module

fig3 output
fig3 output

Conclusion:
By combining Sage X3’s screen field configurations and style settings, and handling the data flow through the 4GL script, we successfully integrated the customer’s outstanding amount and its debit/credit status into the Sales Order header. This enhancement provides users with immediate financial context, improving decision-making and maintaining a clean, professional UI.

[about_us_blog_common]