Active Directory Properties

  • 28 January 2014
  • 4 replies
  • 28 views

Badge +6

I noticed that the built in AD Service does not contain all properties, including custom attributes.


I am specifically trying to query the FirstName and LastName property to format a more readable user display name string since our AD display name structure is LastName, FirstName by default.


Is the preferred method for this to add a new property to the existing smartobject or use something like Caprivi's AD Inline Function?


I do not want to write any custom code for this.


 


4 replies

Badge +10

Its not just a matter of adding another property to the SmartObject.  The underlying Service Object needs to be able to expose the property for you to add it.  You're correct that the out of the box AD SmartObject doesn't make the First Name and Last Name available as separate properties.


So using my Caprivi AD Inline Function would be an option as well as there is another custom AD service object available on the underground to also expose further AD properties in SmartObjects

Badge +4

Hi All,

 

I am beginner in k2 products , how i can use the Caprivi Active Directory Inline Functions to map the custom AD proptery to a smart form ?  

If there is another way to map the fields , please let me know.

 

environment : Sharepoint 2013 , K2 blackpeart 4.6.7

 

Regards

Badge +10

Unfortunately, there isn't a way to map inline functions to a smartobject.  My previoius post was in reference to using the inline function within a process.

 

Not sure if this would work in your scenario but potentially if this was for a client activity you could call the inline function in the workflow to get the customer AD property and then pass that data to the Smartform.  This wouldn't work if it was the submission form to start the workflow.

 

Otherwise another option, which might be the better one, is to modify the Market's AD Service Object to modify the existing one or create another method to return your custom AD property.  This would require some development but with the sample code it shouldn't be too difficult.

 

http://community.k2.com/t5/K2-blackpearl/Dynamic-Active-Directory-Service/ba-p/869

 

Regards,

Tim

 

Userlevel 3
Badge +16

Hi,

 

I had exactly the same problem with our AD setup, AD names come up as Lastname, Firstname.

 

I spent many weeks and had many headaches trying to get this worked out.

 

Can be done, the key is to use Expressions to seperate the Lastname, Forename by the comma (if that's what you have come up as it is).

Do an expression to store the Lastname, another one to store the Forename, then finally one last expression to concat them together.

 

If you can't get the expressions working, give me a shout, or do a search on here, there is a  post from me somehwere on here where I got some good help and screenshots from members on how to achieve this.

 

I was just using this for form display purposes, so not sure if this is what ur after, but you can split the name and perhaps use that value for lookup?

 

Good luck, even the simplist things can be tricky to achieve with K2, but its great once you get into it, has taken me months and i'll slowly warming to it.

 

Reply