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

Sharepoint 2013 Community site: Unable to reply on a post

$
0
0

Im working on Sharepoint 2013 Community site template. When I manually create a discussion in discussions list liking and replying features are working fine, but when I programmatically add a dicussion in discussions list its giving the following error "Value does not fall within the expected range".

This is the C# code im using to add an item in discussions list.

using (SPSite site = new SPSite("http://site-url"))
{
    using (SPWeb web = site.OpenWeb())
    {
        SPList list = web.Lists["Discussions List"];
        SPListItemCollection listItemCln = list.GetItems(list.Views["Management"]);

        SPListItem item = list.Items.Add();
        item["Title"] = "New Post";
        item["Body"] = "Body of the post";
        item.Update();
    }
}

I checked the log files of sharepoint also it gave the follwing error

Failed to cache field with id "{69062c99-d89f-4162-bbc5-b1acf8bfe123}", overwrite=0

SocialRESTExceptionProcessingHandler.DoServerExceptionProcessing - SharePoint Server Exception [System.ArgumentException: Value does not fall within the expected range.    
 at Microsoft.SharePoint.Utilities.SPUtility.CreateNewDiscussionReply(SPListItem parent)    
 at Microsoft.SharePoint.ServerStub.Utilities.SPUtilityServerStub.InvokeStaticMethod(String methodName, XmlNodeList xmlargs, ProxyContext proxyContext, Boolean& isVoid)    
 at Microsoft.SharePoint.Client.ServerStub.InvokeStaticMethodWithMonitoredScope(String methodName, XmlNodeList args, ProxyContext proxyContext, Boolean& isVoid)]

Can anyone help me on this please


Sharepoint 2013 development on 32 bit Visual Studio Ultimate

$
0
0
I heard we can use Visual Studio 2012 32 bit for sharepoint development.  Can anyone tell me what is no possible using Visual Studio 2012 32 bit edition.

How to add usercontrol in sharepoint 2013 master page.

$
0
0

HI friends,

  Can you please help me to add the user control to SharePoint 2013 master page  .Please give me the links which shows step by step to achieve this.I am using visual studio 2012 .In the user control I need to place the banner image and another menu image with few buttons which navigates to the SharePoint pages.Please help me to do this.

Thanks

 

Using Excel based scorecards as a datasource in SharePoint 2013 online

$
0
0

I'm trying the following scenario in SharePoint 2013 online:

I have a few excel based scorecards (or simply excel based site content types) based on which users create monthly scorecard sheets and save them in a document library in SharePoint 2013 online. I'm trying to use these monthly scorecards as data sources and generate some reports. How to get started on this or resolve this scenario?

For example, in a given document library there will be 2 excel based content types - HR Scorecard and Marketing scorecard. And, the scorecards will be created by users on a monthly basis. These monthly scorecards will be created, edited or viewed by users with the aid of Excel Web App in SharePoint 2013 online. Now, the problem statement here is to use these monthly scorecards as data sources and pull data into another excel report 

Note that I'm in SharePoint 2013 online environment. How to accomplish this scenario.


Thanks Arut

Reading the entire document library using C#

$
0
0

Hi,

I'm new to SharePoint server. I need to get the list of all document stored in SharePoint server, not in particular user site. Is there any way to get all documents list , name or count using C#?

Is there any work around it. I need to know where all the document stored in the SharePoint Server or how can we access them.

Thanks

Content Search Query Text IF Statement Syntax

$
0
0

Hi there,

Is there any way within the Query Text section of a Content Search Web Part to do an IF statement?

I am basically wanting to do the following in plain English:

If the query string "cpt" has a value then use that, otherwise use the terms from the search box. Here is what I have so far but this only works for the "cpt" query string and not the SearchBoxQuery.

or(ContentPageType={QueryString.cpt}, {SearchBoxQuery})

1 The following url brings back results as expected - Page.aspx?cpt=News (This works)
2 The following url brings back no results - Page.aspx?k=News (Broken)
3 The following url brings back no results - Page.aspx#k=News (Broken)

N.B. When I just use {SearchBoxQuery} as the query, the urls at 2 and 3 above show the results as expected.

Any ideas?

Thanks in advance

BusinessData Connectivity Service in Sharepoint 2013 Beta Release ?

$
0
0

i created a business Data connectivity service using visual studio ultimate 2012 then i deployed it on SharePoint server 2013 beta release and this error is  

evolved 

MethodInstance with Name 'ReadList' on Entity (External Content Type) with Name 'SessionType' in Namespace 'ContentTypes.Bdc_Schedule' failed unexpectedly. The failure occurred in method 'ReadList' defined in class 'ContentTypes.Bdc_Schedule.SessionTypeService' with the message 'Could not load file or assembly 'EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.'.

Correlation ID:580d1a9c-d718-50ce-e550-4f9538d49e03

