Creating a Dynamic Selection Window in Sage X3

By | January 20, 2012

Suppose we need to create a screen comprising a selection text which will dynamically fetch the data from different tables in Sage X3.
Let us proceed with an example as stated below:

The screenshot shown below consists of an option named “Then by” which comprises four different selection options. Each time this option changes, the “From” and “To” selection lookup should have the respective selection data.
For e.g. whenever the Vendor Number is selected the “From” and “To” text should display the Vendor Numbers, whereas, if the option is selected as Nature of Deduction Code the selection window should have Nature of Deduction in “From” and “To” columns.

To achieve this we have created an action code for that respective field as follows:
Path: Development>Process>Action.


Thus, action code is created by the name DOCTYPSEL which consists of CNSDOCSEL as its Standard Process file and DOCTYPSEL as its Action Identifier

Standard Process file consists of the following code:

The SEL_TABLE is the action triggered when we select the data from any table, i.e. when, any user right clicks on the respective text field where selection event is present.

$ACTION
When “DOCTYPSEL”:
Case ACTION
When “SEL_TABLE”: Gosub SEL_TABLE
Endcase
Endcase
Return

As seen in the code above, the action intern calls the procedure SEL_TABLE
program:

$SEL_TABLE
Case TABLE
When “DOCTYPSEL”: Gosub S_SELPIA
Endcase
Return

The above code calls a subprogram by name S_SELPIA.

$S_SELPIA
Local Decimal WTYP           : WTYP = Val (PARAM (1))
Local Char     WNUM (GLONVCR): WNUM = VALEUR
TIT (0)  = mess(18,100,1)
CRITERE = “1=1”
Case [M] VCRTYPSEL
When 1:
If!clalev([F:BPS]) : Local File BPSUPPLIER  [BPS] : End if
Default File [BPS]GSELFAC = 1
OBJET   = “BPS”
Filter [F: BPS]CRITERE = “BPSTYP=1”
When 2:
……………………
Endcase
SENS    = 1
VALEUR = WNUM
DEFPAG = 1
Return
As seen in the above code, the program works on different case statements for each selected parameter.

The following screenshot will give us a better understanding:


Thus, whenever the Vendor Number field is selected, the Selection window would display Vendor Numbers. similarly, if the Nature of Deduction is selected, it would thus select the Nature of Deduction data in Sage X3 [as seen in the above image].

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 CRMSalesforce.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 Sales Commission App for Sage X3 simplifies commission calculations and postings on sales transactions.

The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for processing and execution of application programs at the click of a button.

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 would like to hear from you.