on 2016 Apr 04 9:46 AM
Hi ,
I wanted to know if it is possible to create an user through Scripts . If there is any standard IAPIs present for this purpose in CLM , please let me know and the method name used to create the same else if there is any other alternative solution to this , please try to share the same .
Thanks in advance.
Request clarification before answering.
Hi,
Yes this is possible. Go to Ref Guide and check out api NewUserAccountIBeanHomeIfc. You will find the create() method which will return a new UserAccountIBeanIfc.
Bogdan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bogdan,
when i tried using create()
i get following error
Sourced file: inline evaluation of: ``import com.sap.odp.api.usermgmt.masterdata.UserAccountIBeanIfc; doc.setDispla . . . '' : Error in method invocation: No args method create() not found in class'com.sap.odp.api.usermgmt.masterdata.UserAccountIBeanImpl'
Hi Bogdan ,
Actually i want to create a user with user id and other mandatory fields in CLM User Account .
I was able to find the class called UserAccountIBeanIfc with the help of which i can set all the required fields . Now i am confused as how to create the user . It would be great if you share a sample code or some link regarding the same .
Thanks in advance.
Hi Amar,
The system itself is designed using an MVC approach. In your case, UserAccountIBeanIfc is the model; the controller being NewUserAccountIBeanHomeIfc. I'm not sure, but if you don't have any Java experience these might not make any sense.
As detailed in the initial post the create() method will return your new user bean, so basically you'll need to:
// initialize your controller/home
NewUserAccountIBeanHomeIfc userHome = IBeanHomeLocator.lookup(session, NewUserAccountIBeanHomeIfc.sHOME_NAME);
// create your new user bean
UserAccountIBeanIfc newUser = userHome.create();
Bogdan
Hi Kumar,
I was getting the details of the user from Oracle Identity And Access Management . I received the data via Web Services of CLM and incorporated those data via script to create a User. To create a User please check the post that is marked as Answered.
Create a newUserIBeanHomeIfc ,
Then using the create() method get the UserAccountIBeanIfc
finally use setters of UserAccountIBeanIfc to set various required values.
Once all the above steps is done Use save(IBean) method of newUserAccountIBeanHomeIfc to save your user details.
In case of any queries please let me know ,I will be happy to help .
Thanks,
Amar Shukla
Hi Shukla,
Could you please tell me what are the mandatory value of setter value I need to provide like First name,Last name email. etc.. ? and how did you set the security profile to give user level authentication.
Because Once I try to create new user manually then some other mandatory filed like Company ,
other information like Time zone,currency ....
Please kindly provide your feedback.
Thanks
Sonu.
Hi Sonu,
For other informations like Time Zone , currency We've set it to default value on UI Level. Other than these the mandatory values are location , First Name , Last Name , Username , Email address for which you can use setter from the API UserAccountIBeanIfc.
I did not code for Security Profiles since my requirement was not to assign any security profile when user is created via scripting (Security Profile was added manually as per the request raised) . However , you can explore on the method addToGroup for your requirement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.