Hi,
I am trying to call a OData service created in BW to run a process chain from SAC, OData service is created and tested in BW successfully, generated the URL.
Now I have included the OData in the SAC layout by selecting the Live Connection.
I am trying to call this in the button, but I am not getting the executeAction() function as suggested in the help documents.
Can you please let me know what is missing.

I was following below blogs:
Thanks and Regards,
HK
Request clarification before answering.
Hello H K,
Go to your SAC story.
Add a Button component to your story canvas.
In the properties of the button, you can set its label and appearance as needed.
Click on the button to select it.
In the Properties pane on the right, scroll down to the "Script" section.
In the script editor, you can write JavaScript code to make a request to your OData service. You can use the fetch API or jQuery.ajax for this purpose
code:
var url = "YOUR_ODATA_SERVICE_URL";
fetch(url, {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN", // If authentication is required
"Content-Type": "application/json"
}
})
.then(response => response.json())
.then(data => {
// Handle the OData response data here
console.log(data);
})
.catch(error => {
// Handle any errors here
console.error(error);
});
Replace YOUR_ODATA_SERVICE_URL with the actual URL of your OData service and include any necessary headers or authentication tokens.
Execute the Script on Button Click:
In the script editor, you can use the following code to execute the script when the button is clicked:
this.onClick = function() {
// Place your fetch code or other OData service calling logic here
};
Save your story and then click the button to trigger the OData service call.
Make sure you have proper CORS (Cross-Origin Resource Sharing) and authentication settings configured on your OData service to allow requests from your SAC domain.
Thanks,Lakshmi.You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.