Set param values

You can assign value to a non-user defined configuration parameter in your extension. This can be accomplished in two different methods, as outlined below:

Set values using Widgets

You can assign values to the created configuration parameter by using the widget method
Steps to set the value for the configuration parameter using widget.

  1. In your local drive, go to your Project folder which you created initially while constructing your widget.
  2. Open the widget.html file.
  3. Edit the file and configure the request client API by providing the necessary parameters. Use the given sample request as a reference. Specify the name of the configuration parameter and the corresponding value that should be passed.
  4. Save the file
  5. Pack and publish the extension.

Now the parameter and its value will be updated.

Note: The non-userdefined param only can be updated by set client API.

Sample Request

CopiedZOHODESK.set("extension.config",{ name : "token", value : "mytoken" }).then((response)=>{
  // your code here...
  //handle error here...

Set values using Functions

To configure the parameter values using Functions, follow the steps provided below.

  1. Go to Sigma > Functions > Add Function > Create your function.
  2. In the function editor, provide the given sample request.
  3. Save the function.
  4. Associate function with the extension.
  5. Publish the extension.

Now, the parameter name and its value will be updated.

Copiedhead = Map();
head.put("orgId", data.get('integ_scope_id'));
installationId = data.get('service_app_id');
configParams = Map();
configVariables = Map();
configParamsList = Collection();
//Set config Param

addConfigParam = invokeurl
   url: ""+installationId+"/configParams"
   type: POST
   parameters: configParams.toString()
   headers: head
   content-type: "application/json"
   connection: "testing"