How to set value to "sn-reference-picker" in widget?

suraj patil1
Kilo Explorer

Hi Guys,

I came across one scenario, where I want to set value of "sn-reference-picker" from server side in widget.I dont know which attribute need to set .If anyone having any idea or documentation on "sn-reference-picker" will be helpful.

Thanks,

Suraj 

6 REPLIES 6

Derek Culberts1
Kilo Contributor

Hi Suraj, what was the solution to this?

I know this is an older thread, but I hate to see a question go unanswered.

In order to pre-populate the sn-reference-picker, you need to populate the $scope.field object with data. The object needs to have properties for name, value, and displayValue. If you populate these values with data from the record you want to pre-select, then it should show up when the form renders.