Archive | SharePoint RSS for this section

Ribbon Action Locations(Custom Actions)

https://msdn.microsoft.com/en-us/library/office/bb802730.aspx

 

The following table shows the locations, custom action group IDs, and custom action IDs that are used in the CustomAction element and theCustomActionGroup element of custom actions that are installed by default in Microsoft SharePoint Foundation.

In the table, each location value corresponds to the Location attribute of the CustomAction element. Each group ID corresponds to theGroupId attribute of the CustomAction element or to the Id attribute of the CustomActionGroup element. Each custom action ID corresponds to the Id attribute of the CustomAction element.

You can create a Feature that implements the HideCustomAction element to hide any default custom action that is identified in the table.

Location Custom Action Group IDs Default Custom Action IDs Group Description
DisplayFormToolbar Not applicable
  • ExportEventToolbarButton(calendars)
  • ExportContactToolbarButton(contacts)
Location corresponds to the display form toolbar of lists.
EditControlBlock Not applicable Not applicable Location corresponds to the per-item edit control block (ECB) menu.
EditFormToolbar Not applicable Not applicable Location corresponds to the edit form toolbar of lists.
NewFormToolbar Not applicable Not applicable Location corresponds to the new form toolbar of lists.
ViewToolbar Not applicable Not applicable Location corresponds to the toolbar in list views.
Microsoft.SharePoint.StandardMenu ActionsMenu Not applicable Actions menu in list and document library views.
Microsoft.SharePoint.StandardMenu ActionsMenuForSurvey Not applicable Site Actions menu for surveys.
Microsoft.SharePoint.StandardMenu SettingsMenuForSurvey Not applicable Site Settings links for surveys.
Microsoft.SharePoint.StandardMenu SiteActions Not applicable Site Actions menu.

Location Custom Action Group IDs Default Custom Action IDs Group Description
Microsoft.SharePoint.ContentTypeSettings Fields
  • AddField
  • ReorderFields
Columns section on site collectionContent Typepage.
Microsoft.SharePoint.ContentTypeSettings General
  • ChangeNameDescription
  • ChangeOptionalSettings
  • ChangeWorkflowSettings
  • RemoveContentType
Settings section on site collectionContent Typepage.
Microsoft.SharePoint.ContentTypeTemplateSettings Fields
  • AddField
  • ReorderFields
Columns section on List Content Type page.
Microsoft.SharePoint.ContentTypeTemplateSettings General
  • ChangeNameDescriptionGroup
  • ChangeOptionalSettings
  • ChangeWorkflowSettings
  • RemoveContentType
Settings section on List Content Type page.
Microsoft.SharePoint.Create WebPages Not applicable Web Pagessection on Createpage.
Microsoft.SharePoint.GroupsPage NewMenu Not applicable New menu on site collectionPeople and Groups page.
Microsoft.SharePoint.GroupsPage SettingsMenu Not applicable Settings menu on site collectionPeople and Groups page.
Microsoft.SharePoint.ListEdit Communications Not applicable Communicationssection onCustomize page for list or document library.
Microsoft.SharePoint.ListEdit GeneralSettings Not applicable General Settingssection onCustomize page for list.
Microsoft.SharePoint.ListEdit Permissions Not applicable Permissions and Managementsection onCustomize page for list or document library.
Microsoft.SharePoint.ListEdit.DocumentLibrary GeneralSettings Not applicable General Settingssection onCustomize page for document library.
Microsoft.SharePoint.PeoplePage ActionsMenu Not applicable Actions menu on site collectionPeople and Groups page.
Microsoft.SharePoint.PeoplePage NewMenu Not applicable New menu on site collectionPeople and Groups page.
Microsoft.SharePoint.PeoplePage SettingsMenu Not applicable Settings menu on site collectionPeople and Groups page.
Microsoft.SharePoint.SiteSettings Customization
  • ProjectSettings
  • NavOptions
  • Theme
  • TopNav
  • QuickLaunch
  • SaveAsTemplate
  • ReGhost
Look and Feelsection on Site Settings page.
Microsoft.SharePoint.SiteSettings Galleries
  • MasterPageCatalog
  • ManageCType
  • ManageField
  • SiteTemplates
  • ListTemplates
  • WebParts
  • Workflows
Galleries section on Site Settingspage.
Microsoft.SharePoint.SiteSettings SiteAdministration
  • RegionalSettings
  • LibrariesAndLists
  • WebUsage
  • UserAlerts
  • RSS
  • SrchVis
  • ManageSubWebs
  • ManageSiteFeatures
  • DeleteWeb
