Read User_Fields globally from all locations (for example: ticket_sidebar)? | Community
Skip to main content

Read User_Fields globally from all locations (for example: ticket_sidebar)?

  • May 31, 2022
  • 1 reply
  • 0 views

Wilhelm11

Hi, in order to retrieve data from an external API (By button click in the app) I want to query a user field. Note: I want the app to appear only in the ticket_sidebar. But my problem at the moment is that I can't find a way to query a user field if the app is not also integrated in the User_Sidebar. So is there a global way to query the user_fileds from the ticket_sidebar as well? 

Currently I have a single function that I would like to move from user_sidebar.js to ticket_sidebar.js. But this is not possible for the mentioned reason.

Can someone help me with this?

1 reply

Wilhelm11
  • Author
  • May 31, 2022

Hi Ahmed

No I am not directly interested in the user ID but in the value in the user field, which I query with client.get. I unfortunately only found the connection with the requests and the get to access a user field. I can write to it with a setter on user.custom_field: from the ticket_sidebar directly. But I can't query this user field. I haven't found any other way to do that except from the user_sidebar. The user id is not important for me at this moment. I just want to be able to access and read the user field in the user_sidebar from the ticket_sidebar.