Original Message:
Sent: 04-05-2023 09:45
From: Alexander Kirsanov
Subject: Add custom button in Reltio UI
Hi Utsa,
Yes, moreover, you can use js regexp to allow subdomains/paths (e.g. https://[^.]*\\.reltio\\.com/test/path\\?tenant=[^&]*¶meter=.*).
All requests will contain Authorization header, you shouldn't worry about it.
------------------------------
Alexander Kirsanov
Original Message:
Sent: 04-03-2023 06:01
From: Utsa Das
Subject: Add custom button in Reltio UI
Hi ,
So if we want to call a rest API so we have to give the URL in the below section:-
"https://some_resource.reltio.com":- please confirm .
And also if we need to pass the authorization parameters with the rest api ,then how to pass the same ?Please let us know .
------------------------------
Utsa Das
Syneos
Original Message:
Sent: 03-31-2023 08:12
From: Alexander Kirsanov
Subject: Add custom button in Reltio UI
Hi Utsa,
Thank you for your question! You can use the following instruction:
1. You need to create a custom script and upload it somewhere (e.g. s3).
Here is an example of such custom script (MyScript.js):
//define buttonvar html ="<div id='test-button' ui-actions='click'>\n" +" Execute\n" +"</div>";UI.setHeight(34);UI.setHtml(html);UI.onEvent((eventType, data) => { //listening for an event if(eventType === "uiAction" && data.type === "click") { if (data.id === "test-button"){ //sending the request UI.api("https://some_resource.com").then(response=>console.log(response)) } }});
2. You need to add custom view component configuration:
- You need to define the list of urls, which your script calls in the action.permissions section
- You need to define a path to the custom script file in the action.files section
Here is an example of configuration:
{ "point": "com.reltio.plugins.ui.view", "id": "com.reltio.plugins.MyCustomButton", "class": "com.reltio.plugins.ui.CustomActionView", "action": { "permissions": ["https://some_resource.reltio.com"], "files": ["https://s3.amazonaws.com/custom-scripts/MyCustomScript.js"] }}
3. You need to add custom view to a perspective layout.
4. Open UI and test.
------------------------------
Alexander Kirsanov
Original Message:
Sent: 03-31-2023 04:31
From: Utsa Das
Subject: Add custom button in Reltio UI
Hi team,
We want to add a custom button in reltio mdm UI and want to execute a rest api call whenever the button is clicked.Could you please let us know with a sample how to configure the same ?
------------------------------
Utsa Das
Syneos
------------------------------