Posts

Nintex Online for Office 365 Form: How to Know Form Mode using JavaScript

Image
In Nintex Form for office 365, unlike SharePoint Designer, there is no separate form for New, Edit and Display Form. So, we need to design the form to keeping this limitation in mind. There are two options to add JavaScript in Nintex Form, Internal and External. If you are using Internal JavaScript you have the option like But If you are using External JavaScript (which is good practice) the (Is Edit Mode) will not work. In this case we can use below script. In this URL, the querystring "mode" represents the New/Edit and Display form. For NewForm mode=0, for EditForm mode=1 and for DisplayForm mode=2. // For New Mode if(window.location.href.toLowerCase().indexOf("mode=0") > 0){ } // For Edit Mode if(window.location.href.toLowerCase().indexOf("mode=1") > 0){ } // For Display Mode if(window.location.href.toLowerCase().indexOf("mode=2") > 0){ } The above code is very useful when you reference the external JavaScript...

Nintex Online for Office 365 Form: How to customize Print to PDF functionality using JavaScript

Image
In Nintex Online for Office 365, the Print to PDF button is available in ribbon. But if you want to implement the same functionally in your custom JavaScript button then follow below steps. Step 1:   Add a button, Set the property Button Action: JavaScript Button Type: Button Button Lebel: Print to PDF Cause Validation: No Client Click: printToPDF(); Step 2: Go to Ribbon- Designer- Form Settings-Custom JavaScript and add below code function printToPDF(){ NF.PrintToPDF(window).Print(); return false; } Click Save - Publish the Form By default, it will print the whole form. But if you want to hide certain elements on PDF, at first hide using jQuery and then call NF.PrintToPDF(window).Print() function, like function printToPDF(){ NWF$('.menuButton').hide(); NF.PrintToPDF(window).Print(); NWF$('.menuButton').show(); return false; } :-)

How to add Custom ECB (Context Menu) in SharePoint Online List

Below is the script for adding context menu in SharePoint List <script language="javascript" type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>   <script language="javascript" type="text/javascript">      $(document).ready(function() {          SP.SOD.executeFunc('sp.js', 'SP.ClientContext', AddCustomUserActionToECB);      });      var oListItem;     function AddCustomUserActionToECB() {          //Get the client context,web and list object           var clientContext = new SP.ClientContext();          var oWeb = clientContext.get_web();          var oList = oWeb.get_lists().getByTitle('TestList');        ...

Error occurred in deployment step 'Activate Features': The field with Id {GUID} defined in feature {GUID} was found in the current site collection or in a subsite.

Hi all, In SharePoint 2010, This error might come when you deploy and activate Feature using Visual Studio 2010. Deployment works file  but in activation process it gets stuct and throw error. Error occurred in deployment step 'Activate Features': The field with Id {GUID} defined in feature {GUID} was found in the current site collection or in a subsite. When I googled I found very good solution from Sandeep Snahta Blog. http://snahta.blogspot.hk/2011/10/error-in-activate-features-from-visual.html As suggested in this blog, there is two option to overcome this error; 1. Close VS2010 and restart again. Or 2. Kill VSSHost4 Process either through Task Manager or Via Power Shell Command     stop-process -processname vssphost4 -force Thanks, Jayant Sharma

How to Change System Application Pages (Like AccessDenied.aspx, Signout.aspx etc)

Hi All, An advantage of SharePoint 2010 over SharePoint 2007 is, we can programatically change the URL of System Application Pages. For Example, It was not very easy to change the URL of AccessDenied.aspx page in SharePoint 2007 but in SharePoint 2010 we can easily change the URL with just few lines of code. For this purpose we have two methods available: GetMappedPage UpdateMappedPage: returns true if the custom application page is successfully mapped; otherwise, false. You can override following pages. AccessDenied,  Specifies AccessDenied.aspx. Confirmation,  Specifies Confirmation.aspx. Error,  Specifies Error.aspx. Login,  Specifies Login.aspx. RequestAccess,  Specifies ReqAcc.aspx. Signout,  Specifies SignOut.aspx. WebDeleted,  Specifies WebDeleted.aspx. ( http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.spcustompage.aspx ) using (SPSite site = new SPSite(http://testserver0...

How to change the Target URL of EditForm.aspx, DispForm.aspx and NewForm.aspx

Hi All, To changing the URL of ListForms we have very limited options. On Inernet if you search you will lots of article about Customization of List Forms using SharePoint Desinger, but the disadvantage of SharePoint Desinger is, you cannot create wsp of the customization means what ever changes you have done in UAT environment you need to repeat the same at Production. This is the main reason I donot like SharePoint Desinger more. I always prefer to create WSP file and Deployment of WSP file will do all of my work. Now, If you want to change the ListForm URL using Visual Studio, either you have create new List Defintion or Create New Content Type. I found some very good article and want to share.. http://www.codeproject.com/Articles/223431/Custom-SharePoint-List-Forms http://community.bamboosolutions.com/blogs/sharepoint-2010/archive/2011/05/12/sharepoint-2010-cookbook-how-to-create-a-customized-list-edit-form-for-development-in-visual-studio-2010.aspx Whenever you cre...