Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all 25064 articles
Browse latest View live

Microsoft Weather API

$
0
0

I have been using MSN's weather API for a SharePoint webpart for a few years now and today it stopped working. The URL is http://weather.service.msn.com/data.aspx?weadegreetype=F&culture=en-US&wealocations=wc:USSC0006 and now I get this

<?xml version="1.0" encoding="UTF-8"?><weatherdata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><weather errormessage="Access denied: Please contact weather@microsoft.com if you need access to this API."/></weatherdata>

If I try to email weather@microsoft.com I get an auto-reply that states the email is undeliverable because "Delivery restriction check failed as sender not authenticated".

Is there a way to get access to it or is there an alternative API for public access?


Set size for embedded code

$
0
0

Hello,

User embed code using ribbon in rich editor for custom list. Unfortunately the width X height embed code from youtube is too large. 

How i want to set the set the width X height .

Example : Embed code from YouTube

<iframe width="854" height="480" src="https://www.youtube.com/embed/Q0L9cnSvVjA" frameborder="0" allowfullscreen></iframe>

Once save the width X height will be change to  

<iframe width="454" height="280" src="https://www.youtube.com/embed/Q0L9cnSvVjA" frameborder="0" allowfullscreen></iframe>

Thank You


JS Link Code Help

$
0
0

I have one piece of JS Link code that adds the list ID to the DispForm.aspx using an override.

(function () {
	(window.jQuery || document.write('<script src="//code.jquery.com/jquery-1.12.2.min.js"><\/script>'));

	var overrideCtx = {};
	overrideCtx.OnPostRender = addIDField;
	SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
})();

function addIDField(){
	if($("#taskID").text()==""){
		var taskID=getQueryVariable("ID");
		var html="<tr><td width='113' class='ms-formlabel' nowrap='true' valign='top'><h3 class='ms-standardheader'><a name='SPBookmark_ID'></a>Task ID</h3></td>"+"<td width='350' class='ms-formbody' valign='top'><span id='taskID'>"+taskID+"</span></td></tr>";
		$(".ms-formtable tbody").eq(0).prepend(html);
	}
}

function getQueryVariable(variable){
	var query = window.location.search.substring(1);
	var vars = query.split("&");
	for (var i=0;i<vars.length;i++) {
	       var pair = vars[i].split("=");
	       if(pair[0] == variable){return pair[1];}
	}
	return(false);
}

I have another JS Link override that adds a hyperlink to a field:

(function () {
var titleFieldCtx = {};

titleFieldCtx.Templates = {};
titleFieldCtx.Templates.Fields = {
"Title": {"DisplayForm": TitleFieldViewTemplate
}
};

SPClientTemplates.TemplateManager.RegisterTemplateOverrides(
titleFieldCtx
);
})();

function TitleFieldViewTemplate(ctx) {

var _TitleValue = ctx.CurrentItem.Title;
var _DispFormLink = _spPageContextInfo.serverRequestPath + "?ID=" + ctx.FormContext.itemAttributes.Id;
var _ItemLink = _spPageContextInfo.siteAbsoluteUrl.replace(_spPageContextInfo.siteServerRelativeUrl, _DispFormLink);

return "<a href='mailto:?subject=" + ctx.CurrentItem.Title + "&body=" + _ItemLink + "'>" + ctx.CurrentItem.Title + "</a>";

} 

Independently, they both work.  But, when I combined the two into a single piece of JS Link code, I get no results.  Can someone please review the following code and describe why it doesn't work.

(function () {
	(window.jQuery || document.write('<script src="//code.jquery.com/jquery-1.12.2.min.js"><\/script>'));

        var overrideCtx = {};

        overrideCtx.Templates = {};
        overrideCtx.Templates.Fields = {
           "Title": {"DisplayForm": TitleFieldViewTemplate
        }
	overrideCtx.OnPostRender = addIDField;
	SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);

})();

function addIDField(){
	if($("#taskID").text()==""){
		var taskID=getQueryVariable("ID");
		var html="<tr><td width='113' class='ms-formlabel' nowrap='true' valign='top'><h3 class='ms-standardheader'><a name='SPBookmark_ID'></a>Task ID</h3></td>"+"<td width='350' class='ms-formbody' valign='top'><span id='taskID'>"+taskID+"</span></td></tr>";
		$(".ms-formtable tbody").eq(0).prepend(html);
	}
}