Site Administrationsection on Site Settings page.
Microsoft.SharePoint.SiteSettings SiteCollectionAdmin
  • DeletedItems
  • SiteCollectionUsage
  • Storage
  • ManageSiteCollectionFeatures
  • Hierarchy
  • Portal
Site Collection Administrationsection on Site Settings page.
Microsoft.SharePoint.SiteSettings UsersAndPermissions
  • PeopleAndGroups
  • SiteCollectionAdministrators
  • User
Users and Permissionssection on Site Settings page.

Location Custom Action Group ID Description
Microsoft.SharePoint.Administration.Applications Databases Databases section under Application Management in Central Administration
ServiceApplications Service Applicationssection underApplication Management in Central Administration
SiteCollections Site Collectionssection underApplication Management in Central Administration
WebApplications Web Applicationssection underApplication Management in Central Administration
Microsoft.SharePoint.Administration.Backups FarmBackup Farm Backup and Restore section underBackup and Restorein Central Administration
GranularBackup Granular Backupsection under Backup and Restore in Central Administration
Microsoft.SharePoint.Administration.ConfigurationWizards FarmConfiguration Farm Configurationsection underConfiguration Wizards in Central Administration
Microsoft.SharePoint.Administration.Default
  • CA_Applications
  • CA_Backups
  • CA_ConfigurationWizards
  • CA_GeneralApplicationSettings
  • CA_Monitoring
  • CA_Security
  • CA_SystemSettings
  • CA_UpgradeAndMigration
Default page in Central Administration
Microsoft.SharePoint.Administration.GeneralApplicationSettings ExternalServiceConnections External Service Connections section under General Application Settingsin Central Administration.
SiteDirectory Site Directory section under General Application Settingsin Central Administration.
SPD SharePoint Designersection under General Application Settingsin Central Administration.
Microsoft.SharePoint.Administration.Monitoring HealthStatus Health Analyzersection underMonitoring in Central Administration
Reporting Reporting section under Monitoring in Central Administration
TimerJobs Timer Jobs section under Monitoring in Central Administration
Microsoft.SharePoint.Administration.Security GeneralSecurity General SecuritySection under Securityin Central Administration.
InformationPolicy Information PolicySection under Securityin Central Administration.
Users Users Section underSecurity in Central Administration.
Microsoft.SharePoint.Administration.SystemSettings Email E-Mail and Text Messages (SMS)section under System Settings in Central Administration.
Farm Management Farm Managementsection under System Settings in Central Administration.
Servers Servers section underSystem Settings in Central Administration.
Microsoft.SharePoint.Administration.UpgradeAndMigration Patch Upgrade and Patch Management section under Upgrade and Migration in Central Administration.

Location Custom Action Group IDs Default Custom Action IDs Group Description
CommandUI.Ribbon.ListView Not applicable See Default Server Ribbon Customization Locations Location corresponds to the list view.
CommandUI.Ribbon.NewForm Not applicable See Default Server Ribbon Customization Locations Location corresponds to the new form for the list.
CommandUI.Ribbon.EditForm Not applicable See Default Server Ribbon Customization Locations Location corresponds to the edit form for the list.
CommandUI.Ribbon.DisplayForm Not applicable See Default Server Ribbon Customization Locations Location corresponds to the display form for the list.
CommandUI.Ribbon Not applicable See Default Server Ribbon Customization Locations Location corresponds to the list view and edit, new, and display forms for the list.
Advertisements

MSDN Article for CommandUIHandler Element

https://msdn.microsoft.com/en-us/library/office/ff458385.aspx

Applies to: SharePoint Foundation 2013 | SharePoint Server 2013

In this article
Attributes
Child Elements
Parent Elements
Occurrences

Defines the handler for a command.

<CommandUIHandler
  Command = "Text"
  CommandAction = "Text"
  EnabledScript = "Text"
 />

Attribute Description
Command Required. The name of a command. The value of this attribute matches the value of a Command attribute on an element that defines a control.
CommandAction Required. A script statement to execute when this handler is invoked. Microsoft SharePoint Foundation calls theeval method, passing in the value of this attribute.

The value of the attribute can contain substitution tokens that are transformed at rendering. The following tokens are recognized:

  • {ItemId} – ID (GUID) taken from the list view.
  • {ItemUrl} – Web-relative URL of the list item (Url).
  • {RecurrenceId} – ID of a recurrent item (RecurrenceID).
  • {SiteUrl} – The fully qualified URL to the site (Url).
  • {ListId} – ID (GUID) of the list (ID).
  • {ListUrlDir} – Server-relative URL of the site plus the list’s folder.
  • {Source} – Fully qualified request URL.
  • {SelectedListId} – ID (GUID) of the list that is currently selected from a list view.
  • {SelectedItemId} – ID of the item that is currently selected from the list view.