Declarative Worflow - VSTO - SPO

$
0
0
I'm working on a "Declarative Worflow" with VSTO for SharePoint Online 2013 project and I have two sticking points:

1) Add the link in the email task of task assignment notification:
The assignment of the task sending an email (I can configure the content of this email) but because the task is not yet created I can not retrieve information (url) this task to include in the content of email.

2) Change a list item:
The field type is Hyperlink type
In the Workflow I have an action "Update list item" in which I refered the list and the id of the item and ListItemPropertiesDynamicValue. In ListItemPropertiesDynamicValue two columns present "path" and "value".
In "Path" I put the name of the item and in the "Value" to the desired value (like www.google.fr).

During the execution of the workflow I get an error. On the net I saw that type hyperlink contained two fields (url & description)

So I set the value as stated: "URL, Text"
But it does not change anything, still the error.

I changed the field type in single string. I can well put the url but the display when the url contains a space that looks like wrong.

To solve this problem I wanted to use System.Web.HttpUtility.UrlEncode or String.Replace Or Uri SPEncode
But this is not supported.

Have you ever encountered these problems?

Best regards,
Alexandre


SiteUsers, GetUserById, etc does not exist from client object model

$
0
0

I'm trying to get information on site users via the sharepoint client object model.  But whenever I try to use calls such as GetUserById or SiteUsers, I get the error "Does not exist".  The following code, for example, would give that error when the ExecuteQuery is called.  It *feels* like the client object model doesn't support user-based actions, but that doesn't make sense, since these calls show as valid in any documentation I can find.

Oh, and please, let's not get into the alternative ways.  For what I'm doing, I need these calls.  I'm not asking for other ways, I'm trying to find out why these calls aren't working.  Thanks for understanding.

Does anyone have any ideas.  Is there some other Load I need to perform?  Is it an inherent limitation with the client object model?  Thanks for any definitive answers.

var context = GetContext(SiteUrl);

var myuser = context.Web.GetUserById(45);

context.Load(myuser, g => g.LoginName, g => g.Id, g => g.Title);

context.ExecuteQuery();

How to set up a sharepoint dev environment?

$
0
0

I have Windows 7 Professional.

How do I set up a share point development environment?  It seems that the requirement is pretty demanding: server versions of Windows such as Win server 2008, and share point server, neither is cheap to obtain.

So, to get my hands dirty with share point development, what's the most frugal and efficient way to do?

Thank you!

Add a SP User to a SP Group other than current user using CSOM or REST

$
0
0

Hi,

I want to add a SP User (from AD) to a SP Group other than current user using CSOM or REST.

Below code shows how to add current user to a SP Group (Link)

var user;
var visitorsGroup;

function runCode() {

     var clientContext = new SP.ClientContext();
     var groupCollection = clientContext.get_web().get_siteGroups();
     
     // Get the visitors group, assuming its ID is 23.
     visitorsGroup = groupCollection.getByName('Approvers');
     user = clientContext.get_web().get_currentUser();
     var userCollection = visitorsGroup.get_users();
     userCollection.addUser(user);

     clientContext.load(user);
     clientContext.load(visitorsGroup);
     clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
}

function onQuerySucceeded() {
    alert(user.get_title() + " added to group " + visitorsGroup.get_title());
}

function onQueryFailed(sender, args) {
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
}

But i need to add a diff user which is not current user (say domain\login).

Please help


Please remember to click 'Mark as Answer' on the post that helps you or "Vote As Helpful"

sharepoint list to gridview

$
0
0

Hi all..

I have Two sharepoint list.having 10 details in every list.

i want load the sharepoint list data in Gridview using MVC3 or MVC4

how to do ?

Thanks in Advance.

Create a SP Group in a site using Client Object Model (CSOM) or Rest Service

$
0
0

Hi,

Want to create a sp group using either client object model CSOM or REST Service.

I found a link from MSDN which says we can create a sp group using CSOM- http://msdn.microsoft.com/en-us/library/jj246523.aspx  , but it does not have any example (code).

Please help.


Please remember to click 'Mark as Answer' on the post that helps you or "Vote As Helpful"

Read Multi-value user profile property using client object model, SharePoint 2013

$
0
0

I am following the MSDN article to access SharePoint 2013 user profile property. 

http://msdn.microsoft.com/en-us/library/jj163182.aspx

The problem is that if the property is a custom multi-value property,the value retrieved is empty.Googled online, couldn't find anythign related.


John Architect


Sharepoint 2013 Parameters for App deployment Secure Store Target Application __RemoteAppManagementInfo__

$
0
0

I'm trying to deploy apps  (in this case the BasicSelfHostedApp). sharepoint hosted on my local instance. Sharepoint 2013, Visual Studio 2012. Deployment fails, with error "the remote hosting service is not configured". Initially this was due to "Target application not found (application id: __RemoteAppManagementInfo__)."

