Smartform Search Control - Search AD by Displayname

  • 20 February 2014
  • 2 replies
  • 2 views

Badge +1

I have a field that will house a real active directory user, but at times, the data coming into it will be a dummy account or a user that is no longer around.  The user wants to change it to a real person.


How can I add a search control to a view where the user can type in an AD displayname (or portion thereof) and have it retrieve the name.


Kind of like how it works with Sharepoint People Picker, but for smartforms


 



2 replies

Badge +7

What's the difference on the AD side between the two types of accounts your trying to create?


When we disable an account, it will no longer show up in the people picker.  However, my test accounts do show up.


What's the definition of your dummy data or user?

Badge +1

Let me try to explain better... We are new to K2, so I appreciate your patience.


I believe that we will have a peripheral process coded to start our workflow.


Let's give an example of Clients...


So, let's say, our external system contains clients, and when new clients are added, they are assigned to account managers in our organization.


So, at some point, let's say we want someone to verify the client (via a workflow), and we use our external process calling k2 api to populate a smartobject with data, including Account Manager (an active directory user display name), and start an instance (worklist item) for "Client Verification" workflow.  All of the client data should be displayed in the smartform / worklist item.


Now, let's say our "Client Verifier" has completed his/her work and has selected "verification complete" and wants to have K2 fire off an email to the account manager that client verification is complete. In a perfect world, the email is sent and all is well.. However, we can have the following scenario where by the time the work flow is kicked off, the Account Manager has left the organization, and someone has assigned the account to "House".  This time, the work flow is kicked off with an invalid AD "account manager".  


I want to be able to have the ability, when working the item, to update the House account manager to a real person in the organization.  Inside K2, not necessarily the feeding system. This way, by the time the account gets to "verification complete" status, an email is, indeed, sent to a real person.


I was thinking that we could do something like a People Picker in smartforms.  You know how you can redirect a task in k2 admin?  Where you select the user (except it's by userid, not username.. a whole other topic I need to explore as we need to pick names on redirects too).  If we've created a field in a smartobject called, say, AcctMgr, couldn't we use that with a picker control?  Or set up a subform where they pick the user - by true name and not userid?  They would be looking for Smith, John (displayname) not smithj or jsmith (Name (userid)).


I did notice that the "getuser" AD SmartObject does not have displayname as an INPUT property.  Not sure if I would have to modify the AD service and SO to accommodate that or if some of you fine underground folks can help.


One more thing.  We have a very large Active Directory user list here.  In my lab, using the smart object tester, when giving userid (name), I was impressed at how quick the information was returned.  I tried it for a group too and it was pretty quick.


Thanks


 

Reply