Skip to main content

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

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