Following that path I created a target application in the secure store. Error then became it wanted 4 fields instead of the default 2 (windows username and password). Through more work, figured out the fields that the deployment wants (UserName,Password, ManagementEndPoint, IsEnabled). Problem is, I can't figure out the ManagementEndPoint, which is of type url. Anything I try I get the error "ServiceAddress should be of the format ApiName.qualifier.admin.subdomain"

From the ULS logs I can see that what's being called is Microsoft.SharePoint.Packaging.RemoteWebHost.Client.AntaresConfiguration.ExtractSubDomain(Uri serviceAddress).

Can anyone point me to documentation as to how to setup the target application for __RemoteAppManagementInfo__? Note that I don't need instructions on how to create a target application in the secure store, I've done that. What I need are the parameters necessary for __RemoteAppManagementInfo__

thanks


SharePoint 2013 Education Services

$
0
0
I need the information on the new feature in SP 2013 Education Services. There is some info avaialble on web but no documentation I could see on msdn. Can someone please let me know if there is any msdn documentation available for it and what all features provided by education service and how to use them.

Assembly Load Error

$
0
0

Hi

I have a custom login page deployed as a WSP package and built with .NET Framework v2 for SharePoint 2010.  The installation and deployment of the WSP contents into SharePoint 2013 all executed as expected.

I reference my custom login page when creating a new web application (I've created a site also).  However when I attempt to invoke the custom login page I get an error:

I get the error: could not load file or assembly Microsoft.SharePoint.Administration, Version 15.0.0.0, culture=neutral.......or one of its dependencies

The custom login page has a reference to the version 14.0.0.0 of the above assembly, I'm assuming the assembly redirects are in part causing the error.

How do I get me login page to load in a SharePoint 2013 environment?

Thanks

How to connect SharePoint 2010/13 online using cloud web application !!!

$
0
0

Hello Experts,

I want to read SharePoint 2010/13 online lists and list records using server side code in a cloud web application.

I tried with SharePoint client object model but showing error “Unable to load Microsoft.SharePoint.Client.dll”

Please suggest me the ways how I can access data from SharePoint 2010 and also from SharePoint 2013 in hosted web application.

Any help would be highly appreciated.


Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !
Vikram !

to protect sensitive information using reauthentication in SP2013

$
0
0

Hi Team,

I am totally new with SP2013. I have a requirement to protect sensitive data in the site by reauthenticating the user. I googled around and decided to move on the sensitive data into another web application. 

But since I am using Windows authentication I dont think that I will get popup for reauthentication.

Since I am totally new including the environment, Request you to please suggest in a way that user cannot get the url through view source also.

I know in SP2010 this can be done through "Loginas another user" through server side coding in cs file but how to proceed in SP2013 and which webpart to choose to get authentication popup.

Thanks

Any help is really appreciated.


Thanks Ba$va

how to add user to sharepoint list item user field using REST api in sp2013?

$
0
0

Hi,

I have a basic sharepoint list with people field in it, now I am trying to use rest api to add new list item and trying to set person field to my alias but it is not working and throwing me below error. looks like it is problem with how my user data is passed but I could not able to find any help online.

can you guys help with the correct way to make this call, any help is greatly appreciated.

function runAjax(){ 
   var d  = JSON.stringify({"__metadata":{"type":"SP.Data.RepositoryItem"},"Owners":"-1;#v-mynme@microsoft.com"});
    jQuery.ajax({ 
        url: "https://microsoft.sharepoint.com/sites/mysite/docstore/_api/web/lists/GetByTitle('Repository')/items(1580) ",
        type: "POST", 
        headers: { "accept": "application/json;odata=verbose", "content-type": "application/json;odata=verbose", "X-RequestDigest": $("#__REQUESTDIGEST").val(), "X-HTTP-Method": "MERGE", "If-Match": "*" 
        }, 
        data:d, 
        success: function (_a) { 
            console.log(JSON.stringify(_a)); 
        }, 
        error: function (_e) { 
            console.error(JSON.stringify(_e)); 
        } 
    }); 
} 
runAjax();

error I am getting is

Updation fail{"readyState":4,"responseText":"{\"error\":{\"code\":\"-1, Microsoft.SharePoint.Client.InvalidClientQueryException\",\"message\":{\"lang\":\"en-US\",\"value\":\"A 'PrimitiveValue' node with non-null value was found when trying to read the value of a navigation property; however, a 'StartArray' node, a 'StartObject' node, or a 'PrimitiveValue' node with null value was expected.\"}}}","status":400,"statusText":"Bad Request"} 


Naresh Bojja http://nareshbojja.wordpress.com

Viewing all 25064 articles
Browse latest View live


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