Release 24 - JavaScript API - how to Create a Button to call a funtion in Client Side Extension
Hello everybody,
I´m trying to use the new Release 24 JavaScript API to create a button to call a function in Client Side Extensions. Does anyone have a sample of the code needed to call a Client Side Extension function from this button?
I Know how to create the button, is something like that:
<script type="text/javascript">
oraclecrmod.onReady(function(){
if(oraclecrmod.ctx.isObject("Campaign") && oraclecrmod.ctx.isDetailPage())
{
var maTB = oraclecrmod.getTitleBar("CampaignTB");
// create the new button
button = oraclecrmod.createButton({id:"MyButton", text:"MyButton",parent:maTB});
// associate the myFunction with the button click event
button.on("click", myFunction);
}
});
</script>
I´m trying to use the new Release 24 JavaScript API to create a button to call a function in Client Side Extensions. Does anyone have a sample of the code needed to call a Client Side Extension function from this button?
I Know how to create the button, is something like that:
<script type="text/javascript">
oraclecrmod.onReady(function(){
if(oraclecrmod.ctx.isObject("Campaign") && oraclecrmod.ctx.isDetailPage())
{
var maTB = oraclecrmod.getTitleBar("CampaignTB");
// create the new button
button = oraclecrmod.createButton({id:"MyButton", text:"MyButton",parent:maTB});
// associate the myFunction with the button click event
button.on("click", myFunction);
}
});
</script>
1