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 Partner is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience, 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 caters to a wide range of Sage X3, a Sage Business Cloud Solution, offerings. Our unique GUMU integrations include Sage X3 for Sage CRM, Salesforce.com, Dynamics 365 CRM and Magento eCommerce along with Implementation and Technical Support worldwide for Sage X3. Currently we are Sage X3 Implementation Partner in East Africa, Middle East, Australia, Asia, US, UK. We also offer best-in-class Sage X3 customization and development services, integrated applications such as POS | WMS | Payment Gateway | Shipping System | Business Intelligence | eCommerce and have developed add-ons such as Catch – Weight and Letter of Credit and India Legislation for Sage X3 to Sage business partners, end users and Sage PSG worldwide.
Greytrix is a recognized Sage champion ISV Partner for GUMU Sage X3 – Sage CRM integration also listed on Sage Marketplace; GUMU
integration for Sage X3 – Salesforce is a 5-star rated app listed on Salesforce AppExchange and GUMU
integration for Dynamics 365 CRM – Sage ERP listed on Microsoft AppSource.
For more information on Sage X3 Integration and Services, please contact us at x3@greytrix.com, We will like to hear from you.