Ir al contenido principal

Entradas

Mostrando entradas de marzo, 2019

How to validate alphanumeric date field in Sage X3?

There can be occasions when you want to accept date input in an alphanumeric field in grid. As, alphanumeric field does not have calendar control so you need to validate the entry section by writing our own code. Here we are describing how to achieve same via code. Below is the code we have written after changing event of alphanumeric date field Subprog AM_DATASW10(VALEUR) Variable Char    VALEUR() Global Char XDATE:XDATE = ” Call DATEVALIDATE(VALEUR) If VALEUR <> ” and XDATE = ”   mkstat=2 ELSE    [M:ZTEC]DATASW10(nolign-1)=xdate    Affzo [M:ZTEC]DATASW10(nolign-1) Endif XDATE = ” End ##################################################################################### subprog datevalidate(VALEUR) global char xdate:xdate=” local char LC2:LC2=” xdate = format$(“DD2”,VALEUR) LC2= format$(“DD2″,”gfdbf”) if xdate = LC2  infbox ‘Invalid date’  xdate = ” endif end ####################################################################

Commands to Mask fields or values in Sage X3

While we are doing some customization or any add-on development there are requirements where we need to Enable/Grey out or Refresh or Delete the values of the fields on the screen. To achieve this Sage X3 provides some keywords which are the topics of discussion within this blog. Diszo : Diszo is used to grey out or disable the fields within the mask. Actzo : Actzo is used to make the fields enable or enable the entire mask. Affzo : Affzo is used to refresh the values within some or all of the zones in a mask. Effzo : Effzo is used to delete the values of the fields in the mask. Raz : Raz will clear the mask or a single field/section within the Mask. For e.g we want to execute the Commands mentioned above on the field “TEST” available on the screen “MTEST”, please check the code samples mentioned below: Code: Disable the field: If <Condition> Diszo [M :  MTEST] TEST Endif Enable the field:  If <Condition> Actzo [M : MTEST ] TEST Endif Refresh the field/mask:

Install and Configure SMTP in IIS 6 by using GMAIL Account

You can use your gmail as relay server to allow email to be sending out from X3 workflow. To enable it, you need to turn on 'Allow less secure apps' in your gmail account setting. In order to use SMTP relay server Windows Server 2012 , you need to enable SMTP server and Telnet Client in Add roles and features wizard. Once SMTP installed, go to IIS6.0 Manager, select the IP Address. Go to Delivery tab, click on outbound security button. Enter your gmail account and password. Tick TLS encrytion.  On same Delivery tab, click on outbound connection button, change the port to 587.  Click on Advance button, change the smart host to smtp.gmail.com. You may reset IIS and start SMTP virtual server once it's done. To use Sage X3 workflow emailing, you have to login X3, set up parameters value, configure workflow rules and user assignment. Go to parameter values, select Supervisor > Folder, select Workflow and click Detail in acti

Sage X3 View + Query Tool

This is to show you how to create a View in Sage X3, apply the view in graphical query tool, and displaying it via navigation menu or home page. Scenario: We want to create a query to display product category, product code, statistical group 1, product site, available stock quantities and reject stock quantities of each sites. Create a new Product Quantity View with query below: SELECT ITM.TCLCOD_0, ITM.ITMREF_0, ITM.ITMDES1_0, ITM.TSICOD_0, ITM. TSICOD_1, ITF.STOFCY_0, ITV.PHYSTO_0, ITV.REJSTO_0 FROM ITMMASTER ITM INNER JOIN ITMFACILIT ITF ON  ITF.ITMREF_0 = ITM.ITMREF_0 INNER JOIN ITMMVT ITV ON  ITV.ITMREF_0 = ITF.ITMREF_0 AND ITV.STOFCY_0 = ITF.STOFCY_0 Development > Data and parameters > Views, Query tab: Field tab: Keys tab: Create a second Miscellaneous table View for group 1 (20) with query below. This is to retrieve group 1 text from miscellaneous table. SELECT IDENT2_0, TEXTE_0 FROM SEED.ATEXTRA WHERE IDENT1_0