Ir al contenido principal

Entradas

Mostrando entradas de junio, 2019

How to Disable All Predefined windows button in single line of code

Fuente original:  https://www.greytrix.com/blogs/sagex3/2015/05/30/how-to-disable-all-predefined-windows-button-in-single-line-of-code/ By  Greytrix   |   May 30, 2015 This blog gives you a cheeky way to disable your all the Pre-defined buttons of a window in a single line of code. You may be wondering  “How is it possible?”.Yes,  It is possible with the same function which is used to disable a single button. It could be done by having all your button codes in the virebout function. See the snaps below for better understanding.

Sage X3 how get a list of client running processes

The following Subprog returns into an Integer array the list of all running processes of clients connected to X3 application server. The Subprog needs this two local variables as parameters: XPROCID, an Integer array in which are inserted the numbers of running processes XNUM, an Integer which returns the count of running processes # #Restituisce una lista con tutti gli ID dei processi attivi sul server # Subprog GET_ALLPROCESS ( XPROCID , XNUM ) Variable Integer XPROCID Variable Integer XNUM Local Char RESULT ( 250 ) ( 1 .. dim ( XPROCID ) ) Local Integer STAT Local Char ORDSYS ( 250 ) Local Integer J , I , T Local Char CHAINE ( 250 ) Local Char PROCESS ( 250 ) ORDSYS = "psadx -afghimnopxt -l" - GLANGUE Call SYSTEME2 ( adxmac ( 0 ) , ORDSYS , "" , STAT , RESULT ) From ORDSYS I = 3 XNUM = 0 While I <= STAT - 1 If I >=dim ( RESULT ) Then Call ERREUR ( mess ( 161 , 115 , 1

Sage X3 Create a new CLOB Text

Here how to create a CLOB text Funprog F_CRELOB ( YABRFIC , YTEXTE ) Value Char YABRFIC Value Char YTEXTE Local Char XXRTFTXT ( 250 ) ( 3 ) XXRTFTXT ( 0 ) = "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 MS Sans Serif;}}\viewkind4\uc1\pard\f0\fs17 " XXRTFTXT ( 1 ) = YTEXTE XXRTFTXT ( 2 ) = "\par}" Local Char X_RET Local Integer XXOK Local Char XCHAMPLIEN : XCHAMPLIEN = "YYYY" Global Char YYYY : YYYY = YABRFIC Local Clbfile WWCLOB Local Mask ACLOB [ M :ACL ] Setlob WWCLOB With XXRTFTXT [ M :ACL ] CLOB = WWCLOB Call CRE_CLOB_ACL ( XCHAMPLIEN , XXOK ) From TRTX3TEX Close Local Mask [ M :ACL ] X_RET = YYYY Kill YYYY End X_RET