If you ever encounter this error with a SharePoint 2010 Environment on Windows 7, Ensure, you enable this: Internet Information Services -> Web Management Tools -> IIS 6 Management Compatibility -> IIS 6 WMI Compatibility
You must have tried External Content Types - the exciting new feature in SharePoint 2010 to connect to an external SQL table and provide a list where it lists, creates, updates data straight into the SQL table. People always wonder, how do you get a ECT to work with a Stored Procedure, one that has input parameters. You could do it this way... Step 1: In your SharePoint Designer 2010, create a new external content type Step 2: Connect to your SQL Server and then make sure you see the Routines (your stored procedures must be listed here) Step 3: Rt Click on the Stored Procedure name and create operations for "Read Item" and "Read List" - both are required for the External Content Type's SharePoint list to be created. During both these wizards, in the Input Parameters, your SP's Input Parameter will be listed. Here, you need to create a filter, which sends out it's value to the SP's filter. For example, if your SP's Input Parameter is @Emp...
Consider the following scenario: You have a SharePoint Site which has its regional settings set to English (UK) - so that the date format becomes dd/mm/yyyy in all date pickers You would like to validate a particular date field in your List or Document Library against the current date If the validation does not pass, you should not allow the form to save So what the script does is: Uses the sputility (check my previous posts and also look at http://sputility.codeplex.com) to get the particular SharePoint date field It comes out as a date datatype, so I cast it to string Since the format is in dd/mm/yyyy and Javascript compare and date functions work only with mm/dd/yyyy, I am converting them back to that format then using UTC string conversions and comparing... Enjoy! <script type="text/javascript"> function PreSaveAction() { var createdate = SPUtility.GetSPField('Date of Creation').GetValue(); var createdatestr=createdate.toString(); ...
Comments
Post a Comment