SN Record Picker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 10:25 PM
Hi everyone,
I just want to show and alert when someone click over the sn-record-picker.
basically i want to trigger something for sn-record-picker on-click functionality. ng-click is not working for it.
So, can you please suggest me any way that how can i achieve this thing for sn-record-picker.
Regards
Pratap Singh Sisodia
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 11:01 PM
Hi @Prataps135
try the below code.
<sn-record-picker on-change="recordPickerChanged(val)" ></sn-record-picker>
client side
$scope.recordPickerChanged = function recordPickerChanged (newValue) {
// parameter newValue will contain the new value selected.
};
Thanks
dgarad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 11:01 PM
Hi @Prataps135 ,
I tried your problem in my PDI and it works for me please check below code
HTML
<sn-record-picker field="user_name" sn-change="c.userRecord()"table="'sys_user'" ng-click="c.userRecord()" display-fields="'email'" display-field="'user_name'" display-fields="'user_name'" value-field="'user_name'" field="user_name" search-fields="'user_name'" page-size="100" ></sn-record-picker>
Client Script:
api.controller=function($scope) {
/* widget controller */
var c = this;
c.userRecord = function(){
alert("TEst")
}
};
Result
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 11:12 PM
Hi @dgarad , @Community Alums
I got your things but my requirement is that when i open the sn-record-picker by clicking for it without choosing any open just when it opens the drop down at that time i need this alert.
Can you please suggest that how can we achieve that.
Regards
Pratap Singh Sisodia

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2024 12:11 AM
Hi @Prataps135 ,
Please try to use ng-focus instead of ng-click. This will work for you.
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak