In Sage X3, in customer master user have provision to define multiple addresses with different address codes. So one of our client has requested to add some custom fields on address tab of customer master. And flow it to the Sales order depending on the address code selection on Sales order screen
Suppose user wants to create custom fields say GST Reg. No and PAN No fields and flow it from customer master to sales order screen. To achieve this, we need to follow the below steps:
Step 1:
Create custom fields in SORDER(Sales order) table as well as in Sales order screen and add After Change and After Field events in Delivery Address field as per the below screenshot:
New Stuff: How to restrict automatic signature in workflow

Step 2:
After adding fields in screen validate the Sales Order screen, global validate window and also validate all the transaction types from Setup.
Setup -> Sales -> Orders
Below screenshot is the output of Sales Order screen after field addition:

Step 3:
To flow GST No and PAN No from Customer master to Sales order screen on the basis of Delivery address code we have to add below code in SPESOH script under APRES_MODIF & AVANT_MOD Action:
#################################################################################
If !clalev([F:ZBPC]) Local File BPCUSTOMER[F:ZBPC] : Endif
For[F:ZBPC] where [F:ZBPC]BPCNUM=[M:SOH0]BPCORD
[M:SOH1]ZPANNO=[F:ZBPC]XX1P4PANNO
AFFZO[M:SOH1]ZPANNO
Next
If !clalev([F:ZBPD]) Local File BPDLVCUST[F:ZBPD] : Endif
For[F:ZBPD] where [F:ZBPD]BPCNUM=[M:SOH0]BPCORD AND [F:ZBPD]BPAADD=[M:SOH1]BPAADD
[M:SOH1]ZGSTNO=[F:ZBPD]XX1P4GSTNO
AFFZO[M:SOH1]ZGSTNO
Next
#################################################################################
Similaraly, also assign the values of custom fields in AM_BPAADD & AP_BPAADD actions
In this way developer can add the “GST No” and “PAN No” fields in Sales Order screen and flow data from Customer master on the basis of Customer code and their Delivery address code.
About Us
Greytrix – a globally recognized and one of the oldest Sage Development Partners is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience and expertise, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third-party add-on development, and implementation competence.
Greytrix has some unique integration solutions developed for Sage CRM with Sage ERPs namely Sage X3, Sage Intacct, Sage 100, Sage 500, and Sage 300. We also offer best-in-class Sage ERP and Sage CRM customization and development services to Business Partners, End Users, and Sage PSG worldwide. Greytrix helps in the migration of Sage CRM from Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer. Our Sage CRM Product Suite includes addons like Greytrix Business Manager, Sage CRM Project Manager, Sage CRM Resource Planner, Sage CRM Contract Manager, Sage CRM Event Manager, Sage CRM Budget Planner, Gmail Integration, Sage CRM Mobile Service Signature, Sage CRM CTI Framework.
Greytrix is a recognized Sage Champion Partner for GUMU™ Sage X3 – Sage CRM integration listed on Sage Marketplace and Sage CRM – Sage Intacct integration listed on Sage Intacct Marketplace. The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for the processing and execution of application programs at the click of a button.
For more information on our integration solutions, please contact us at sage@greytrix.com. We will be glad to assist you.