Article
Problem
A Forum reader recently asked:
How can I automatically close an IDM 3.5 workflow request form, based on the result of a directory query? For example, I want to put an end to a request if a certain condition is met, such as when the user already has a given resource.
Solution
Suppose you want to close a request form by cancelling it upon a certain condition, such as if the request has already been granted. You can query the directory with a call to IDVault.get() to get the value of an attribute for an entity. It can be a global query, a value of a control present on the form, the result of an ajax service call, etc.
1. Add the following inline script to your form:
function checkExists(form,IDVault) {
var v = IDVault.get(null, "request object's dn here","entitykey","a-required-attribute");
if (v) {
alert("Request already granted, closing request form");
form.submit("CancelAction");
return;
}
form.showMsg("Validation ok, please proceed");
}
2. Call the script from one of the onload events. Any control will do (except Title - it does not have a browser-side object representation):
checkExists(form,IDVault);
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.
Related Articles
User Comments
- Be the first to comment! To leave a comment you need to Login or Register
- 4011 reads


0