Friday, May 13, 2016

How to get SharePoint field type, title, internal name using rest api

var queryUrl = appweburl + "/_api/SP.AppContextSite(@target)/web/lists/getbytitle('" + listName + "')/fields/getbyinternalnameortitle('" + fieldName + "')?@target='" + hostweburl + "'&$select=Title,TypeAsString,InternalName,Hidden";

Thursday, May 12, 2016

SharePoint 2013 Site Field Details, type names, internal names, title

SharePoint 2013 Field Type As String Details

Boolean Lower values are better LowerValuesAreBetter
Lookup Comments Lookup
Text Other Address Country/Region
TaxonomyFieldTypeMulti Enterprise Keywords TaxKeyword
RatingCount Number of Ratings RatingCount
DateTime Date Modified _DCDateModified
Computed Link to Report ReportLink
UserMulti Previously Assigned To PreviouslyAssignedTo
User Checked out User CheckoutUser
Integer Aggregated Rating Count DescendantRatingsCount
Note Description Description
URL Icon URL XSLStyleIconUrl
Counter ID ID
Number Reputation Score ReputationScore
OutcomeChoice Task Outcome TaskOutcome
ExemptField Exempt from Policy _dlc_Exempt
CallTo Recipients V4CallTo
LookupMulti Related Issues RelatedIssues
Likes Number of Likes LikesCount
Calculated Completed Checkmark
Choice UDC Purpose Purpose
MediaFieldType test test
MultiChoice Compatible UI Version(s) UIVersion
Recurrence Recurrence fRecurrence
File Name FileLeafRef
ContactInfo Contact Information ContactInfo
ContentTypeId Content Type ID ContentTypeId
Whereabout Location Whereabout
AverageRating Rating (0-5) AverageRating
Overbook Check Double Booking Overbook
Facilities Resources Facilities
ModStat Approval Status _ModerationStatus
ThreadIndex Thread Index ThreadIndex
Attachments Attachments Attachments
AllDayEvent All Day Event fAllDayEvent
FreeBusy Free/Busy FreeBusy
CrossProjectLink Workspace WorkspaceLink
RelatedItems Related Items RelatedItems
ChannelAliasFieldType Alias ChannelAlias
Image Page Image PublishingPageImage
SummaryLinks Summary Links 2 SummaryLinks2
PublishingScheduleStartDateFieldType Scheduling Start Date PublishingStartDate
UserAgentSubstringsFieldType Device Inclusion Rules UserAgentSubstrings
HTML Acronym Description AcronymDescription
PublishingScheduleEndDateFieldType Scheduling End Date PublishingExpirationDate
LayoutVariationsField Variations PublishingAssociatedVariations
TargetTo Target Audiences Audience
PublishingCatalogSourceFieldType Catalog-Item URL CatalogSource
ContentTypeIdFieldType Associated Content Type PublishingAssociatedContentType

Sunday, May 8, 2016

Change SharePoint App Master Page

Accessing referenced file  is not allowed because the reference is outside of the App Web.


The below script is used to change the app web master page

Add-PSSnapin "Microsoft.SharePoint.PowerShell"

$siteCollection = Get-SPSite "site collection url"
$allWebs = $siteCollection.AllWebs;

$allWebs | foreach-object {
if($_.IsAppWeb -eq $true){
if($_.Url -eq "app url")
$_.CustomMasterUrl = $_.ServerRelativeUrl+"/_catalogs/masterpage/app.master"
$_.MasterUrl = $_.ServerRelativeUrl+"/_catalogs/masterpage/app.master"
write-host "App at "+$_.ServerRelativeUrl+"updated!"