Skip to main content
Solved

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


buddhima
Sidekick (Employee)
Forum|alt.badge.img+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?

Best answer by SAMLK

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. 

View original
Did this topic help you find an answer to your question?

2 replies

SAMLK
Hero (Partner)
Forum|alt.badge.img+13
  • Hero (Partner)
  • 226 replies
  • Answer
  • July 13, 2023

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. 


buddhima
Sidekick (Employee)
Forum|alt.badge.img+6
  • Author
  • Sidekick (Employee)
  • 27 replies
  • July 14, 2023

Hi @SAMLK,

 

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings