Experts,
I have a weird issue I'm hoping you can help me with. I'm trying to find out why a value that I'm trying to set with uIS_SetValue is showing an error in the attribute value instead of what I'm feeding into the function. Here's the script in question, see line 26 (I have marked it):
// Main function: z_setDN
function z_setDN(Par){
var split = Par.split("||");
var adLogin = split[0];
var startPoint = split[1];
var mskey = split[2];
var prefix = Left(adLogin,3);
var IDStoreID = uGetIDStore();
var country = "";
var city = "";
var entity = "";
var finalResult = "";
var sql = "";
var uISResult = "";
if(prefix == "ADM" || prefix == "ADS" || prefix == "CYB" || prefix == "EXU") {
uISResult = uIS_SetValue(mskey, IDStoreID, "Z_MX_AD_" + prefix + "_LOGIN_ID", adLogin);
if(prefix == "EXU") {
finalResult = "cn=" + adLogin + "," + startPoint;
} else {
finalResult = "cn=" + adLogin + ",ou=Users," + startPoint;
}
uWarning("finalResult (pre-set of Account_DN_AD>: " + finalResult);
Line26: uISResult = uIS_SetValue(mskey, IDStoreID, "Z_MX_ACCOUNT_DN_AD_" + prefix, finalResult);
uWarning("uISResult: " + uISResult);
} else {
uISResult = uIS_SetValue(mskey, IDStoreID, "Z_MX_AD_INTERNAL1_LOGIN_ID", adLogin);
sql = "select SEARCHVALUE from IDMV_VALUE_BASIC \
where ATTRNAME = 'Z_MX_AD_TRIGRAM' and MSKEY in ( \
select MCSEARCHVALUE as MSKEY from IDMV_VALLINK_BASIC \
where MSKEY = " + mskey + " and MCATTRNAME = 'MXREF_Z_MX_OFFICE_LOCATION_MAPPING')";
city = uSelect(sql);
sql = "select SEARCHVALUE from IDMV_VALUE_BASIC \
where ATTRNAME = 'Z_MX_COUNTRY' and MSKEY in ( \
select MCSEARCHVALUE as MSKEY from IDMV_VALLINK_BASIC \
where MSKEY = " + mskey + " and MCATTRNAME = 'MXREF_Z_MX_OFFICE_LOCATION_MAPPING')";
country = uSelect(sql);
sql = "select SEARCHVALUE from IDMV_VALUE_BASIC \
where ATTRNAME = 'Z_MX_LEGAL_ENTITY_AD' and MSKEY in ( \
select MCSEARCHVALUE as MSKEY from IDMV_VALLINK_BASIC \
where MSKEY = " + mskey + " and MCATTRNAME = 'MXREF_Z_MX_LEGAL_ENTITY_MAPPING')";
entity = uSelect(sql);
finalResult = "cn=" + adLogin + ",ou=USERS,ou=" + entity + ",ou=" + city + ",ou=" + country + "," + startPoint;
uISResult = uIS_SetValue(mskey, IDStoreID, "Z_MX_ACCOUNT_DN_AD_INTERNAL1", finalResult);
}
uWarning("finalResult: " + finalResult);
// uSetContextVar("Z_NEW_ACCTDN", finalResult);
// uSetContextVar("Z_NEW_LOGIN_ID", adLogin);
// uSetContextVar("Z_USR_MSKEY", mskey);
return finalResult;
}
Also, here's the screen shot with the values of the uWarning messages from lines 25 and 27:

As you can see, the value of, "finalResult" is a valid AD DN and the uIS_SetValue result is a, "+", meaning that it executed properly. However, here's the value of the attribute when I query the database:

Why is there an error in there? Everything is configured properly. This makes no sense. Has anyone seen this before?
Request clarification before answering.
Hello Brandon,
just some brainstorming:
.
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 |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.