Showing posts with label SharePoint 2007. Show all posts
Showing posts with label SharePoint 2007. Show all posts

Friday, 18 December 2015

Birthday reminder using SharePoint list

If you have SharePoint 2007 and up, AND it is the enterprise version of SharePoint, then you can use what's called Information Management Policies.
  1. Create a SharePoint list (custom list template) with all the people (in a people picker field) and their birthday (in a date field)
  2. Create a SharePoint Designer workflow on that list, that has one action: Send an email.  Put the birthday person's name in the TO  box of the email, and make the subject and body say whatever you want. 
  3. Publish the workflow.
  4. Go to the list's advanced settings, and change 'allow mgmt of content types' to YES.
  5. In list settings in the list of content types, there will only be one, called Item.  Click Item.
  6. Click Information Management Policy settings.
  7. Click "define a policy" and click OK.
  8. check the box next to "enable expiration"
  9. next to "a time period based on this item's properties, pick your birthday field + 1
  10. next to 'perform this action" choose to run a workflow
  11. Pick the name of the workflow you created at step 2

This will run every night and if it's a person's birthday they will get an email... the next day.

Tuesday, 28 October 2014

Delete all attachments from custom SharePoint list without code

There are some times when you asked to delete all attachments from a SharePoint list. SharePoint itself has given simple solution for this which will not require knowledge about coding or PowerShell or any difficult and time consuming techniques.

Few clicks and your work is done.

  1. Open your list
  2. Go to list settings
  3. Advanced Settings
  4. In Attachments option select radio button "Disabled" and click OK
  5. It will ask you for confirmation
  6. And once you confirmed, it will delete all attachments from SharePoint list
Done....

Hope this helps...


Thursday, 4 July 2013

Prevent duplicate values in SharePoint 2007 list column

In SharePoint 2007 list, if we want to prevent duplicate values in a column, we can make use of the SPServices MakeUnque function.

More details are here:
http://spservices.codeplex.com/wikipage?title=$%28%29.SPServices.SPRequireUnique&referringTitle=Documentation

Currently, the function works only with Single line of textcolumns.





Thursday, 12 January 2012

Lockdown feature functionality for MOSS

What is the lockdown feature? The simple answer is that it keeps anonymous users from being able to see things they shouldn't, like list views, etc.

For more technical information see:
http://blogs.msdn.com/b/ecm/archive/2007/05/12/anonymous-users-forms-pages-and-the-lockdown-feature.aspx

Monday, 2 January 2012

Get parameters from QueryString using JavaScript in SharePoint?

To get the querystring values, through JavaScript on a SharePoint site we can easily utilize the JSRequest object of MOSS.

It has 3 fields: QueryString, FileName, and PathName.

QueryString - is an array of key\value pairs representing the current query string parameters.
FileName - is a string containing the current name of the current page.
PathName - is the server relative path of the current page.

How to use it:

 <script language="javascript">

//First we have to call the EnsureSetup method
JSRequest.EnsureSetup();

//Get a query string parameter called ItemId. i.e. - "page.aspx?ItemId=5" will return 5
itemId = JSRequest.QueryString["ItemId"];

//Get the current page name. i.e. - "default.aspx"
itemId = JSRequest.FileName;

//Get the current path name. i.e. - "/abc/doclib/default.aspx"
itemId = JSRequest.PathName;

</script>

I hope this information will be helpful.



How to create count related lookup column in SharePoint custom lists?

A lookup count column is a special type of computed field that computes the number of items in the target list that point to the current item.

Let’s say I have two lists Departments and Employee Data. Now in Department list I want to add new column which will calculate how many employees are there in that department.

Here’s how we need to setup our lists:

1) Create a Department list. And add your department values in a title column.


2) Create an Employee Data list. In “Employee Data” list I renamed ‘Title’ column to ‘Employee Name’. And then add column ‘Department’ which will be lookup column pointing to the title column in the Department list.



3) After adding some test values in “Employee Data” list the list will look like this



4) Now go to “Department” list, add a column of type "Lookup" referring to the “Employee Data” list and you'll notice that in the drop-down area where you define the lookup, you'll have a new option called "Count Related". This is here automatically because it recognizes that the “Department” list has a lookup pointing back to this one. Select that Count Related option.



5) Now your Department list will have a column counting how many employees are associated with that Department.



This doesn’t require any coding or JavaScript. A hidden SharePoint magic.



Monday, 31 October 2011

JavaScript and SharePoint List Form fields

Sometimes we need to hide some of the fields, set default value for fields, get the current value of fields on List new form, and edit form, display form.

We can achieve this using JavaScript.

To start with, Microsoft Team has given a good solution on this post http://blogs.msdn.com/b/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx

But there are some catches, when we use code given in above post for controls like check box, multiple line textbox.
There is a very good post on cleverworkaround which has much improved JavaScript to overcome these controls.
http://www.cleverworkarounds.com/2008/02/07/more-sharepoint-branding-customisation-using-javascript-part-1/

To return values for SharePoint field types from newform and editform, below is good post given by Alexander on his blog SharePoint JavaScript
http://sharepointjavascript.wordpress.com/2008/12/02/return-value-of-all-sharepoint-fieldtypes-with-javascript/

Hope all these information will be helpful for all of you.

Wednesday, 7 September 2011

How to get GUID of a SharePoint List or Document Library.

In Sharepoint , the easiest way to get GUID of List is:
  1. Go to Sharepoint List or Library Setting
  2. Click on Audience targeting settings 
  3. Copy the url from the browser
  4. You will get url something like this http://Sitename/subsites/_layouts/ListEnableTargeting.aspx?List={7a6d10fa-267c-468c-8d1e-1030323a5846}
  5. From the url we only need text which is after ?List=
  6. That text is GUID for the respective list



Related Posts Plugin for WordPress, Blogger...