function getQueryVariable(variable){
	var query = window.location.search.substring(1);
	var vars = query.split("&");
	for (var i=0;i<vars.length;i++) {
	       var pair = vars[i].split("=");
	       if(pair[0] == variable){return pair[1];}
	}
	return(false);
}


function TitleFieldViewTemplate(ctx) {

var _TitleValue = ctx.CurrentItem.Title;
var _DispFormLink = _spPageContextInfo.serverRequestPath + "?ID=" + ctx.FormContext.itemAttributes.Id;
var _ItemLink = _spPageContextInfo.siteAbsoluteUrl.replace(_spPageContextInfo.siteServerRelativeUrl, _DispFormLink);

return "<a href='mailto:?subject=" + ctx.CurrentItem.Title + "&body=" + _ItemLink + "'>" + ctx.CurrentItem.Title + "</a>";

}

Thanks,


Steve Clark, MCTS
Easy Bins Roll-off Dumpster Rentals in Northern VA
Specializing in:
Driveway-sized, roll-off dumpster rentals in Fairfax VA | Dumpster Rentals for Junk Hauling in Springfield VA
Roll-off Rental Dumpsters in Annandale, VA

A filter based on a lookup column

$
0
0

Hi,

I have a list based on a custom content type which contains a lookup column. I need to create a view that would allow me to dynamically select a value for the lookup field and filter the list based on the selected value.

On the Edit View screen I can see a Filter section with an option "Show items only when the following is true". It looks like this is what I need but it allows me to hard-code lookup values while I need to be able to select the lookup values and filter the list dynamically.

After I know how to do that on UI, I will need to create C# code that would create such a "dynamic" view programmatically.

Thanks,

Leszek


Wiki: wbswiki.com
Website: www.wisenheimerbrainstorm.com

apsx page with code blocks in /SitePages/ directory question

$
0
0

Hi I have an inline c# web page in the SitePages in the root site of a sharepoint install to get the code to run i added 

      <PageParserPaths>
<PageParserPath VirtualPath="/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true"/>
      </PageParserPaths>

to the web.config in the root of the sp tree what i would prefer is to narrow it down to 

/SitePages/DataDictionary/Default.aspx being the only page that can run

or

/SitePages/DataDictionary/  being the only directory that can run asp.net code 

