Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add easy method to query/execute UI Actions #8

Open
vetsin opened this issue Jan 13, 2021 · 1 comment
Open

Add easy method to query/execute UI Actions #8

vetsin opened this issue Jan 13, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@vetsin
Copy link
Collaborator

vetsin commented Jan 13, 2021

We can use the API to query, then execute UI Actions. The following is the current method to execute:

params = dict(sysparm_table='x_snc_some_table', sysparm_sys_id=sys_id)
r = self.client.session.post(f"{self.client.instance}/api/now/ui/ui_action/{ui_action_sys_id}", params=params, json={})

But we could easily make this part of the client. Something like self.client.execute_ui_action(...) or perhaps even a self.client.UiAction(table, ...) deal like attachment?

Similarly the record object has a gr.add_attachment so maybe we could have also gr.exeute_ui_action?

@vetsin vetsin added the enhancement New feature or request label Jan 13, 2021
@vetsin
Copy link
Collaborator Author

vetsin commented Apr 25, 2023

how you do it now, without 'help':

params = dict(sysparm_table=record_table, sysparm_sys_id=record_sys_id)
client.session.post(f"{client.instance}/api/now/ui/ui_action/{ui_action_id}", params=params, json={})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant