Page 1 of 1

manually changing a lookup field

Posted: Sun Jan 28, 2018 12:53 pm
by alf1976
How do you manually change the value of a lookup object in version 4?

In version 3 i was able to use
$('#EstimateSiteID').val('4');
$('#EstimateSiteID').change();

this doesn't work in version 4.

As the change is triggered by the result of another lookup object i tried using the nulookupRecord and SetFormValue in the afterbrowse but that didnt work either on the lookup object

Andrew

Re: manually changing a lookup field

Posted: Sun Jan 28, 2018 7:09 pm
by admin
Andrew,

I have just made a change to Github that should now allow...

Code: Select all


$('#EstimateSiteID').val('4');          //-- 4 is a primary key
$('#EstimateSiteID').change();

Please test it for me.

Steven

Re: manually changing a lookup field

Posted: Sun Jan 28, 2018 9:00 pm
by alf1976
Hi Steven,

Seems to work fine. Like the way it fires the after browse event too upon the manual change.

many thanks

Andrew

Re: manually changing a lookup field

Posted: Sun Jan 28, 2018 10:17 pm
by admin
.