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 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.