Is it possible to fill lookup control with current user data from AD Users SmartObject ?
Is it possible to fill lookup control with current user data from AD Users SmartObject ?
The default AD User SmartObject does not have a Get List
method, so I assume when you try to associated the AD User SmartObject with a
dropdown list you can select a method, is this assumption correct? If so read
on….
You can extend the AD User SmartObject by adding a new
method, from the ServiceObject Methods select the “Active Directory Service2
> AD User > GetUsers” method, give the method an appropriate name and
Auto bind the properties. Deploy the AD User SmartObject and should be set.
On your View, select the dropdown list you want to populate
with AD Users and configure the Data Source properties, you should now see the
new method added in the previous steps. One thing to be aware of, if you have a
large org with thousands of users in AD you might see some slow responses in
loading the data, think about narrowing the data down by applying filters to
limit the number of users you populate
Thanks.
I've already added this method and another one - GetUserDetails
I was wrong that I need to fill Lookup control,
I need to fill Picker Control.
Data source of the Picker Control is AD User.
I can call GetUserDetails method, I get Display name, but mapping of Display Name to Picker Control Does not work. Mapping of Name to Picker does not work either.
Thank you for posting additional info, i would recommend opening a support ticket for this, also if you can please update the post based on the feedback you get from the support team
Hi Vladimir,
did you get a solution to this from the K2 support team ?
I am trying to fill in a text box, on an initialize event, with the result of a smartobject invocation and it's not working.
I have tested the smartobject in Service Tester and it returns 1 result.
Thank you,
Tiago Calado
Hi Tiago. Are you making use of a “Execute a SmartObject
method”? did you check that the Output mappings are configured correctly? You should
have no issues with this.
Vladimir’s question is slightly different as he is making
use of the picker control combined with AD Service methods that seems to cause
an issue.
Hi Renier,
you are right. It is working fine now. It was a training issue.
Thank you
Greetings,
How can I get the current logged in user name? As I need to display it in the Smartform header form, any idea aroud this?
Thanks,
Aman
Here are steps to achieve it.
-Create SmartObject using Active Directory.
-Define Properties like EmpNo, Employee Name, Designation etc.
-Create View.
-Select the SmatObject and drag the fields on the Canvas Layout.
-Create New Rule -> “When the View executed Initialize”
-In Events -> View Events -> Select When the View executes a <<method>> (select Initialize)
-In Actions -> Smart Object Interaction -> Execute a SmartObject method.
-Select Execute a SmatObject method. (it with <<SmartObject Name>> and <<Method>>)
-Select Configure -> In Input Mappings – select email or FQN from Context Browser -> System Values -> Current User -> FQN or Name or Email (depends) as Input parameter to AD SO method (Getlist)
-Your View is ready with User details.
Thanks for your help hemantnehete i tried it nice, thanks again.
During new form/view loading I can see that data from active Directory for specific field is there (inside field) but when a new form/view is loaded completely, then the data in these fields disappear and Then I have to select all the data again from the drop down list. What should I do that data retrieved from active directory is not lost during complete loading of a form or view?
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.