on 04-12-2010 5:05 PM
I am currently working to set and attribute to expire two days out from the last sync. I have been trying to use standard js code to calculate this date, but it seems IdM does not like that. What I am looking to do is the following:
On the WriteABAPUser pass in the Initial Load job, I would like to use the VALIDTO option on attribute ACCOUNTTEST to be set two days out from the current date.
Does anyone have any suggestions on how I can accomplish this. The ultimate goal is so that when a user has been removed from a system, this attribute with fall off two days later.
Any and all assistance is greatly appreciated. Thanks.
Kevin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
While link is quite helpful, does not answer the question at hand. I need to cacluate the VALIDTO date to be 2 days out from the current run date. This all has to be completed within the logic of the Initial Load job which we use to sync the data between IdM and our various SAP systems.
I have created a script to use to calculate this, but IdM does not seem to like the use of stand js date calculations. Here is the value I have been trying to use to set the value in the Initial Load job, WriteABAPUsers task:
{VALIDTO=$FUNCTION.cag_makeExpiryDate()$$}%logonuid%
the script contents are as folllows:
function cag_makeExpiryDate(Par){
{
var expiryDate = new Date();
expiryDate = expiryDate.setDate(expiryDate.getDate() +2);
var Year = expiryDate.getFullYear();
var Month = expiryDate.getMonth()+1;
var Day = expiryDate.getDay();
expiryDate = Year + '-' + Month + '-' + Day + ' 23:59:59.000'
return expiryDate
}
}
If fails on the the var Year line (actually line 9 in the script) with the error:
Executing cag_makeExpiryDate() got RuntimeException - undefined: undefined is not a function. HINT: Check line 9 in the script cag_makeExpiryDate
Hope this detail helps.
Good catch I didn't even see that.
Unfortunately the script doesn't even get that far, for some reason it does not like the use of the getFullYear function.
Back to the drawing board I guess, just really hard to believe that there are not generic date manipulation scripts out of the box.
Thanks.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.