Posts

Event Registration Sharepoint 2013

SP doesn't provide any OOB way to stop registration if seats are filled. Or any way to unregister from an event. To do this I created 2 code blocks, one for registration and another for unregistering. The basic idea was from this blog when I was searching for any code to do this. However this uses the Infopath. Since Infopath is becoming obsolete, I had to create ajax and java script updates to lists. Register and Unregister from an event Steps to Follow 1. Create Create 2 lists "Events" & "Volunteer Signup" I will provide steps to perform for the code to execute. Register <script language="javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { SP.SOD.executeFunc('sp.js', 'SP.ClientContext', getCurrentUser); document.getElementById("Meetin

Multivalue Dropdown Refiner Sharepoint 2013

Filter Multivalue dropdown.html <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"> <head> <title>Multi-value Dropdown Refinement Item</title> <!--[if gte mso 9]><xml> <mso:CustomDocumentProperties> <mso:CompatibleManagedProperties msdt:dt="string"></mso:CompatibleManagedProperties> <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden> <mso:CompatibleSearchDataTypes msdt:dt="string"></mso:CompatibleSearchDataTypes> <mso:MasterPageDescription msdt:dt="string"></mso:MasterPageDescription> <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106604</mso:ContentTypeId> <mso:TargetControlType msdt:dt="string">;#Refinement;#</mso:TargetControlType> <mso:HtmlDesignAssociated msdt:dt="string"

Anniversary Web part SharePoint JavaScript

Image
Create a Refinable Property like Refinabledate according to the requirement. Go to site settings > Search schema. In the managed properties, search for refinabledate00(if this is already mapped select an empty one) and map it to the SPS-Anniversary crawled property(by default sharepoint crawls the AD user profile properties with a prefix of SPS-). Run a full crawl for the refinabledate to get all the info generated. To test if refinable property has values run a search query https:// yoursitecollurlhere /_api/search/query?querytext=%27*%27&sourceid=%27B09A7990-05EA-4AF9-81EF-EDFAB16C4E31%27&selectproperties=%27Title,Refinabledate01,Path%27&sortlist=%27Refinabledate01:ascending%27&rowlimit=500 Once you get a set of results as below, you can paste the url into the below code Once you get results for the query, iterate through results with condition according to which dates you want to show the birthdays for. For this you need to get the current date which is in

Birthday Javascript Sharepoint 2013

Below is the code to pull birthdays using REST API search Sharepoint 2013. Create a Refinable Property like RefinableString or Refinabledate according to the requirement. In my case I had to try both and had an issue with Refinabledate since the month was getting appended to the year. Lets say someone has mar 23rd as birthday in User profile property, the date was showing as 01-03-2023. Hence I had to assign it to a string. Since in our environment it was a dd-mmm(no year) format which was a custom profile property, It was showing 23rd-March in my case. Once RefinableString02 was assigned it was showing the same dd-mmm format. For getting the right url you need to have the querytext as * and source id to the people, and select the properties required which is  "Title,RefinableString02,Path". Then fire an ajax query as below with the rest url as below:https://yoursitecollurl/_api/search/query?querytext=%27Refinabledate00%3E%222-7-2000%22%27&sourceid=%27B09A7990-05E

Steps to Call WEB service with JSON Payload from SharePoint Workflow:

I have a request from client for calling JSON Ideas :  1.  Call HTTP from Sharepoint Workflow to Get and Post data from a SOAP web API. 2. Create a an event Listner to call each time item create or update methods. 3.  Add an adaptor layer on top of the SOAP service which converts the SOAP response to a JSON response which is returned via the REST interface. Steps to Call WEBservice with JSON Payload from Sharepoint Workflow: 1. Build the JSON payload in workflow. Sharepoint 2013 has new functionality of Build Dictionary which will store a dictionary value which are basically the json objects building for sending to the WSDL. 2. We need to build a WEB API with the service references to the SOAP WSDLs and instantiate the members of the SOAP service reference. We need to instantiate the ServiceManagerClient which gets created when we add a WSDL as service reference. 3. We also need a MVC project with WebAPI in Visual studio. 4. Now we need the call http action in Workflow t

MIM vs UPS in SP2016

Back to the Future with SharePoint 2016 User Profile Synchronization in Share 5 Posted by   Eric Shupps  on Mar 8, 2016 4:09:03 PM With every iteration of the SharePoint Server platform, there are new features and functionality that administrators must learn about. But every now and then, instead of introducing something entirely new, Microsoft goes in the opposite direction and revisits the ability to better reflect customer needs. Such is the case with User Profile Synchronization in SharePoint Server 2016. Every administrator who has worked with SharePoint outside of a lab environment has struggled with the process of synchronizing user data between an identity-management system and the SharePoint User Profile service application. It is one of the least understood and most challenging feature sets in the entire platform. There are many reasons for this, but foremost among them is the reliance of the primary synchronization mechanism in the 2010 and 2013 p