EnabledScript Optional.

Note Note
The EnabledScript attribute doesn’t work on custom actions deployed to the host web by an app for SharePoint.

A script statement that is executed to determine whether the command is enabled or disabled. The script expression should return a Boolean value, true if the command is enabled and false if not. If the ribbon is disabled, commands are grayed out and are not clickable.

As with the CommandAction attribute, the eval method is called with the value of this attribute as an argument. The EnabledScript attribute does not support the substitution tokens that are described for the CommandActionattribute.

Minimum: 1

Maximum: unbounded

The following example defines a button command and a corresponding handler.

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction
   Id="EmailContacts"
   RegistrationType="List"
   RegistrationId="105"
   Location="CommandUI.Ribbon">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition
         Location="Ribbon.ListItem.Actions.Controls._children">
          <Button
            Id="Ribbon.ListItem.Actions.Email"
            Alt="$Resources:core,E-Mail;"
            Sequence="55"
            Command="emailContacts"
            LabelText="$Resources:core,E-Mail;"
            Description="$Resources:core,E-Mail;"
            TemplateAlias="o1"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
         Command="emailContacts"
         CommandAction="javascript:
           function getItemIds()
           {
             var itemIds = '';
             var items = SP.ListOperation.Selection.getSelectedItems();
             var item;
             for(var i in items)
             {
               item = items[i];
               if(itemIds != '')
               {
                 itemIds = itemIds + ',';
               }
               itemIds = itemIds + item.id;
             }
             return itemIds;
           }
           function handleReadyStateChange()
           {
             if (client.readyState == 4)
             {
               if (client.status == 200) 
               {
                 // client.responseText is mailto string
                 window.location = ('mailto:' + client.responseText);
               }
             }
           }
           function invokeEmailContacts()
           {
             var params = 'itemids=' + getItemIds(); 
             // Posting to EmailContacts.ashx to get the mailto string
             var site='{SiteUrl}'; 
             var url = site + '/_layouts/emailcontacts.ashx?listId={ListId}';
             client = null;
             client = new XMLHttpRequest();
             client.onreadystatechange =  handleReadyStateChange;
             client.open('POST', url, true);         
             client.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
             client.setRequestHeader('Content-length', params.length);
             client.send(params);
           }      
           invokeEmailContacts();"
         
      EnabledScript="javascript:
           function enableEmailContacts()
           {
             var items = SP.ListOperation.Selection.getSelectedItems();
             return (items.length > 0);
           }
           enableEmailContacts();"/>
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
</Elements>

XML view of Core Results Web Part

Remove the current xslt of web part and add below xslt.

 

<?xml version=”1.0″ encoding=”UTF-8″?>
<xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”&gt;
<xsl:output method=”xml” version=”1.0″ encoding=”UTF-8″ indent=”yes”/>
<xsl:template match=”/”>
<xmp><xsl:copy-of select=”*”/></xmp>
</xsl:template>
</xsl:stylesheet>

some or all identity references could not be translated Error

To resolve this error “Some or all identity references could not be translated” Follow below steps.

 

  1. Use Get-SPServiceApplicationPool command to view all app pool accounts.
  2. Change the required app pool account using below command.

Get-SPServiceApplicationPool -Identity “SecurityTokenServiceApplicationPool” | Set-SPServiceApplicationPool -Account domain\newaccount

  1. Remove managed account using

Get-SPManagedAccount -identity “domain\oldaccount” |Remove-SPManagedAccount

 

If there is any service left and can’t delete account, use below commands in order.

 

function Set-ServiceIdentity($svc, $username)

{

$pi = $svc.Service.ProcessIdentity

$pi.CurrentIdentityType = “SpecificUser”

if ($pi.Username -ne $username) {

$pi.Username = $username

$pi.Update()

$pi.Deploy()

}

}

Change service name of below command appropriately.

$svc = Get-SPServiceInstance | Where-Object {$_.TypeName -eq ‘Web Analytics Data Processing Service’}

 

Set-ServiceIdentity $svc “domain\newaccount”

 

Reference:

http://blog.falchionconsulting.com/index.php/2010/10/service-accounts-and-managed-service-accounts-in-sharepoint-2010/

http://honggyem.blogspot.com/2010/10/remove-unnecessary-or-orphaned.html