Skip to main content
Question

FSM Client Script ListView set field read only

  • July 4, 2024
  • 1 reply
  • 36 views

Forum|alt.badge.img+7

Hi Hoping someone may be able to help.

what i am trying to do is on the receiving screen if the document is posted i want to make certain fields read only so that the information is not changed after posting. 

if the field i want to work with is is part of the receiving table i can turn them off with no issue.

setControlEnabled("receiving", "way_bill", false);

but if they are in a listview it does not look like i can set them readonly using the standard control

setControlEnabled("receiving_detail", "location_to", false);
setControlEnabled("receiving_unit", "serial_id", false);

any suggestion on how i might be able to set these read only using a client script?

i will need to build this for both SmartClient and Webclient

 

i tried looking through the documentation and the FSM client scripts but couldn’t see anything that would work.

 

Thanks in Advance 

Graeme

1 reply

Shneor Cheshin
Superhero (Employee)
Forum|alt.badge.img+28
  • Superhero (Employee)
  • 1131 replies
  • July 4, 2024

Hi @graeme86 

You will need to iterate on the table using dedicated list functions.

var Rows = getDataTableRows("receiving_detail");
if(Rows != null || Rows != '')
{
	for(var i=0;i<size(Rows);++i)
	{
		var Row = getDataTableRows("receiving_detail")[i];
		var locationParam = getRowControlValue(Row, 'receiving_detail', 'location_to');
		if (locationParam == "my_location")
		{
			setControlEnabled(Row, 'receiving_detail', 'location_to', false);
		}
	 }
}

Cheers!


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