On a new form, I'd like to set a default value on a lookup dropdown, this is what I have currently but doesn't seem to be working. Can you assist, please?
fd.spRendered(function(){
fd.field('OperatingHours').ready().then(function () {
//set Lookup field value once the field loads
fd.field('OperatingHours').value = '24x7';
});
});
You must know the item ID to set the lookup field value. For instance, the target item ID is 5 then you can use this code:
fd.spRendered(function() {
fd.field('OperatingHours').ready().then(function() {
//set Lookup field value once the field loads
fd.field('OperatingHours').value = 5;
});
});
But doing so the lookup field shows desired value but its real value doesnt seems to be full legit lookup value, all other data like value.LookupValue is missingm so when i have 'onchange' method assigned for this lookup field which stores its LookupValue in other field this value ise empty, why?