I’m in need here in the company of two web parts to query profile service. One is a list of the employee birthday of the day and the other is search for employee phone extension. The Birthday webpart will list the employee with birthday of the present day and also they will do a specific birthday date search. The phone extension will be a textbox autocomplete search for a employee phone extension (and other info too), so thats why i need to do a search in the profile services.
My idea was to use the client objects of 2013 version (CSOM) but have not found a method to list of users but only recovering a particular user (when you already provides the user login). Then I thought about building a WCF from scratch (even to put in cache these employee informations and optimize the performance) but was afraid to build something that already exists.
What do you guys think?
Thanks in advance.
Dan
I will study better this web part to see how can i apply the interface required (is a customized branded intranet home) but i’m quit convinced that this is the correct path. Thanks a lot for the input.
No reason to do iteration at all.Â
- It is too “heavy” operation
- You going to have the same “first” load all over the servers in the farm
- You need to implement caching properlyÂ
- You can’t move that to the cloud/O365
- It is server side code which might not be a case since SP2013 release
- It required downtime on the farm, as you would have farm-solution
- Server side code is not recommended anymore
Search API provides a neat stuff to query data you need – you my consider to put cache over it in case of custom web part utilizing Search API. But all that has been already done with in OOTB Search Based web part – ether Search Result or Content By Search Results.
So, just add the JS render template, configure search query and that’s it.
If you need a repeatable provision experience, well..
- You may iport-exprot the web part *.webprt file
- You may deploy as part of apps/sandbox
- manually/powershell adint to the target page
Seems to be quite cool so far. What do you thin of it?
Actually i didn’t found the birthday field using the rest with javascript so i started using the old user profile iteration, maybe i did something wrong on the rest thing (probably).Â
Why not iterate via user profiles. I was planning to cache the birthday users of the day on the first iteration.