Add New Entity Record in OPA javascript plugin
Content
Hi ,
I have a requirement to to add a new record of entity instance in OPA interview based on certain conditions and this should be done on a custom button click.
In am trying to use the use function "getRows()","getDefaultBlankInstances()" and "addNewRow()".
Could anyone help me how to use these functions(syntax to use these functions).?
Thanks,
Sudhir
Version
OPA 12.2.8Code Snippet
OraclePolicyAutomation.AddExtension( { customHeader: function(interview) { return { mount: function(el) { var buttonDom = document.createElement("button"); buttonDom.innerHTML = "Custom Button"; buttonDom.setAttribute("type","button"); buttonDom.onclick = function(event) { event.preventDefault(); interview.addNewRow(); var sScreen = interview.getStages(); var rscreen = interview.getScreens(); //alert(rscreen); for (var i =0;i<= 8 ;i++) { var rScreen1 = rscreen[i]; rScreen1 =rScreen1.caption; if ( rScreen1 == "Notes") { //alert(rScreen1); interview.addNewRow //var rRows = sRows.caption; } } //interview.setInputValue("global_input", "Custom Button input"); //interview.submit();*/ } el.appendChild(buttonDom); }, update: function(el) { } } } });
0