sn-record-picker public

jackinsidend
Giga Guru

Is it possible to expose a custom or out of box table (read only) in a widget to unauthenticated users?

I have my widget public, page public, and public role on table but it only works when logged in. It just shows searching when not authenticated.

Any idea?

<sn-record-picker field="location2" table="'cmn_location'" display-field="'name'" default-query="'GOTOu_hierarchy_typeLIKEBuilding^u_hierarchy_type=Building^parent=54ece5a74f5dfa4070dee3414210c738'"

              value-field="'sys_id'" search-fields="'name'" page-size="100" >

Thanks,

Jack

8 REPLIES 8

navee7777
Tera Contributor

Reason : Record picker doesnt work on public pages because, record picker angular derivative invokes a table api.  and the table API doesnt return any result if there is no authentication. as a result it doesnt workon public pages(with-out authentication)

 

Resolution :

1) Create a scripted web service(rest) with "no authorization". 

this API should query ur table and return results accordingly 

 

2) Create   new angular provider which is a copy of "/scripts/sn/common/controls/directive.snRecordPicker.js"

- Modify the table API with  your newly created rest api (spep1)

 

3) tag the the newly created angular provider derivative (step2) in ur widget. and use new derivitive name in html. 

 

4) Ta dam...  it sud work.   

 

 

 

Pranav Bhagat
Kilo Sage

You have to remove the READ Acl from the referenced table.

Hello Pranav,

Issue-
User reported an issue that they are unable to add other people to watchlist on requests and incidents items raised on IM Service Portal. When user tried to type name of person in Watchlist section it keeps on loading and the user list is not displayed

 

Table API disable it is working fine, Instead of Table API could you please provide the alternative solution.

 

PT5
Tera Contributor

Try using public-record-picker instead of sn-record-picker, and remember to add widget dependency || angular providers=publicRecordPicker