Tag Archives: sharepoint

Problem fixed: Use SharePoint Designer Workflow to send emails to all members of a particular SharePoint group

It is a very common business requirement that an email is required to be sent to multiple people from a particular SharePoint Group for notification or something. However, by default, SPD will only send an email to the first member of the list and it will ignore for the rest.

Please follow this configuration for fixing this problem:

1. Assume you have a SharePoint Group called “Approver”.

2. Go to “Group Setting” of the group, under the section “Group Settings”.

  • Make sure Everyone can view the membership of the group
  • Make sure Group Members can edit the membership of the group too.

3. Go to “Site Permissions”, make sure to ONLY give the group for Read Only access.

4. In SharePoint Designer, add an action “Send email”. Choose the column which represents your share point group. And make sure the return value is “Display name”. Otherwise, it won’t send email.

PS. For testing, please ensure to use different accounts with different email addresses. If all accounts are using the same email address, this workflow will only send one email to the same address as they automatically merge.

Now, the workflow should be able to send emails to multiple people from the group.

Solved: Custom Master Page makes “Add an app” page not being displayed.

I have experienced that “Add an app” page is kept Loading after a new customer master page is applied across a site collection.

Solution:

1. Go to edit the .html of the custom master page.

2. Make sure Visible=”true” for the ids(DeltaPlaceHolderLeftNavBar, PlaceHolderLeftNavBar, DeltaPlaceHolderPageTitleInTitleArea, PlaceHolderPageTitleInTitleArea)

3. Save to apply those changes.

How to add a print button on a SharePoint List

Reference Link:

http://microsoftechies.com/2013/03/25/print-a-list-item-in-sharepoint-2010/

Steps:

Open a List
Hit the List tab

In the ribbon: Click the Form Web Parts dropdownlist

Form Web Parts

Form Web Parts

Choose “Default Display Form”

At the top of the Page – Insert Tab, Click the Web Part button to add a new Content Editor web part (CEWP). From Categories choose “Media and Content” > “Content Editor” and add it to the main section of the page. Click the “Click here to add content” and then click the HTML button in the Ribbon to bring up the Edit source code window

In the top ribbon under Markup Click on HTML , Select “Edit HTML Source” Option
You will get new window.

In the window add the following code to display a Print Button at the top of the list item window.

<code>
<input onclick=”window.print();return false;” type=”button” value=”Print this Page”/></code>

Ignore any warnings;

Next, hit the Page tab at the top of the page to view the List item. You should see the Print button;

Hit the Print button to print just the list item.

Change the Default SharePoint OK and Cancel Button

Sometimes, we want to lead a page to a particular url location after clicking the SharePoint default OK and Cancel Button. However, it seems there is no way to change it. There is workaround I found on:

http://anythingprogramming-emsomeone.blogspot.com.au/2011/09/change-default-sharepoint-ok-and-cancel.html

Requirement:

When you click on the sharepoint OK and Cancel button, it should be redirected to a different url.

Workaround:

Instead of using the default sharepoint buttons:

<SharePoint:SaveButton runat=”server” ControlMode=”Edit” id=”savebutton1″ Text=”OK”/>
<SharePoint:GoBackButton runat=”server” ControlMode=”Edit” id=”gobackbutton2″/>

replace them with this:

<input type=”button” value=”OK” name=”btnSave” onclick=”javascript: {ddwrt:GenFireServerEvent(‘__commit;__redirect={}’)}” />


<input type=”button” value=”Cancel” name=”btnCancel” onclick=”javascript: {ddwrt:GenFireServerEvent(‘__redirect={}’)}” />

*** Note:
– You can put any URL in the __redirect={} that you want, for example __redirect={http://www.google.com} or __redirect={/news/PressReleases/}
– There should be no quotes around the URLs passed into the __redirect directive

What is JQuery?

While SharePoint offers a number of ways to change content structure for subsites, lists, libraries, views, columns, content types and the out-of-the-box Web parts, sometimes it’s just not enough.

There are times when users or designers and developers need to make changes to the functionality and appearance of a SharePoint site in a way that is not allowed by their IT department. Since SharePoint Designer is restricted in most organizations, it is not usually an option. Another more accessible possibility is jQuery.

JQuery is a JavaScript library that lets you manipulate the user interface of SharePoint in a way that does not impact a site beyond the page. It can do this because the code is only executed in the browser and on the Web page. It has no impact on what the server serves up, which gives users a great deal of freedom beyond the out-of-the-box functionality and UI.

Adding some jQuery code to your site is simple because SharePoint already provides the means to do it — the humble Content Editor Web Part (CEWP). While this Web part is usually used to display formatted text on a SharePoint page, it can also be used to run jQuery scripts. All you have to do is add a CEWP to your page, paste in the script, press OK or apply it. No need to compile code on the server, no complex change control procedure to get through with IT, and if it goes wrong, the worst situation is that you will have to remove the Web part from the page. The only thing you should test are browser versions, just to be sure they are compatible.

JQuery uses a library of functions hosted by Google to manipulate the data or structure (such as cascading style sheets) on your page. For that reason, most examples of jQuery you will find on the Web contain a line like this at the top:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"> <... 

What is content type?

Content type is something like meta-data(the data of data). We can define content type in SharePoint to describe some information such as documents, employees, media files and etc. For example, a song can have its title, author, publishing date, popularity, type and language. In this case, the content type is “title, author, publishing date, popularity, type and language”. We can set up a content type called “Songs” in SharePoint.
People always discuss the benefit between using content type and folder in SharePoint. The benefit of using content type against folder is that correct information can be extracted and found very easily by making a correct query. And reports can be generated easily from specific business requirements. For example, if I want to see all songs sung by “Michael Jackson” and the popularity is 5 stars and was made before 1990. We can create a view in SharePoint and make a query like:

Author=”Michael Jackson” and Popularity>=5 and publishing date<=1990.

It will come out with all results you want to see.  Imagine of how we can get the same result like that if using the methodology of folder. The answer is No or you will need to go to click every single folder for those results.