The current issue we're having with OPA is that we generate the html for an email to be sent out via a connector service.
Ideally we need to display this to the user in a label prior to submission with the html formatting rendering out. With substitution this appears to be blocked.
It's been suggested that this should be possible using js to bring the value through to the front end.
I think in principle I understand what needs doing based on some reading on the documentation and a look at the example projects, though I'm a C# developer and javascript is something I have very rarely touched so this is a learning curve.
What I'm after doing is essentially setting the label value to the attribute value so that the html renders.
So I've set up the opm.extension.data.json file to contain the name of the attribute value I want to use like
["emailbody"]
I've also created a property on the test label so as to be able to identify and work with it.
The script I'm trying to run is:
OraclePolicyAutomation.AddExtension({
fullCustomInput: function(control, interview) {
var extensionData = interview.getExtensionData();
if (control.getProperty("type") === "body") {
return {
mount: function(el) {
control.setValue(extensionData["emailbody"]);
}
}
}
}
});
However it doesn't seem to work and I'm not entirely sure how I would debug this. Any pointers?