on 04-12-2018 1:29 PM
Hi,
I'm working on a form on IDM 8.0 (classic webdynpro). I'd like to have the MX_VALIDFROM set to today's date when opening the form.
I tried with the parameter %ddm.-date%, it didn't work.
I tried putting a date with format yyyy-mm-dd, it worked (but obviously, I won't go and change it everyday to put the correct date).
Must I conclude that the forms can't retrieve parameters, only strings? Or should I review the syntax (I copied/pasted my constant from another pass since the ctrl+space didn't work on the Default Value column...)
Did anyone manage to do it?
Thanks a lot,
Clotilde
Following up on Matt's suggestion to solve this using an onLoad extension: there's the free and open source Rhidmo® extension for SAP IDM 8.0 which enables you to implement onLoad handlers as a normal SAP IDM package script using the JavaScript language. The benefit is that this can be developed and transported using your well-known SAP IDM Developer Studio directly. No custom Java development required.
In case you wish to have a look, Rhidmo® has a GitHub project site here:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi lambert.boskamp,
I'm completely new to gitHub, git and Maven. I think i figured out how to retrieve the archive in my eclipse using Git, but I don't have a clue on how to generate the ear file (since i didn't find it in the archive, I guessed i have to do it from the project).
I saw the command lines
But i don't know where to launch them. That's why i tried it from eclipse, where git and maven are available as plugins. Could you help me please?
Thanks a lot,
Clotilde
If your unfamiliar with Maven and Git, the easiest way is to download the latest Rhidmo release precompiled directly from GitHub. You can always find the latest release at
https://github.com/foxysoft/idm-extension-rhidmo/releases/latest
Regarding your original question - how to build with Maven directly from Eclipse? - it depends on the exact set of plugins you have in your Eclipse environment. It's possible, for instance, with the m2eclipse plugin. The process is documented here. In short, you need to create a new "Run configuration" of type "Maven Build", and specify the required parameters as shown in the following screenshot:
Hi lambert.boskamp,
I have another question : I managed to deploy rhidmo correctly (or at least apparently). I created a script to check if someone with the same firstname, lastname and birthdate was already present in the IDM database.
I can see in the developer logs that my script is called correctly. But I can't find a way to get the user's mskey or the filled attributes in the web UI, and I get the following error in the UI : "Values validity cannot be checked"
I tried to show what the input was using uError(Par), and all I got in the log was "fr", so I'm guessing my script doesn't receive any input from the UI.
Is there a method to get them?
I tried getField from a website I found and had the error :
Error during custom validation
[EXCEPTION]
org.mozilla.javascript.EcmaError: TypeError: Cannot find function getField in object fr
What would be the function to get my parameters?
thank you,
Clotilde
When using Rhidmo for SAP IDM 8.0, the function signatures of the extension functions you implement in JavaScript are exactly the same as when you would implement the same in Java:
IdMValue[] onLoad(Locale locale, int subjectMSKEY, int objectMSKEY,
Task task, IdMLoadData data) throws IdMExtensionException
IdMValueChange[] onSubmit(Locale locale, int subjectMSKEY,int objectMSKEY, Task task, IdMSubmitData validate) throws IdMExtensionException
Just they don't need to be named onLoad and onSubmit; you can choose any name you want.
The source code examples given in the SAP Identity Management Extension Framework Implementation Guide apply 1:1 to Rhidmo, except that you need to use JavaScript syntax instead of Java syntax. This useful guide on MDN may help you with specific "turn Java into JavaScript" questions.
The reason why you get "fr" when using uError(Par) is that when you (erroneously) delcare your JavaScript function as myFunction(Par), you only assign a name (Par) to the first parameter, which is the user's locale. The value of the user's locale is "fr", which means French.
To fix this, declare five parameters as shown above. Then you have direct access to the user's MSKEY in subjectMSKEY, and you can access all the data using the fifth parameter (data/validate). Again, please refer SAP's implementation guide linked above for more specific information on how to deal with each parameter..
Hello,
I managed to do it \o/
For future reference, this blog also helped a lot :https://blogs.sap.com/2010/04/15/java-input-validation-with-idm-71-sp4/
I mainly had a problem on how to send the error message to the UI. It now works perfectly.
Regards,
Clotilde
Maybe an OnLoad Java extension? Not too up on that particular part of IDM, but it's an idea. Hmmm.... Maybe a small project for me? 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Clotilde,
I had the same idea for a UI mask in 7.2., but could not get it working. Now I have no default value on the mask, but if the user does not put a value, after saving I calculate the current date and write it to the attribute (with a script that checks, if the attribut is empty). So kind of the other way around.
.
Regards,
Steffi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.