Mostrando entradas con la etiqueta JDE Form. Mostrar todas las entradas
Mostrando entradas con la etiqueta JDE Form. Mostrar todas las entradas

martes, 5 de noviembre de 2019

[JD Edwards] Asign Icon to Cell Grid

Hi Friends,

When we show data in grid in application, it could be very cross and relevants, but often not very attractive. In JDE we can assign icons to cells to make it visually more attractive and to have a more global idea about the information shown.


How do we do this?

On the one hand, we use Set Grid Cell Icon system function, but attention! this function is only availabe in Business Functions NER type. This function has only 2 parameters:



  •  Image File: image selected to show. We position ourselves in the parameters, click on <Image Picker> and select an icon of the available Bitmaps of the system. ¿Could we add custom images? Of course, but for that we would have to add them previously to the system bitmaps.
  •  Icon Tooltip: as tooltip  we can pass a literal text or assign the description of a data dictionary text (type Error Message).


But, How do I assign it to a column?

The first thing we will have to do is modify in the properties of the same column in Display Style is assign Type Icon.

With this option an event is enabled in the column "Grid Cell Display Changed" where we will call our BSFN to display the icon. Of course, remember that it will only be displayed on the web.

Do I have to do this for each icon I want to display?

The answer is depends on how you put it, there are currently numerous standard functions where they are already implemented. As examples:
  • N43S003 - Load Grid Cell Icon
  • N3201990 - Message Center Icons
  • N0900730 - Set Delete Icon
  • N40G1240 - Set Edit Icon
  • N98220 - Set Grid Icon Web
  • N986110B - Set Grid Icon
  • etc
Must of these functions already have input parameters to show some icons or others depending on the input parameters, or else you can create your own BSFN NER Custom!!!

An example of mine to show attachments with a custom structure at the header level:
JD Ewards Grid Cell Icon
JD Ewards Grid Cell Icon

I hope it will be you useful!

Let's go!






[JD Edwards] Asignar Icono a Columna en Grid

Hola amig@s,

Cuando mostramos en una aplicación los datos en un grid, éstos pueden ser muy transcendentales y relevantes pero a menudo no muy atractivo. En JDE podemos asignar iconos a columnas para hacerlo visualmente más atractivo y poder tener de un vistazo una idea más global acerca de la información mostrada.

¿Cómo hacemos ésto?

Por un lado, utilizamos la función de sistema Set Grid Cell Icon, pero atención! ésta función sólo está disponible en Business Functions tipo NER. Ésta función sólo tiene 2 parámetros:



  •  Image File: imagen seleccionada para mostrar. Nos posicionamos en el parámetros, clickamos sobre <Image Picker> y seleccionamos un icono de los Bitmaps disponibles del sistema. ¿Podemos añadir imágenes personalizadas? Por supuesto, pero para ello tendríamos que añadirlas previamente a los bitmaps del sistema.
  •  Icon Tooltip: como tooltip podremos pasar un texto literal o asignar la descripción de un diccionario de texto (tipo Erro Message).


¿Pero cómo se lo asigno a una columna?

Lo primero que tendremos que hacer es modificar en las propiedades de la misma columna en Display Style asignar tipo Icon.

Con ésta opción se nos habilita un evento en la columna "Grid Cell Display Changed" donde llamaremos a nuestra BSFN para mostrar el icono. Por supuesto, recordar que sólo se mostrará en web.

¿Tengo que hacer ésto para cada icono que quiera mostrar?

La respuesta es depende cómo lo plantees, actualmente existen numerosas funciones estándar donde ya están implementadas. Como ejemplos:


  • N43S003 - Load Grid Cell Icon
  • N3201990 - Message Center Icons
  • N0900730 - Set Delete Icon
  • N40G1240 - Set Edit Icon
  • N98220 - Set Grid Icon Web
  • N986110B - Set Grid Icon
  • etc
La mayoría de éstas funciones ya tienen parámetros de entrada para mostrar unos iconos u otros en función de los parámetros de entrada, y sino puedes montarte tu propia BSFN NER Custom!!!

Un ejemplo mío para mostrar anexos con una estructura custom a nivel de cabecera:
JD Ewards Grid Cell Icon
JD Ewards Grid Cell Icon

Espero les sea de utilidad!

Let's go!






viernes, 1 de julio de 2016

[JD Edwards] Insert Javascript Code in Applications

In one of the latest projects, one of the requirements could easily be solved with JavaScript. But there was never inserted JavaScript code in an application of JD Edwards (I have not had this need).

I knew that it's possible insert HTML code in text blocks, but if you can add HTML code then you could embebed JavaScript!!

So, I was investigating and working in it, and I got add JavaScript in my JDE application!!!

Alert JavaScript from JD Edwards

In some post I read about for 8.90 and later versions you must enable security for it, but in my case I need with JD Edwards 9.2.

