Tag Info

New answers tagged

0

You can simply check for != null Example found here: http://msdn.microsoft.com/en-us/library/ff798474.aspx


0

Separating the recipient addresses by commas is acceptable: http://social.technet.microsoft.com/Forums/office/en-US/e68c8f84-cd95-4d9f-bcdf-2609b9cdf315/sending-one-email-to-multiple-recipients-only-one-gets-the-email?forum=sharepointgenerallegacy You may want to try the same troubleshooting steps as shown in the accepted answer: The string format of ...


0

The method on MSDN doesn't explicitly say how to delimit the users, standard convention is semi-colon delimited. If you are using commas and it isn't working, switch to semi-colons and see if that resolves your issue.


1

I found this article while searching for a function to get all folders of a certain document library as a tree. Due to some errors in the recursive method shown by Amicable I rewrote the method. May be it is usefull for others: The recursive function: private void CreateBranch(SPFolder folder, TreeNode tnParent) { if (folder.SubFolders.Count > 0) ...


0

Are you using SPSecurity.RunWithElevatedPrivileges method ?? If you are wanting to get the current user when you log in you can try something like this SPWeb webSite = SPControl.GetContextWeb(SPContext); SPUser spUser = webSite.CurrentUser; string strUserName = spUser.LoginName; Or try this : string ModifiedbyUserName = ...


0

Try this : string trimtext = Regex.Replace(text, @"s+", " ").Trim(); I hope it help.


0

Simplify your XML schema. You probably have some unsupported properties defined. This XML schema worked with me while I was adding listviewwebparts to a page in CSOM <?xml version="1.0" encoding="utf-8" ?> <webParts> <webPart xmlns="http://schemas.microsoft.com/WebPart/v3"> <metaData> <type ...


1

This has worked for me in the past: private SPListItem CreateLinkToDocumentPage(SPWeb web, SPList docLibrary, string pageName, string url) { SPContentType contentType = web.AvailableContentTypes[SPBuiltInContentTypeId.LinkToDocument]; //get full path of the document to add string filePath = docLibrary.RootFolder.ServerRelativeUrl; SPFolder ...


0

You will need the SharePoint Client Components SDK for this: using Microsoft.Online.SharePoint.TenantAdministration; using Microsoft.SharePoint.Client; using System; using System.Security; namespace CreateSiteCollections { class Program { static void Main(string[] args) { //Open the Tenant Administration Context with ...


1

You can create site collections in SharePoint Online with C# using the client side object model. You will need to install the SharePoint client SDK first which includes the CSOM libraries and the all important Microsoft.Online.SharePoint.Client.Tenant.dll. There is a full walkthrough on how to get the client SDK and use the CSOM libraries with C# to create ...


1

Start the Url with slash <UrlAction Url="/_admin/target.aspx"/>


0

ON SPO, Tenant Administrator can create a developer site collection from Office 365 admin center if you have Plan E1 or E3. You need the Site collection admin rights on developer site collection. read this for more info : http://msdn.microsoft.com/en-us/library/office/fp179924(v=office.15).aspx


0

How are you fetching values for left side list box? Anyway you should be able to do this using normal html list box and javascript to move items left to right.


1

off the top of my head, I dont know but i think there is most certanly a easyier solution than what im about to propose, using (SPSite site = new SPSite("http:...")) { using(SPWeb web = site.OpenWeb()) { SPList list = web.Lists.TryGetList("listname"); SPQuery query = new ...


2

Try this : using (SPSite site = new SPSite("http:...")) { using(SPWeb web = site.OpenWeb()) { SPList oList = web.Lists.TryGetList("listname"); if(oList != null) { foreach(Field field in oList.Fields) { ...


0

Instead of properties.List use properties.ListItem as below, SPList sourceListItem = properties.ListItem; sourceListItem["Title"] = "Auto-populated title value"; sourceListItem.SystemUpdate(false);


0

This is the answer I came up with, but it is not at the efficiency I was hoping for. I will up vote and mark as answer anything faster that someone can come up with that I can get working. List<SPListItem> emailList = (from SPListItem item in list.Items where item["Status"].ToString() == "Unprocessed" && ...


0

The html option takes a DOM element rather than a string because of which you get this error. Try something like this: var htmlElement = document.createElement('p'); var messageNode = document.createTextNode('Message'); htmlElement.appendChild(messageNode); var options = { html: htmlElement, autoSize: true, allowMaximize: true, title: ...


0

In addition to the Administrator and Permission on the UPSA, I needed to add the SharePoint setup user as db_owner on the ProfileDB.


1

In this case I would use a custom IEqualityComparer. First, you would need to make the equality comparer: public class MyCustomEqualityComparer : IEqualityComparer<SPListItem> { public bool Equals(SPListItem x, SPListItem y) { if (x["User"].ToString() == y["User"].ToString() && x["Subject"].ToString() == ...


1

Try item["Modified"] = null; That should make the Date/Time field empty.


4

Office 365 is a cloud offering, you don't install it anywhere local. Subscription options can be found here.


0

If you have a complete list of the different types of fruit (or whatever object) you want to search then you could use managed metadata and set up a custom termset.


1

Unfortunately, it cannot be done in CAML. If you have to use CAML, the recommended approach is created a calculated column such as =DATEDIF([NoticeSentDate], [NoticeDate],"d"). Your CAML query would then look for values greater than 0 in the calculated column. Check out this page for more examples of date calculations in calculated columns: ...


0

You can try to replicate a simple color picker with a dropdown control setting the corresponding background color foreach item. This way you can get the following: Maybe this could be a good solution for your requirement. Useful information: How to create a custom web part editor: http://msdn.microsoft.com/en-us/library/office/hh228018(v=office.14).aspx ...


0

You can use the SPWeb.DoesUserHavePermissions method: if(!web.DoesUserHavePermissions(newUser.Login, SPBasePermissions.AddListItems)) { // User does not have permissions, so add } Here are all the items in the SPBasePermissions enumeration.


0

1) be carefull with using "web application" to name a custom (Visual Studio) solution. A web application in SharePoint had a different meaning. Very rough. you link a domain to a web application. A web application contains all your site collections for that domain.(very rough it does a bunch of other stuff as well). You can create a new web application in ...


0

In my environment the site collection/web application parts are created by clicking. This is because you need to do it very rarely. Maybe you do it by powershell, there's no difference. Developing is done by visual studio. And yes there is a possibility to place a webpart on a page by code: http://www.stefangordon.com/add-web-part-to-page-programmatically/ ...


1

1) creating web application is full of clicking, being a sharepoint developer somtimes well for me most of the time incorporates sharepoint administration to it. You would use central admin to create web application and then site collection, or use powershell. web application central admin -> application managment -> click on manage web applications -> ...


0

try this- http://www.boostsolutions.com/columnpermission.html This is a verry helpful tool that i have used. It is pricy though.


5

Yes, being a straight modification on a default SharePoint file, it will bring your farm to an unsupported state


0

no need to load the whole web object when you are already getting the user object from the web... you just need to load it into the context when its retrived sucessfully! try ExecuteOrDelayUntilScriptLoaded(getWebUserData, "sp.js"); var context = null; var web = null; var currentUser = null; function getWebUserData() { this.context = new ...


0

1) Custom coding: As it is 20K items go for ContentIterator. 2) form a caml query so that the items retrieved is not more 5K(not necessary but will help in quick operation) like you have to loop each time on query farmed 3) you can fetch based on created date 4) create a folder on create date/month/year and move Item from source to destination 5) MoveTo ...


1

You can move it programmatically, so that you can add your business logic as required. To move Files to the sharepoint folders: SPWeb oWebsite = SPContext.Current.Web; SPFolder oFolder = oWebsite.GetFolder("Shared Documents"); SPFileCollection collFile = oFolder.Files; /*Copy the files to a generic List of type SPFile*/ List<SPFile> listFiles = new ...


0

some suggestions: make sure all resources are checked in and published clear the browser cache completely before testing keep dev console open and check for script errors use jquery.noconflict leverage document.ready vs window.onload check behaviour in different browsers, machines, and user accounts good luck


1

If you have the MSDN subscription then you will get the credit for windows Azure, where you can build a VM and configure SharePoint on it. check this blog for more details: http://blogs.msdn.com/b/visualstudiouk/archive/2013/08/08/making-the-most-of-your-free-azure-benefits-with-msdn.aspx Another Option is Build VM on your PC and install trial version of ...


1

We can indeed use SPQuery for this. Here's some code that does what you want to do: using (SPSite site = new SPSite("http://mySite/Shared Documents/")) { using (SPWeb web = site.OpenWeb()) { //get sub folder url string SubFolderUrl = web.ServerRelativeUrl + "/shared documents/SubFolderName"; //able to get the subfolder at ...


1

Here's a better way than the code from John by using plain JavaScript (no need for jQuery) and without adding the element to the body manually: var element = document.createElement('div'); element.innerHTML = 'Hello World, I am the dialog content'; SP.UI.ModalDialog.showModalDialog({ html: element, title: 'My Dialog Title', allowMaximize: ...


0

I think you have to run the SharePoint health analyzer and find error from there. Here is msdn article. http://msdn.microsoft.com/en-us/library/office/ee534957(v=office.14).aspx Install ULS viewer from codeplex (https://ulsviewer.codeplex.com/releases/view/19835). and try to find possible error from there.


0

If you want to use the SharePoint javascript model so that the popup look and feel will be the same as the OOTB popups, you will need to use the SP.UI.ModalDialog.showModalDialog(options) from the SP.UI namespace. As you can see from the linked page, you can use the "html" option parameter to specify a dom element to display in the popup (ignore where ...


2

You have to use JQuery Plugin. Wrap your panel elements inside a single div and create a close button for popup for example <div id='popup-wrapper'> <asp:panel.... All Text Boxes /> <a id="close-btn" href="#">Close</a> </div> Add following references to your page <script type="text/javascript" ...


1

It may be caused by the fact that PLINQ functions do not propagate identity of the calling thread to its worker threads as stated here. This may cause the security exception. Try the technique suggested in the link to propagate the context.


2

At the end of you code it looks like your code is using the same method to impersonate as in a classic auth app with integrated auth. This is not working in a claims app because the used authenticated using kerberos in the initial handshake (url: _trust/...). The claims to windows token service is not doing the magic automatically. You have to request a ...


0

I'm not sure if these articles would apply in your situation but adding an event handler for the ExecutingWebRequest solved the Forbidden errors I was getting when making CSOM calls. Although most of these articles apply to previous versions of SharePoint I was able to get it working with our 2013 environment. ...


1

Get new assemblies. If you cannot deploy dependent assemblies to the GAC, then you will forever be struggling to update SharePoint's various config files with entries required to direct the fusion loader to the correct place. And, once you do that, you will not be supported.


0

Sorry I can't post code right now, but if you are still having a problem next week, I'll post back. I created a plugin awhile back to do this: make elements sticky. It supports sharepoint and I'm currently using it in SP2013 (o365) with a few small apps. The plugin is: http://purtuga.github.io/jquery.stickOnScroll/ You will need to use the set the ...


0

check this post, this will give you couple of options to download the files from SharePoint. You can use the Rest, CSOM. Check the last reply on the post. Here are couple of blogs, which will give you direction. Programmatically download a SharePoint document library in .NET ...


0

My situation was a bit different, but I landed here while searching for a solution. I had a SharePoint list item event receiver scoped for Web and controlled by a Web-scoped feature. Thus, it should only fire on the website's list if the feature has been enabled. However, it was firing on other sites as well where the feature was deactivated. Turned out ...


0

Although not a good practice in Software Development, in this case you can create a Batch file with simple DOS Commands. You can run this batch file post Build/Deploy every time of the project using Visual Studio. In Batch file you can create folders and copy the files to specific paths you have hard coded in you project. Commands you can include: MD // ...


1

The relationship between .html and .master is a bridge. It has been implemented so that developers who are not familiar with ASP.NET masterpages and SharePoint can use the .html file to do the changes in a "environment" they are more or less familiar with. I'm going to assume this is an on-premise solution, so yes, downloading and putting the .js file in ...



Top 50 recent answers are included