Posts

Showing posts from September, 2013

SharePoint 2010 Modal Dialog Pop up

Modal Dialogs in SharePoint 2010 use the client library SP.UI.ModalDialog and ShowPopupDialog. We can open Dialog without leaving the page by writing simple html markup and by calling some SP.UI.ModalDialog API’s. Most simplest and an easy way to create SharePoint Modal Dialog is, calling JavaScript function and pass only URL parameter. <a href=”javascript:SP.UI.ModalDialog.ShowPopupDialog(‘/_layouts/viewlsts.aspx?isDlg=1′);” > View All Contents < /a> isDlg=1 Optional You can simply add “&IsDlg=1″ to any SharePoint URL and the chrome will be turned off. There are some parameters specially setting the width and the height of the window and a null parameter for call back function. which for now is set to null. We can create Dialog with specified hight and width like, < a href=”javascript:SP.UI.ModalDialog.ShowPopupDialog(‘/_layouts/viewlsts.aspx?isDlg=1′, null, 500, 300);” > View All Contents < /a> If we want to open Dialog and on clos

SharePoint Custom Workflow Failed on start (retrying).

recently we developed custom sequential workflow with initiation page. when we click to run workflow on initiation page, workflow status message shows failed on start (retrying). We try to find the root cause, first we analyze initiator permission level.  then we checked workflow onActivated coding block and correlation tokens of workflow activities, seems every thing fine. after long time we find the solution similarly to permissions, during workflow starting activity ( Web.Site.WorkflowManager.StartWorkflow(workflowListItem, association, GetInitiationData) we given safe updates to true and false of workflow item on workflow onActivated event. that causes to inconsistence of item permission workflow got stopped. once we removed alowunsafeupdates of an item workflow runs smoothly.