Code Example:

     evt_HTML_A030
     evt_iSegmentID_INT01
     evt_Message_ALPH
     evt_WebcenterContentLogin_URL
     OPT: Using Defaults
0001 //
0002 // Initialize Variables
0003 //
0004 VA evt_HTML_A030 = ""
0005 VA evt_iSegmentID_INT01 = 1
0006 //
0007 // Notify the tool that the Information text block contains encoded text.
0008 //
0009 Encode(FC Text Block 100, VA evt_HTML_A030, VA evt_HTML_A030)
0010 //
0011 // HTML & Javascript Code
0012 //
0013 //  
0014 VA evt_Message_ALPH = ""Hello JavaScript!!!""
0015 VA evt_HTML_A030 = concat([VA evt_HTML_A030],"<script type="text/javascript">")
0016 VA evt_HTML_A030 = concat([VA evt_HTML_A030],"function abrirVentana(){")
0017 VA evt_HTML_A030 = concat([VA evt_HTML_A030],"alert(")
0018 VA evt_HTML_A030 = concat([VA evt_HTML_A030],concat([VA evt_Message_ALPH],");"))
0019 VA evt_HTML_A030 = concat([VA evt_HTML_A030],"}")
0020 VA evt_HTML_A030 = concat([VA evt_HTML_A030],"</script>")
0021 VA evt_HTML_A030 = concat([VA evt_HTML_A030],"<button onclick="abrirVentana();">")
0022 VA evt_HTML_A030 = concat([VA evt_HTML_A030],"Alert</button>")
0023 VA evt_HTML_A030 = concat([VA evt_HTML_A030],"<script>")
0024 //
0025 // Add HTML & JS to segment
0026 //
0027 Add Segment(FC Text Block 100, VA evt_HTML_A030, <Default,Default,0,Default>, <No>, VA evt_iSegmentID_INT01)

The next steps will be create my own JavaScript library for separate and organize my JS code, and it allow will be more easier and faster to access JS functions.

Personally, I thint it opens up world of possibilities.

Welcome to Custom JD Edwards Applications, Javascript.

[JD Edwards] Insertar Javascript en Pantallas

En uno de los últimos proyectos realizados, una de las necesidades se podría resolver fácilmente con JavaScript. Pero nunca había insertado código javascript en una aplicación de JD Edwards (tampoco he tenido esa necesidad).

Lo que sí que sabía hasta el momento es que en los text blocks se podría insertar código HTML, pero si puedes insertar código HTML entonces se tenía que poder embeber código JavaScript!

Así que me puse a investigar y trabajar en ello, y pude añadir añadir Javascript!!!

Alert JavaScript from JD Edwards

En algunos post que leí comentan que para versiones superiores a 8.90 hay que habilitar seguridad para ello, en mi caso no fue necesario con JD Edwards 9.2.

Code Example:

     evt_HTML_A030
     evt_iSegmentID_INT01
     evt_Message_ALPH
     evt_WebcenterContentLogin_URL
     OPT: Using Defaults
0001 //
0002 // Initialize Variables
0003 //
0004 VA evt_HTML_A030 = ""
0005 VA evt_iSegmentID_INT01 = 1
0006 //
0007 // Notify the tool that the Information text block contains encoded text.
0008 //
0009 Encode(FC Text Block 100, VA evt_HTML_A030, VA evt_HTML_A030)
0010 //
0011 // HTML & Javascript Code
0012 //
0013 //  
0014 VA evt_Message_ALPH = ""Hello JavaScript!!!""
0015 VA evt_HTML_A030 = concat([VA evt_HTML_A030],"<script type="text/javascript">")
0016 VA evt_HTML_A030 = concat([VA evt_HTML_A030],"function abrirVentana(){")
0017 VA evt_HTML_A030 = concat([VA evt_HTML_A030],"alert(")
0018 VA evt_HTML_A030 = concat([VA evt_HTML_A030],concat([VA evt_Message_ALPH],");"))
0019 VA evt_HTML_A030 = concat([VA evt_HTML_A030],"}")
0020 VA evt_HTML_A030 = concat([VA evt_HTML_A030],"</script>")
0021 VA evt_HTML_A030 = concat([VA evt_HTML_A030],"<button onclick="abrirVentana();">")
0022 VA evt_HTML_A030 = concat([VA evt_HTML_A030],"Alert</button>")
0023 VA evt_HTML_A030 = concat([VA evt_HTML_A030],"<script>")
0024 //
0025 // Add HTML & JS to segment
0026 //
0027 Add Segment(FC Text Block 100, VA evt_HTML_A030, <Default,Default,0,Default>, <No>, VA evt_iSegmentID_INT01)

Los siguientes pasos será crear una librería JavaScript para tener el código por separado y que sea más sencillo y rápido poder acceder a las funciones JS.

Personalmente, creo que ésto abre un mundo de posibilidades.

Welcome to Custom JD Edwards, Javascript.