Solved

How to set Customized Label invisible in SOLine_RowUpdated

  • 25 November 2022
  • 3 replies
  • 170 views

Hi,

 

I add a customized label in Order header , i want to make it invisible when custom field 'Remise Comm' greater than 0

 

icon

Best answer by Shawn Burt 25 November 2022, 17:47

View original

3 replies

Userlevel 7
Badge +17

Hi @snoopez206  As Shawn suggested, you need to introduce a field for the NOTE and suppresthe s the label in .aspx page. Please find the steps below.

  1. Introduce a new field and suppress the label in the .aspx page for the NOTE field
  2. You have mentioned in subject.. SOLine_RowUpdated, I see both the fields are part of the SOOrder extension DAC, hence not required to add the SOLine_RowUpdated event.
  3. Instead, you need to write SOOrder_RowSelected event, and add a condition that if Remise Comm > 0 then visible NOTE field otherwise hide it
Userlevel 6
Badge +4

Hi @snoopez206 

You can have a Javascript event associated to ‘Remise Comm’ when the value changes

function setLabelHidden(control, eventArgs) { var element = document.getElementById("ctl00_phF_form_LABEL"); if(eventArgs.value > 0)	{ element.style.visibility  = "hidden"; }	else { element.style.visibility  = ""; }}

Assuming that the ID of the label is LABEL

The event can be defined in the screen editor:

  • Add a Javascript control and set the code
  • Enable hidden attributes

 

  • Set the call in the proper event

 

There you go. For my example I used a numeric field. You can adapt that to your specific need.

A very useful old Source for this example:

https://asiablog.acumatica.com/2016/12/client-events-using-javascript.html

 

Hope this helps too

Userlevel 5
Badge +1

Not sure you can do that. But you could make an unbound dac field with a constant value, suppress it's label, and the show/hide it.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved