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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-23-2018 04:06 AM
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
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā10-26-2018 10:08 AM
Hi Suraj, what was the solution to this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-15-2020 06:26 AM
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.