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

Workflow started using Powershell : stuck on "Starting" state

$
0
0

Hi,

I am starting a workflow using Powershell script, but this workflow is stuck on "Starting" state.
I also start this workflow programmatically on my C# code and it's working well like that.

- The required fields are filled for the items
- There is no approval or versionning on this list.

Here is the code i use :

$sourceWebURL = "myWebUrl"
$spSourceWeb = Get-SPWeb $sourceWebURL
$spList = $spSourceWeb.Lists["myList"]

$spSourceWeb.AllowUnsafeUpdates = $true;
$manager = $spSourceWeb.Site.WorkFlowManager
$association = $spList.WorkFlowAssociations | where {$_.Name -eq "myWFName"}

$data = $association.AssociationData
$wf = $manager.StartWorkFlow($myItem,$association,$data,$true)

$manager.Dispose()

I also tried :

$association.AllowAsyncManualStart = $false    /  and  $true
$association.AllowManual = $true

Do you have any suggestions ?

Thanks

Sylvain


How to Deploy Third party dll in Remote Event Receiver in SharePoint Online (Office 365).

$
0
0

Hi All,

I am exploring Remote Event Receiver in SharePoint Online (Office 365).

I want to enable the event receiver in document library in Item Added event. I want to download the document and read the file and update in to column of document library.

I am having third party dlls for few additional activities. Should i deploy these dlls also. Please suggest me. How can to handle it.

Regards

Poomani Sankaran

Sorting FolderCollections in VB

$
0
0

I have a list of SharePoint folders and need to sort them by name without looping thru.  Can this be done?  Have hit a dead end every time.

Expand All events by default on SharePoint 2013 Calendars

$
0
0

Hi All,

Please suggest me how we can auto expanded all event in SharePoint 2013 calendar.

Thanks

Deepak Chauhan 


SharePoint 2010 & 2013 and Office-365 Branding and Front End Customization, UI Design

CSOM powershell script needed to read managed metadata column

$
0
0

How can I read Metadata column terms and its properties.I wrote below script but metadata column is coming as empty

$url = "https://abc"
Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Taxonomy.dll"
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue


    $clientcontext= New-Object Microsoft.SharePoint.Client.ClientContext($url)
$list= $clientContext.Web.Lists.GetByTitle("Organization") 
$clientContext.Load($list)
$clientContext.ExecuteQuery()


 $Items = $list.GetItems([Microsoft.SharePoint.Client.CamlQuery]::CreateAllItemsQuery()) 
    $clientContext.load($Items)
$clientContext.ExecuteQuery()

$field=$list.Fields.GetByInternalNameOrTitle("Org")
$clientContext.load($field)
$clientContext.ExecuteQuery()

foreach($Item in $Items) 
   { 
        Write-Host "ID - " $Item["ID"] "Title - " $Item["Title"] 
  #[Microsoft.SharePoint.Taxonomy.TaxonomyFieldValue]$MMSFieldValue =
  [Microsoft.SharePoint.Client.Taxonomy.TaxonomyFieldValue]$MMSFieldValue=$item["Org"]
  $MMSFieldValue

  }

Please help!!!

Prefilling in a Multiple line text field with Values using Javascript on a NewForm.aspx

$
0
0

Recently I had to take 3 single column fields and condense them into 1 multiple text field.  Those 3 columns are Name, Location and Code.  However, to make it easy for people to fill out I want these names to be pre filled in on a new display form that looks like this

Name:

Location:

Code:

This is to have some sort of organization in the column when they need to fill in the data.  I found a blog post but this was for 2007 titled "Using Javascript to Manipulate a List Form Field".

I did try to use this javascript code on 2010 and so far Sharepoint is taking kindly to it, it seems.  My issue is that I am unsure as to where to put my values. 

My thoughts are that I have to replace nameVal with my values because I am inputting them into the text field. 

Any help would be great as I am still learning Javascript and am no expert with it. 


    _spBodyOnLoadFunctionNames.push(“fillDefaultValues”);



    function getTagFromIdentifierAndTitle(input, TextField,  Name, Location, Code ) {

      var len = identifier.length;

      var tags = document.getElementsByTagName(input);

      for (var i=0; i < tags.length; i++) {

        var tempString = tags[i].id;

        if (tags[i].title == title && (identifier == “” || tempString.indexOf(identifier) == tempString.length – len)) {

          return tags[i];

        }

      }

      return null;

    }



    function fillDefaultValues() {

      var qs = location.search.substring(1, location.search.length);

      var args = qs.split(“&”);

      var vals = new Object();

      for (var i=0; i < args.length; i++) {

        var nameVal = args[i].split(“=”);

        var temp = unescape(nameVal[1]).split(‘+’);

        nameVal[1] = temp.join(‘ ‘);

        vals[nameVal[0]] = nameVal[1];

      } 

      // Set HTML element default values here

    }

SharePoint .net CSOM getting "The remote server returned an error: (403) Forbidden"

$
0
0

Hi,

We are getting "The remote server returned an error: (403) Forbidden"  suddenly in production environment while using .Net CSOM. We tried to read the production site title with the below code, still facing same issue.

