Nintex Custom Ribbon Control 2013 - Implementation Example (Custom Action)

Goal: To create the custom action that going to display the button at Nintex form setting ribbon.
Feature Scope: Site
Identify the location: Using the IE developer tool you can identify Ribbon group. 



Location: Nintex.Forms.SharePoint.Ribbon.FormDecustomer.FormTab.CommitGroup.Controls._children
CommandAction: Display the Popup to show create filed form: ' _layouts/15/fldNew.aspx

Element.xml
<CustomAction
   Id="Custom.SharePoint.Ribbon.NewControlInExistingGroup"
   Location="CommandUI.Ribbon" Sequence="20">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Nintex.Forms.SharePoint.Ribbon.FormDecustomer.FormTab.CommitGroup.Controls._children">
          <Button Id="Custom.SharePoint.Ribbon.NewControlInExistingGroup.Notify"
                  Command="Custom.Command.NewControlInExistingGroup.Notify"
                  Sequence="5" Image16by16="/_layouts/15/NintexForms/images/BorderColour_16.png" Image32by32="/_layouts/15/NintexForms/images/BorderColour_32.png"
                  Description="custom ribbon control."
                  LabelText="Custom Field Control"
                  TemplateAlias="o1"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="Custom.Command.NewControlInExistingGroup.Notify"
    CommandAction="javascript:
        var listid=getQueryStringParameter(&quot;List&quot;)
    function getQueryStringParameter(paramToRetrieve) {
      var params =
      document.URL.split(&quot;?&quot;)[1].split(&quot;&amp;&quot;);
      var strParams = &quot;&quot;;
      for (var i = 0; i &lt; params.length; i = i + 1) {
        var singleParam = params[i].split(&quot;=&quot;);
          if (singleParam[0] == paramToRetrieve)
          return singleParam[1];
        }
    }
   
          var u = _spPageContextInfo.webServerRelativeUrl;
if (u.length > 0) {if (u[u.length-1] != '/') u += '/';}
  
      var fullUrl = u + ' _layouts/15/fldNew.aspx?List='+ listid + '&amp;IsDlg=1'
       var dialogOptions = {
          url: fullUrl,
          title: 'Custom form',
          showClose: true,
        };
        SP.UI.ModalDialog.showModalDialog(dialogOptions);"
         
          EnabledScript="javascript:EnableDisable();
          function EnableDisable()
          {
            var result = true;
           
          return result;}"
          /> 
     
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>

You will find the issue while update the ribbon control solution, to fix it check this URL:http://sharepointfordeveloper.blogspot.com/2014/03/solved-visual-studio-sharepoint-ribbon.html

Popular posts from this blog

SharePoint RPC Protocols Examples Using OWSSVR.DLL

STS CryptographicException Error : Key set does not exist

SharePoint 2016 JavaScript framework