when i change /* to /SitePages/DataDictionary/   or /SitePages/DataDictionary/default.aspx it goes back to saying codeblocks not allowedin asp.net pages any ideas on how I can do this?

Issue Populating TaxonomyWebTagging Control

$
0
0

Hello All SharePoint Gurus - I am using TaxonomyWebTaggingControl

<Taxonomy:TaxonomyWebTaggingControl id="txnomyContinents"
            Visible="true"
            IsDisplayPickerButton ="true"
            IsMulti ="true"
            AllowFillIn ="true"
            IsAddTerms="false"
            IsIgnoreFormatting ="false"
            IsIncludeDeprecated="false"
            IsIncludeUnavailable="false"
            IsIncludePathData ="true"
            IsUseCommaAsDelimiter="true"
            BorderStyle="Solid"
            BorderWidth="2px"
             runat="server" />

I am not sure if I am coding it right but this is how wrote to populate the TaxonomyWebTagging Control on the custom webpart

ProfileValueCollectionBase vContinents = userProfile.GetProfileValueCollection(PropertyConstants.Continents);
List<Term> tContinents = new List<Term>(vContinents.GetTaxonomyTerms());

string xyz = "All valid terms";
bool x = txnomyFunctionalExperience.SetValidatedTerms(tContinents, out xyz );

The problem is that when that it is rendering as hidden and not displaying the terms inside the control. When I debug I can see values in tContinents. 

Also, following is code 

<span id="ctl00_ctl55_g_0198f985_e3ed_4d58_bd77_b2ac38c7a7bd_ctl00_txnomyContinents" style="display:inline-block;border-width:2px;border-style:Solid;"><input name="ctl00$ctl55$g_0198f985_e3ed_4d58_bd77_b2ac38c7a7bd$ctl00$ctl02"

type="hidden" id="ctl00_ctl55_g_0198f985_e3ed_4d58_bd77_b2ac38c7a7bd_ctl00_ctl02"

value="Europe|7a604374-adf1-4d5f-ae67-3cfa4b7f7300;Asia|bc48db5c-32e6-4b04-a5a4-928fb839c583;Africa|18a3bd6a-e06b-4ca0-be07-20299791cb10" /><DIV id="ctl00_ctl55_g_0198f985_e3ed_4d58_bd77_b2ac38c7a7bd_ctl00_ctl03" class="ms-taxonomy ms-taxonomy-height ms-taxonomy-width"></DIV></span>


Could anybody please guide me where am I doing wrong? What is the correct way to populate TaxonomyWebTagging Control?

Thanks & Regards,


Khushi

How to programmatically get list of users and groups that have access to a file or folder in SharePoint

$
0
0

Hello,

I am trying to find a way to get the list of AD users and AD Groups that have access to a folder or file that has broken inheritance.  I don't need to know how to find the inheritance broken, I have gotten that part but I am having issues finding each user or group that has access.  I do not want to see what users are within the AD group, I just want to see the name of the group that is accessing the folder.  The use case behind this is that we do not want secured folders shared to single users.  All of this must be controlled by AD groups only (site owners do not have access to add users to a secure folder).  Also need to find out if there are any files within the folder that do not inherit from the folder and are also shared to individual users instead of AD groups (hope this makes sense).   Here is what I have so far and it works to a point, but for some reason it is returning users that have access to the site elsewhere and also users who have limited access that I have to clean up later.

Here's the code I have written so far that sort of works.  It takes in the item object of the file or folder and a reference to a string. It scans the access and then builds a list of users separated by semicolon and returns true if one of the spuser objects is a user and not a group:

    /// <summary>
        /// Provides list of users\groups that have access to a List Item.
        /// </summary>
        /// <param name="spListItem">Item to check access of</param>
        /// <returns>semi colon delimited list of users\groups with access in a referenced list and boolean value indicating if a direct user exists</returns>
        public bool GetListItemUserAccess(SPListItem spListItem, ref string accountsWithAccess)
        {
            //string accountsWithAccess = string.Empty;
            bool IsFirstIteration = true;
            bool domainUserExits = false;
            SPRoleAssignmentCollection spItemRoles = spListItem.RoleAssignments;
            SPRoleDefinitionCollection rolesInWeb = spListItem.Web.RoleDefinitions;

            foreach(SPRoleAssignment spRole in spItemRoles)
            {

                SPPrincipal spPrincipal = spRole.Member;

                //cast as SPGroup or SPUser to determine if is a SPGroup or User
                if((spPrincipal as SPGroup) != null)
                {
                    SPGroup spGroup = spPrincipal as SPGroup;
                    SPUserCollection usersInGroup = spGroup.Users;

                    //report on each user in group
                    foreach(SPUser spUser in usersInGroup)
                    {
                        //check to see if it is a user group
                        if(!spUser.IsDomainGroup)
                        {
                            domainUserExits = true;
                        }

                        //add to list for report.
                        if(IsFirstIteration)
                        {
                            IsFirstIteration = false;
                        }
                        else
                        {
                            accountsWithAccess += ";";
                        }

                        //depending on the account type sometimes the Login name has the credentials and sometimes it has
                        //a UID
                        if (spUser.LoginName.ToLower().Contains("<company name>"))
                        {
                            accountsWithAccess += this.ParseUserIDFromClaim(spUser.LoginName);
                        }
                        else
                        {
                            accountsWithAccess += this.ParseUserIDFromClaim(spUser.Name);
                        }
                    }
                }
                else if((spPrincipal as SPUser) != null)
                {
                    //check to see if the user has limited access only (we don't report on this as this occurs when user has access to something in site)
                      if(!spListItem.DoesUserHavePermissions(spPrincipal as SPUser, SPBasePermissions.ViewListItems))
                    {
                        continue;
                    }

                    //check to see if it is a user group
                    if (!(spPrincipal as SPUser).IsDomainGroup)
                    {
                        domainUserExits = true;
                    }

                    //add to list for report.
                    if(IsFirstIteration)
                    {
                        IsFirstIteration = false;
                    }
                    else
                    {
                        accountsWithAccess += ";";
                    }

                    //depending on the account type sometimes the Login name has the credentials and sometimes it has
                    //a UID
                    if (spPrincipal.LoginName.ToLower().Contains("<company name>"))
                    {
                        accountsWithAccess += this.ParseUserIDFromClaim(spPrincipal.LoginName);
                    }
                    else
                    {
                        accountsWithAccess += this.ParseUserIDFromClaim(spPrincipal.Name);
                    }
                }
            }
            return domainUserExits;
        }

Taxonomy Column Values not fetching from Code after batch deleting and adding them again

$
0
0

I have a SharePoint 2013 site with custom lists containing taxonomy columns. It had data initially. But for some requirement, I had to do a batch delete of those list items and repopulate them through an application. The re-population happens properly after I re-add the items and I can see them through the UI also. But when I try to read the taxonomy column values again from code after executing a CAML query, it is not throwing any exception, but at the same time, fetching blank values. I mean the taxonomy column returns 0 as count, though there is a value. Has anyone faced this issue before? If so, can you please help? This is a critical issue, blocking us from going live. So, please help ASAP.


Ven



Publishing Hyperlink site column accessing issue

$
0
0
Accessing Publishing Hyperlink Site Column from a custom list in a variation Site, make the list content and navigation text empty.

SharePoint Online Hosted Add-in for just a web part without creating a new App or App Site?

$
0
0

Based on these Guides:

https://dev.office.com/docs/add-ins/overview/office-add-ins
https://msdn.microsoft.com/en-us/library/office/fp142379.aspx

Is it possible to create a SharePoine Online 2013 Hosted Add-in (client side only)  that only creates a web part without creating a new App and new App site?   If so, Possible with what tools beyond Visual Studio?  NAPA?  Any Text editor? 

Also, is it now possible to set and manage web part user properties with client side code?




SharePoint 2013 Alerts alternatives

$
0
0

What are the alternatives of Alerts in SharePoint 2013?

My requirement is that when a list item added/updated/deleted in a list, a mail should be sent out  to admin with nice format.

Limitations on site:

below are limitations I have in SharePoint sites wehere I wanted to implement this solution.

#cant access FARM servers

#Cant deploy Farm solutions/Sandboxed solutions

#Unfortunately dont have access of SharePoint designer as well.

Looking forward for your suggestions...

Thanks

trying to issue security token: The security token username and password could not be validated..

$
0
0

in SharePoint 2013 portal we have customized FBA in PROD (2xWFR , 2xApp, Clustered DB SQL 2014) and when users try to login below exception caught on ULS and as we have 400K users we are getting hundreds of this errors , any help why this happening will be appreciated


- SPSecurityContext: Request for security token failed with exception: System.ServiceModel.FaultException: The security token username and password could not be validated.    
 at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.ReadResponse(Message response)    
 at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr)    
 at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst)    
 at Microsoft.SharePoint.SPSecurityContext.SecurityTokenForContext(Uri context, Boolean bearerToken, SecurityToken onBehalfOf, SecurityToken actAs, SecurityToken delegateTo, SPRequestSecurityTokenProperties properties)


An exception occurred when trying to issue security token: The security token username and password could not be validated..

Token Cache: Failed to rebuild forms user token for user '0#.f|SISmembershipprovider|1048470403'.
Token Cache: Failed handle missing token for user '0#.f|SISmembershipprovider|1048470403'.


Sharepoint ssas login problem

$
0
0

Hello,

Long story short. Ive a sharepoint 2013(server 1 web) and SQL 2008 (server 2 app) on domain A and 2012 ssas/ssrs server(server 3 reporting) in Domain B. 

All necessary installation are done and only some configuration left to do. 

The problem here is

In the Sharepoint create report data source

I can use sql account from the server 3 for test connection. However, if I use the local account from server 3 it will give an error saying login fail please ensure the user name and password is correct. 

Two domain dont have any trust relationship. As in my concept the sharepiint is only calling the ssrs with server 3 local account. 

My other question is, during the Create SQL server reporting service service application.  Which database server should I put in? In my case I put down server2...i did try to put down server 3 but it give an error saying cant find the specify file....

Any idea is welcome as I need to find a solution urgently. 

Thank you for your time. 


Why do i get i:0#.w|domain\\username and within RunWithElevatedPrivileges domain\apppool?

$
0
0

When i do

Console.WriteLine(SPContext.Current.Web.CurrentUser.LoginName);

i get the following response:

i:0#.w|domain\\username

When i do

SPSecurity.RunWithElevatedPrivileges(delegate() {    Console.WriteLine(SPContext.Current.Web.CurrentUser.LoginName);});

i get

domain\appPoolAccount

without i:0#.w|... within the loginname.

Is someone able to explain why this happens?

SharePoint REST API

$
0
0

Hi,

   I would like to enable RBS (Remote Blob Storage) in SharePoint 2013 to store large file (over 300MB). Do you know how it works with REST API? Will it take a lot of memory resources to upload such file as it is in standard when use content database and REST API call or in RBS it works in more effective way?

  Thanx for any info.



Sharepoint 2013 Workflow App Step Security

$
0
0

My workflow ran fine for me as a full control user.  In testing any other type of user it failed on a 401.  So I followed these steps:

http://msdn.microsoft.com/en-us/library/office/jj822159(v=office.15).aspx

After this, it failed with a 401 on my first REST webservice call so I changed the header using  Authorization= "".

http://sharepoint.stackexchange.com/questions/118876/call-http-web-service-unauthorized

I was then able to get results from my REST call.  

Then it failed with the below message trying to "Start a task process".

Any thoughts on what I can do?

Thanks.

   w3wp.exe (0x2F90)                        0x1EE4 SharePoint Foundation          CSOM                          afxwb High     System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))     at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex)     at Microsoft.SharePoint.Library.SPRequest.GetUsersDataAsSafeArray(String bstrUrl, UInt32 dwUsersScope, UInt32 dwUserCollectionFlags, String bstrValue, UInt32 dwValue, UInt32& pdwColCount, UInt32& pdwRowCount, Object& pvarDataSet)     at Microsoft.SharePoint.SPUserCollection.InitUsersCore(Boolean fCustomUsers, String[] strIdentifiers, SPUserCollectionFlags ucf)     at Microsoft.SharePoint.SPBaseCollection.GetEnumerator()     at Microsoft.SharePoint.Client.ServerStub.<EnumerateChildItems>d__36.MoveNext()     at Microsoft.SharePoint.Client.ServerStub.WriteAsFeed(Object value, OData... 41e525b4-b6e9-4035-9a5d-2cb7b1804daa
 

 w3wp.exe (0x2F90)                        0x1EE4 SharePoint Foundation          CSOM                          afxwb High     ...Writer writer, RESTfulQuery query, ProxyContext proxyContext)     at Microsoft.SharePoint.Client.ServerStub.Write(Object value, Uri path, ODataWriter writer, RESTfulQuery query, ProxyContext proxyContext)     at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.Process()     at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.ProcessRequest()     at Microsoft.SharePoint.Client.Rest.RestService.ProcessQuery(Stream inputStream, IList`1 pendingDisposableContainer) 41e525b4-b6e9-4035-9a5d-2cb7b1804daa

   w3wp.exe (0x2F90)                        0x1EE4 SharePoint Foundation         CSOM                           agmjp High     Original error: System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))     at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex)     at Microsoft.SharePoint.Library.SPRequest.GetUsersDataAsSafeArray(String bstrUrl, UInt32 dwUsersScope, UInt32 dwUserCollectionFlags, String bstrValue, UInt32 dwValue, UInt32& pdwColCount, UInt32& pdwRowCount, Object& pvarDataSet)     at Microsoft.SharePoint.SPUserCollection.InitUsersCore(Boolean fCustomUsers, String[] strIdentifiers, SPUserCollectionFlags ucf)     at Microsoft.SharePoint.SPBaseCollection.GetEnumerator()     at Microsoft.SharePoint.Client.ServerStub.<EnumerateChildItems>d__36.MoveNext()     at Microsoft.SharePoint.Client.ServerStub.WriteAsFeed(Obj... 41e525b4-b6e9-4035-9a5d-2cb7b1804daa

  w3wp.exe (0x2F90)                        0x1EE4 SharePoint Foundation          CSOM                          agmjp High     ...ect value, ODataWriter writer, RESTfulQuery query, ProxyContext proxyContext)     at Microsoft.SharePoint.Client.ServerStub.Write(Object value, Uri path, ODataWriter writer, RESTfulQuery query, ProxyContext proxyContext)     at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.Process()     at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.ProcessRequest()     at Microsoft.SharePoint.Client.Rest.RestService.ProcessQuery(Stream inputStream, IList`1 pendingDisposableContainer) 41e525b4-b6e9-4035-9a5d-2cb7b1804daa


Tom

Force document edit form to display upon document upload

$
0
0

Hello,

In order to force users to follow our naming convention, we have been making them go to the edit document properties and with a java code we have written, it will not let them continue unless their name meets certain criteria.

In an attempt to make things easier for our users, we're trying to implement the "drag-and-drop" upload system. However, it wont automatically route them to the "Edit Document Properties" form. Is there any way to force this?

Thanks!


Derek Jones IT Project Manager

When to use Timer Jobs and when to use Windows TaskScheduler ?

$
0
0

Hello,

I have few general Question ..

1. What is Timer Job and in what scenario we should go with TimerJob ? Any example ..

2. What is windows TaskScheduler and  in what scenario we should go with TaskScheduler  ? Any example ..

3. On which credentials SharePoint list Workflow runs ? System Account or Current User who created the workflow.?

4. Why we should create SharePoint 2010 workflow using SPD 2013 ? Is it advisable if yes than Why ?

Thanks,

Child content type unable to inherit parent content type changes?

$
0
0

Hi,

I have content type hub with site columns and content types. I have refereed some sites column in content types.

I'm unhiding "Manger" Site column from content type hub.

I have created "Microsoft Document" Content type  and added reference of "Manager" Site column. There are few content type which are inherited from "Microsoft Document" content type. I did some changes in "Manager" Site column and publish "Microsoft Document"content type. But these changes not  affecting on child content type which are inherited from parent content type??

below is the extracted power shell script code:

Actual Problem: https://social.msdn.microsoft.com/Forums/office/en-US/702d45c5-ac71-4089-be86-57d8a2614d54/unhide-content-type-field-from-content-type-hub-in-sharepoint-2013-using-powershell?forum=sharepointdevelopment

$CTHUrl = Get-ConfigValue "url_ContentTypeHub"
$CTHSite = Get-SPSite $CTHUrl
$CTHRootweb =  $CTHSite.Rootweb
$InternalColumnName = $ColumnName
$field = $CTHRootweb.Fields.GetFieldByInternalName($InternalColumnName)

try {
    #=========Make hidden property of Content type Field to False.
    if(!($CTHSite -eq $null))
    {
    $type = $field.GetType()
    $CTHFieldType = $type.GetMethod("SetFieldBoolValue",
    [System.Reflection.BindingFlags]$([System.Reflection.BindingFlags]::NonPublic -bor   [System.Reflection.BindingFlags]::Instance))
    $CTHFieldType.Invoke($field, @("CanToggleHidden",$true))
    $field.Hidden=$false
    Write-Host  "Visiblity of"$ColumnName "has changed to $($field.Hidden)"-foregroundcolor Magenta
    Write-Log $csvOutFile "$($CTHSite), $($ContentName), $($field), $($Optional), Visiblity of Content Type Field has changed to $($field.Hidden)."
    }

     #======== Make required property of content type field to false
    $MyContentType=$CTHRootweb.ContentTypes[$ContentName]
    $MyContentType.Update($true)

    # =================publish Specific content type===========================
    if(!($CTHSite -eq $null))
    {
    write-host "Republishing Content type" $ContentName " to make the changes effective" -foregroundcolor Magenta
    $contentTypePublisher = New-Object Microsoft.SharePoint.Taxonomy.ContentTypeSync.ContentTypePublisher($CTHSite)
    Write-Host “Publishing Content Type $ContentName” -foregroundcolor Green
    $cType = [Microsoft.SharePoint.SPContentType]$CTHRootweb.ContentTypes[$ContentName]
    $contentTypePublisher.Publish($cType)
    write-host "Content type" $ContentName "has been republished successfully ....... Done !" -foregroundcolor Green
    }

    $field.Update()
    $CTHRootweb.Update()
    LogMessage -Message ("completed: $activity") -Percent 99 -Sleep 1000 -Status "COMPLETED" -MessageColor Green
    }

 

Thanks/ Siddheshwar Kohale

SharePoint 2013 Visual Studio 2015 Workflow Issue

$
0
0

I have SharePoint 2013 Enterprise vesion. Visual Studio 2015 Ultimate Version. Topology as below

  1. SQL01 (Clustered)
  2. SQL02 (Clustered)
  3. FE01 (load balance)
  4. FE02 (load balance)
  5. APP01
  6. APP02

SharePoint access by http://xyz.company.com and I have installed Workflow Manager on FE01 and join other servers in farm (i.e. FE02 & APP02)

I have register workflow on http as below

Register-SPWorkflowService-SPSite'http://xyz.company.com'-WorkflowHostUri'http://xyz.company.com:12991'-AllowOAuthHttp-Force

I have also configure below services on my farm enter image description here

Now I can see SharePoint 2013 Workflow option in my SharePoint Designer also.

But now the Issue is when I create workflow in Visual Studio and try to deploy I will get below error,So what I did is I go to Central Admin and deploy it manually and Activate Feature from Manage Site Feature of SharePoint which will not give me error. But workflow will not associate with List enter image description here

But same project when I deploy in my single box development server than I will not get any error for activation plus it will get associate with List automatically. What can be issue with my production environment. Do I am missing something.

Viewing all 25064 articles
Browse latest View live




Latest Images