Solved

How do I get a selected row's field value through a client script?

  • 12 July 2023
  • 2 replies
  • 126 views

Userlevel 1
Badge +6

Hi experts, need your help.

Customer needs the following requirement fulfilled:

In Quote screen → Under Lines tab → When adding a new line → if the Usage type is Part. make the part_description non-editable but if the Usage type is Non part, make the part_description editable.

 

Currently, this behaviour is vice-versa.

 

I have created a new client script (attached) and linked it with the Usage Type field in UI designer. 

However, it looks like it is fetching the value of the Usage Type field from the first row (which is selected by default when the screen loads). Whenever I select another row, it still has the same value as the Usage Type in the first row.

 

How can I get this to work properly?

icon

Best answer by SAMLK 13 July 2023, 04:37

View original

2 replies

Userlevel 4
Badge +12

Hi @buddhima ,

The smart client scripting functions are quite limited when it comes to client scripts. There is no straight forward function to access data table rows using client script for smart client. This can be obviously achieved on the webclient as there are many functions (getDataTableRows, getDataTableSelectedRows) to access datatable rows. 

Userlevel 1
Badge +6

Hi @SAMLK,

 

Thank you very much for the reply! Looks like this needs to be achieved through a customization then. 

Reply