staticvoid Main(string[] args)

        {

          

            ServicePointManager.ServerCertificateValidationCallback =delegate { returntrue; };

           ClientContext clientContext = newClientContext(@"https://sitename...");

           Web site = clientContext.Web;

            clientContext.Load(site);

            clientContext.ExecuteQuery();

           Console.WriteLine("Title: {0}", site.Title);

           Console.ReadLine();

The Exception- The remote server returned an error: (403) Forbidden.

We have also confirmed the user is site collection admin under which this above code is running.

After analyzing the response in the debug mode we get the following details

{SPRequestGuid: bac0759b-03c9-4b3f-85e1-93ee7a6505f4

X-SharePointHealthScore: 0

X-Forms_Based_Auth_Required: https://sitename_login/SPORedirectMultiAuthLogin.aspx?ReturnUrl=/_layouts/Error.aspx&Source=%2fsites%2fAAAAA4882%2fAPEX%2f_vti_bin%2fsites.asmx

X-Forms_Based_Auth_Return_Url: https://sitename/_layouts/Error.aspx

X-MSDAVEXT_Error: 917656; Access denied. Before opening files in this location, you must first browse to the web site and select the option to login automatically.

MicrosoftSharePointTeamServices: 14.0.0.7106

X-Frame-Options: SAMEORIGIN

Content-Length: 13

Cache-Control: private, max-age=0

Date: Tue, 11 Feb 2014 04:53:25 GMT

Set-Cookie: spodsession=384799110.47873.0000; path=/

Server: Microsoft-IIS/7.5

X-AspNet-Version: 2.0.50727

X-Powered-By: ASP.NET

}

Regards,

Sidd

How to add custom assemblies in Remote Event Receiver in SharePoint Online (Office 365).

$
0
0

Hi All,

I am exploring Remote Event Receiver in SharePoint Online (Office 365).

I want to enable the event receiver in document library in Item Added event. I want to download the document and read the file and update in to column of document library.

I am having few custom assemblies for few additional activities. Should i deploy these dlls also. Please suggest me. How can to handle it.

Regards

Poomani Sankaran



Customize the SharePoint OOTB New/Edit mode Form

$
0
0

Hi all,

I am the SharePoint developer for a few months. We are doing the migration from SP 2010 to SP 2016 site.

There we need to replace SP 2010 Nintex form to SP 2016 OOTB customization.

The SP 2010 list has around 250 controls (Customized using Nintex form) so we thought of giving the Expand and collapse to few sections of the SP 2016form. Is it possible?

Are there any scripts available to customize (Expand/Collapse) the OOTB form?

Thanks,

Gokulnath Palani.


Exclude FileExtension from content search query

$
0
0

I've created search box and content search web parts that just search for the 'Filename' of documents on the site.

However there are a lot of OneNote documents on the site, so when a user searches for a document with 'one' in the filename, then it returns all of the OneNote documents in the results.

Is it possible to omit the file extension from the search? I believe adding a minus before i.e '-FileExtension' should achieve this, but I can't figure out the correct syntax for the query. Please see below.

Any help would be much appreciated

path:"https://sharepointsite"  (FileExtension:doc OR FileExtension:docx OR FileExtension:xls OR FileExtension:xlsx OR FileExtension:ppt OR FileExtension:pptx OR FileExtension:pdf OR FileExtension:one OR FileExtension:txt OR FileExtension:url OR FileExtension:msg) (IsDocument:"True" OR contentclass:"STS_ListItem") Filename: {SearchBoxQuery}

path:"sharepointsiteURL"  (FileExtension:doc OR FileExtension:docx OR FileExtension:xls OR FileExtension:xlsx OR FileExtension:ppt OR FileExtension:pptx OR FileExtension:pdf OR FileExtension:one OR FileExtension:txt OR FileExtension:url OR FileExtension:msg) (IsDocument:"True" OR contentclass:"STS_ListItem") Filename: {SearchBoxQuery}

EDIT* The below query also returns the desired results, but still has the issue with OneNote, the reason I listed all of the file types that needed to be searched was so I could not include OneNote docs, this worked but the users need to be able to search for OneNote docs so I'm back to the below.

path:"sharepointsiteURL" Filename: {SearchBoxQuery}

I would like to have something like:

path:"sharepointsiteURL" Filename: {SearchBoxQuery} -FileExtension

But I can't get it to work.

SharePoint Online Remote Event Receiver for All document libraries in Site collection

$
0
0

Hi All,

I have written Remote Event Receiver successfully in SharePoint Online. It is working for the Document Library in the name of  "Documents" as given below code.

using (ClientContext clientContext = TokenHelper.CreateAppEventClientContext(properties, false))
                {
                    if (clientContext != null)
                    {
                        //Get reference to the host web list with name Feedback
                        var documentsList = clientContext.Web.Lists.GetByTitle("Documents");
                        clientContext.Load(documentsList);
                        clientContext.ExecuteQuery();

}

}

I would like to execute the RER for all the document libraries. I should not want to execute for specific document library. How can i achieve it?

Regards

Poomani Sankaran

Copy File with Version from one site to Another

$
0
0

Hi all,

I am trying to copy File version from one site to another using CSOM. I am able to Create file version with version labels ,but I am unable to modify the modified By property in Version History.Can anyone send CSOM or Rest API code to modify Version'sModified by property.

Thanks in Advance.

Navas

Migrating Document versions from SP2007 to SP2016

$
0
0

Hi,

I am trying to copy SharePoint document library from SP2007 to SP2016 . I am able to copy and all documents and versions  but i could'ist copy version author and Version command.  I have used web services(SP2007) to get document details and CSOM (To upload into SP2016) for version copy.

Note : SP2007 don't support CSOM. So i can't use filecopy operation and i don't want to use SSOM

Can anyone please provide me the solution.



document library workflow approval

$
0
0

if document checked out/under review or checked in /pending approval  then the document cannot be checked out by anyone else but it can be read

if checked out/under review notification is sent to document owner/group owner that the document has been checked out and the document is checked out for longer than 5 days a reminder is sent to the person who checked document out. A further reminder is sent every 3 days until the document checked back in.

if the document status is changed to checked in/pending approval ,the approvers,reviewers are sent a request to review /reject/approve the change .if the document is pending review for longer than 5 days a reminder is sent to the person the reviewer(s).A further reminder is sent every 3 days until the document checked back in.

if the document is rejected by the approver ,the document status goes back to checked out/under review and is returned to that person who requested the approval . a document status change notification is sent both to the document owner and person who request approval. 


Blitz

Inheriting the MasterPage for all Pages in a Library in SharePoint 2010

$
0
0

Inheriting the MasterPage for all Pages in a Library in SharePoint 2010

I recall it was a small snippet of JavaScript Code that does this.

Mike W


SharePoint Engineer - Mike


After list search, only have option to delete, no edit in menu

$
0
0

After list search, only have option to delete, no edit in menu.

Here is the scenario, and it used to work but something changed.

1. go to the custom list

2. Search for a record.

3. record is found

4. select the record by clicking on the dot next to the record.

5. At this point, I used to get options to Edit this record on the command bar, but now, Delete is the only option.

I think this occurred because I changed one of my multiline text boxes to rich text and back again.

Can someone please tell me how to get this functionality back.

thx

Disable automatic change to Documents tab in the ribbon after click

$
0
0

Hello,

Is there a way to disable automatic tab change from Browse to Documents (Library Tools)after clicking on the main area where items are listed? I would like for users to change tabs manually if they choose to.

Hidding the ribbon completely is not an option.

Thank you

Who will be announced as the next SharePoint 2010 - Development and Programming Guru? Read more about April 2019 competition!

$
0
0


What is TechNet Guru Competition?

Each month the TechNet Wiki council organizes a contest of the best articles posted that month. This is your chance to be announced as MICROSOFT TECHNOLOGY GURU OF THE MONTH!

One winner in each category will be selected each month for glory and adoration by the MSDN/TechNet Ninjas and community as a whole. Winners will be announced in dedicated blog post that will be published in Microsoft Wiki Ninjas blog, a tweet from the Wiki Ninjas Twitter account, links will be published at Microsoft TNWiki group on Facebook, and other acknowledgement from the community will follow.

Some of our biggest community voices and many MVPs have passed through these halls on their way to fame and fortune.

If you have already made a contribution in the forums or gallery or you published a nice blog, then you can simply convert it into a shared wiki article, reference the original post, and register the article for the TechNet Guru Competition. The articles must be written in April 2019 and must be in English. However, the original blog or forum content can be from beforeApril 2019.

Come and see who is making waves in all your favorite technologies. Maybe it will be you!


Who can join the Competition?

Anyone who has basic knowledge and the desire to share the knowledge is welcome. Articles can appeal to beginners or discusse advanced topics. All you have to do is to add your article to TechNet Wiki from your own specialty category.


How can you win?

  1. Please copy/Write over your Microsoft technical solutions and revelations to TechNetWiki.
  2. Add a link to your new article on THIS WIKI COMPETITION PAGE (so we know you've contributed)
  3. (Optional but recommended) Add a link to your article at the TechNetWiki group on Facebook. The group is very active and people love to help, you can get feedback and even direct improvements in the article before the contest starts.

Do you have any question or want more information?

Feel free to ask any questions below, or Join us at the official MicrosoftTechNet Wiki groups on facebook. Read More about TechNet Guru Awards.

If you win, people will sing your praises online and your name will be raised as Guru of the Month.


PS: Above top banner came from Ronen Ariely.

Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

NuGet BaseConnectionLibrary for database connections.

StackOverFlow
profile for Karen Payne on Stack Exchange

Export Document to word

$
0
0

Hi,

I want to export the document(.aspx) which contains text, images, tables, links in to PDF with css and active links. I am unable to get the images in IE. I used filesaver.js and wordexport.js in chrome it is working fine.

Thanks.

REMOVING NEW ITEM RIBBON ON SHAREPOINT 2010

$
0
0

Hi,

i want to remove the "New item" ribbon on a certain list. it is possible? if yes what process should i undergo to remove this icon.

Thanks for the answer

Viewing all 11571 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>