29/04/2015

Differences between Event Receivers and SharePoint Workflows

 

Event Receivers
Workflows
Can be Executed Synchronously or Asynchronously.
Can be Executed only Asynchronously which means when an action is completed.
Since it is executing in both modes we can cancel the action which is going to be occurred.
Once an action is started you cannot stop the operation.
Can't be initiated manually
Can be initiated automatically or manually.
Logs are not possible
Log can be written in workflows
Can be used in actions that needs to be completed immediately based on logic (Immediate execution)
Can be used in actions that will take even months or years to complete.( Long running)
no state is maintained
Workflow maintains state.
Triggered on Synchronous or Asynchronous events.
Triggered only on Creation/Change/deletion events.
 

Read more...

25/04/2015

Unable to get property 'setItem' of undefined or null reference

When using localStorage in HTML5, and try to setItem, the below error will happen:

[Unable to get property 'setItem' of undefined or null reference]

The cause of the error is running the page without use web server such us IIS.
Just add the page with site under IIS and try.

Read more...

15/04/2015

How To Know The Site Template In SharePoint

Easiest way to know the site template for any SharePoint site is by view page source, on the page source find about "SiteTemplateId", and now you can show it.

var g_wsaLCID = 1025;
var g_wsaListTemplateId = 850;
var g_wsaSiteTemplateId = 'BLANKINTERNET#0';

Read more...

08/04/2015

Extract List View GUID

Open the SharePoint list, go to your target view and do the following:

1- Copy the URL and paste in notepad.
2- Replace %2D to -
3- Replace %7B to “{
4- Replace %7D to }

Read more...

06/04/2015

WCF With Sharepoint

When using WCF and need to connect with the sharepoint you must do the following:

1- in web.config: Modify aspNetCompatibilityEnabled from false to true.

2- in main service you could add the below:
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]

EX:
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class TestService : ITestService
    {
    }

Read more...