Showing posts from October, 2016

Accessing Radio Buttons using JQuery in SharePoint Online

I couldn't find anything obvious for accessing SharePoint Radio Buttons so chucked this together, hopefully useful for someone else :)

Note: The below code/solution is applicable to accessing radio button in a custom SharePoint List forms. To know how to create a custom form in SharePoint Online, read this article 
"Get Current Logged in User & Manager using REST API in SharePoint Online". 

Accessing Radio Button control in SharePoint is little tricky than accessing the radio buttons in HTML. The reason being, radio buttons are rendered as a table instead of a single control as shown below (radio button and it's preview in developer tools - Chrome):

So, each radio button is rendered inside SPAN tag in a table. To access the normal SharePoint controls, we will use either ID or title property but for Radio Buttons it is little complicated.
1. The actual radio button control is in "input" tag 
2. The values (Example here: Yes, No) are inside "label" ta…

Get Current Logged in User & Manager using REST API in SharePoint Online

Environment: SharePoint Online 
Approach:      Populating Current logged in user in People Picker. Also populating user's Manager automatically using REST API and SP Services. Solution: 1. Create an SharePoint custom list "Learning" (in my case). 2. Create two columns with the following names and data types shown below:          Internal Name                     Title                                                  Type CurrentLoggedinUser          Current Logged in UserPerson or Group (People Only) Manager                             ManagerPerson or Group (People Only 3. When you try adding a new item in the list, it should look like: Here the two people pickers are SP 2013 people picker type where it will show the matching users while typing few words automatically. 4. Now open the list in SharePoint Designer, Create a New Custom Form and make it as default as shown below in the screenshots:
Open the new custom form in Advanced Mode, where you can edit the List Form. T…

Deploying List Workflow in SharePoint Online

Recently, I had a query from one of my readers about migrating the Workflows from development to production and the environment is SharePoint Online.
Scenario: Suppose that you have created a List Workflow in development site in SP Online and now it is ready to move to Production in SP Online, you can follow the following steps to deploy the workflow. This method is easy, cheaper since no third party tool (licensing cost) is used for migration/deployment.
Solution: 1. Take the backup of SP list with or with out content (depending upon the requirement). List backup will be in .stp format. 2. Download the List Template from List Templates (Site Settings -> Web Designer Galleries -> List Templates). 3. Upload the List Template in the PROD site in the same path (Site Settings -> Web Designer Galleries -> List Templates). 4. Create a new app from "Add an App" and create the list with the same Internal Name (impt: the internal name of the list created in the PROD should…