How to fetch Iparam logged in User?

Hi Team,
For logging purposes, I need to fetch logged-in user data of iparam page. for example, we have some sort of column A and B. Anybody can exchange data from A to B or B to A. So I need to know who is exchanging the value. Is it possible in our iparam.json file?
If yes can I get any samples?

$(document).ready(function () {
  app.initialized()
    .then(function (_client) {
      client = _client;
      init();
      console.log("client.data : ", JSON.stringify(client))
      client.data.get("loggedInUser").then(
        function (data) {
          console.log("logged in user : ", JSON.stringify(data) )
          console.log("logged in user : ", JSON.stringify(data["loggedInUser"]["email"]) )

          requesterValue.requester_email = data["loggedInUser"]["email"];
          requesterValue.display_name = data["loggedInUser"]["display_name"];
        },
        function (error) {
          console.log(error);
        }
      );
    });
})

i have added the above code to iparam.json it is there is no data in client so i am unable to fetch

Hi @Deiviya_Sivacoumar,

Using the Data method in the Installation Parameters page is not possible. You cannot get the logged-in user data in any way on the iparams page.

The only way I could suggest is to get it from user input in some way, if required for some purpose.

1 Like

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.