12-05-2022 05:23 AM - edited 12-07-2022 03:12 PM
Hi Experts,
Please help
We have created a dynamic attribute to use it in Service Account Form. I want users to pick value from this field and I want the selected value to be part of ACCOUNTNAMERULE in connection.
1. How do I use it in ACCOUNTNAMERULE? Below is the rule I use and highlighted is where I want the value to Dynamic Attribute.
${if (ServiceAccountOwnerMap.ServiceAccountType.equals('Service Account')) {'CN='+task.accountName+',OU='+${account.customproperty40}+',OU=Applications,DC=company,DC=local'} else {'CN='+user.username+',OU='+user.departmentNumber+',OU='+user.departmentname+',OU=Accounts,DC=company,DC=local'}}
2. How do I create this dynamic attribute as dropdown, where do I define dropdown values?
Please help
Regards,
Naveen
Solved! Go to Solution.
12-05-2022 10:11 AM - edited 12-05-2022 10:37 AM
Hi @rushikeshvartak @sahajranajee
Any idea?
12-05-2022 03:34 PM
Customproperty40 should be lower case
12-05-2022 04:02 PM - edited 12-07-2022 03:13 PM
Thanks @rushikeshvartak for the reply.
But I am getting below error:
Error while creating account in AD - No such property: customproperty40 for class: java.lang.String
I did change "Accounts column" to lower case.
This is my "ACCOUNTNAMERULE"
${if (ServiceAccountOwnerMap.ServiceAccountType.equals('Service Account')) {'CN='+task.accountName+',OU='+account.customproperty40+',OU=Applications,DC=company,DC=local'} else {'CN='+user.username+',OU='+user.departmentNumber+',OU='+user.departmentname+',OU=Accounts,DC=company,DC=local'}}
Just wondering if it is the correct way to use the value to dynamic attribute...
Just to put it again, dynamic attribute "ApplicationName" is being populated in the form while capturing details of Service Account.
Please guide
Regards,
Naveen
12-05-2022 04:06 PM
task.accountKey.customproperty40
12-05-2022 04:08 PM
Another error 😞
Error while creating account in AD - Cannot get property 'customproperty40' on null object
12-05-2022 04:21 PM
${if (ServiceAccountOwnerMap.ServiceAccountType.equals('Service Account')) {'CN='+task.accountName+',OU='+ApplicationName+',OU=Applications,DC=talanos,DC=local'} else {'CN='+user.username+',OU='+user.departmentNumber+',OU='+user.departmentname+',OU=Accounts,DC=talanos,DC=local'}}
12-05-2022 04:24 PM
Sometimes the simplest solution is most difficult to achieve. Thanks a lot you are a star.