selectedRecords in list view

krishnasundar
Giga Contributor

Hello,

We need to perform some validation before doing multiple update, for the reference field in list view. So for that we are trying to get the selected records details, like how the g_list.getChecked() is returning the list of the sys_ids for the items that are checked in the list.

Since we need to perform validation on dynamic reference qualifier, we could not use this getChecked method.

If we found how SN identifies the selected rows/records using mouse/keyboard select (not from the leftside checkbox in list view), would be helpful.

find_real_file.png

If you guys having any idea on OOB script, please let us know.

Thanks,

Krishna

4 REPLIES 4

SanjivMeher
Kilo Patron
Kilo Patron

Hi Krishna,



Why not add the validation in a business rule and use abort action to stop if validation fails.



Please mark this response as correct or helpful if it assisted you with your question.

While working with multiple record update on list view, the setAbort action doesn't suits much user helpful.



We are trying to find out the way to modify the reference qualifier.



Thanks !


antin_s
ServiceNow Employee
ServiceNow Employee

Hi Krishna,



The reference qualifier of the field needs to be modified to accept only the values that matter to the current record. This can be done by passing the current record as an input to the reference qualifier script.



Hope this helps. Mark the answer as correct/helpful based on impact.



Thanks


Antin


Hi Antin,



We have already using the current in the reference qualifier. That's why our validation works only on Form level (means while working with single record in both form/list view).



But here our difficulty is to achieve the same validation, while working with multiple recrods in list view. Since the reference qualifier using current object, the multiple update breaks.



Thanks,


Krishna