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

To meet this requirement, we enhanced the Sales Order header screen by adding two fields:
- Outstanding Amount
- 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’

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

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.