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

Custom file upload to library not working in Safari

$
0
0

Hello,

Using the following to upload a file to a SP picture library. It works in every browser except Safari. Is there something I'm missing here?

        protected void Button1_Click(object sender, System.EventArgs e)
        {
            if (File1.PostedFile != null)
            {
                //SPWeb site = SPContext.Current.Web;
                SPWeb web = SPContext.Current.Site.OpenWeb();
                web.AllowUnsafeUpdates = true;
                Stream fStream = File1.PostedFile.InputStream;
                byte[] contents = new byte[fStream.Length];

                fStream.Read(contents, 0, (int)fStream.Length);
                fStream.Close();

                string Filename = File1.FileName;

                string destUrl = SPContext.Current.Site.Url + "/ProfileImages/" + Filename;

                web.Files.Add(destUrl, contents);
            }
        }
any help is appreciated.


sayitfast



Custom Web Service (.asmx) creation in sharepoint 2013

$
0
0

Hi All,

I am able to create custom web service (.asmx) in sharepoint 2010 as per steps mentioned in msdn link :

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

However, while trying the same steps for Sharepoint-2013 (framework 4.5), I am not able to generate disco and wsdl files for the .asmx files. While using command (in Visual Studio 2012 Command Prompt) disco <URL> it throws following error : 

the html document does not contain web service discovery information asmx

Any help would be highly appreciated,

Thanks and Regards,

Joyal

SQL data table - sharepoint 2013

$
0
0

Hi All,

I'm wanting tro display a simple gridview of data that exists in a seperate db schema

However, without the use of a DVWP (SP 2013) how do I create a new data source in designer.  Gone through a few online tutorials but to no avail, please help.   

Managed Properties with Rich Text (HTML)

$
0
0

Hello All.

I have a rich text site column that I created through the UI. After using the column in a list and running a full crawl SharePoint automatically created a crawled property and managed property for this column: ows_r_MTXT_MyField and MyFieldOWSMTXT. They currently hold HTML. When I use them in display templates, the field value is HTML just as I want it.

However, I later used a feature to create a rich text site column. SharePoint did not create a managed property after the full crawl but there was a crawled property: ows_My_x0020_Field. I created my own managed property and mapped it to that crawled property. Now when they are used in display templates all HTML elements have been removed. It's plain text.

How can I configure my managed property (or crawled property) to return HTML?

Thanks in advance.


Lester Sconyers

Getting Tasks and Subtask with CSOM

$
0
0

Hi

I have a Tasks App which I am accessing using CSOM. It contains SubTasks. I would like firstly (1) to get the Tasks excluding the SubTasks, and then (2) when I get a Task, to get it's SubTasks.

(1) After looking in a Task ListItem I noticed that SubTasks have a ParentId field that lists the lookup value of their parent task. So I thought to get only the top level tasks I'd get all tasks where the ParentId is empty. I tried:

List list = context.Web.Lists.GetByTitle(TaskListTitle);
CamlQuery query = new CamlQuery();
query.ViewXml =   @"<View>        <Query>            <Where>                <IsNull><FieldRef Name='ParentId' /></IsNull>            </Where>        </Query>    </View>";
ListItemCollection items = list.GetItems(query);

But it returns the Server Exception "One or more field types are not installed properly. Go to the list settings page to delete these fields." As a temporary solution I have just returned all tasks and filtered on those, but when there will be many tasks and subtasks this query will become huge so I'm hoping to get something better.

(2) Moving on to my second objective (get all Subtasks for a specific parent Task). I having tried getting the subtasks by searching all tasks where the ParentId of a task equals the specific parent ID, but as well as also giving me the error I listed in (1), I'm hoping I can get SubTasks through the parent Task ListItem to avoid a second query. Is this possible?

Thanks

ps. I also posted this question here.

Getting "Installation Error" while uploading app through Napa!!

$
0
0
I have been getting "Installation Error" while uploading app in Napa tools. I don't know what issue it showing. I have been struck in this for last few days. Please let me know how can this error be fixed.

Change title of newsfeed

$
0
0

Hi all

In SharePoint we get this site feed web part by enabling the feature: Site Feed.

This a good feature, but it seems impossible to change title. It is possible to hide the web part chrome, but not the title: NewsFeed

Any ideas how that can be done ?

Thanks!

linking list column to page in sharepoint 2013

$
0
0

Hello All ,

I have created a list which have 10 columns containing  data. i have inserted list on to page . page is created from page layouts so it can not be edited in spd 2013.

for  some of the columns of list i wants to insert just a link on to page . when user will click on that link will open another page showing data for that column.

How i can insert link ????

how on second page , share point will know which record to display ??? Means How to Use filter from query string from browser ??

what will be the best way to achieve above .  i am new to share point 2013.

please help me..


How I can send emails using the client object model?

$
0
0

I have tried this, but I always get an exception with error message "A recipient must be specified.":

string webUrl = "http://sharepoint.example.com/";

EmailProperties properties = new EmailProperties();
properties.To = new string[] { "email@example.com" };
properties.Subject = "Test subject";
properties.Body = "Test body";

ClientContext context = new ClientContext(webUrl);

Utility.SendEmail(context, properties);

context.ExecuteQuery(); // ServerException thrown here
context.Dispose();

Server stack trace:

   at System.Net.Mail.SmtpClient.Send(MailMessage message)
   at Microsoft.SharePoint.Utilities.SPUtility.SendEmail_Client(EmailProperties properties)
   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)
   at Microsoft.SharePoint.Client.ClientMethodsProcessor.InvokeStaticMethod(String typeId, String methodName, XmlNodeList xmlargs, Boolean& isVoid)
   at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessStaticMethod(XmlElement xe)
   at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessOne(XmlElement xe)
   at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessStatements(XmlNode xe)
   at Microsoft.SharePoint.Client.ClientMethodsProcessor.Process()

msdn link: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.utilities.utility.sendemail.aspx

Build a custom Navigation in SP 2013

$
0
0

Hi All,

 

I am building a site in SP 2013 and have a question on the navigation. Initially we will have 4 items in the global navigation as:

 Page 1 Page 2 Page 3 Page 4

Now, for ex: user gets into Page 1 and select an item “section 1”. The navigation should appear like this:

If a user goes into a section of Page 2:

 Page 1 Page 2 section 2 Page 3 Page 4

 How can I achieve something like this? Should I show them as a managed term and then show/hide them based on the selected section?

What is the recommended approach?

SharePoint 2013 Apps - have few improvements

$
0
0

Hi!

I just started to learn SP 2013 few weeks ago and discovered some limitations in features schema and event properties:

1) by default, most of content (almost all except remote receivers) are deployed to app web, while most scenarios require to deploy content to HOST web. it would be great to have an attribute on Elements xml element like DeploymentTarget="{HostWeb|AppWeb}";
2) It would be great to have SharePoint URLs to both app and host webs in events like ItemAdded in the host app. Currently, if i have an audit app that monitors events in host web, properties of events like ItemAdded, ItemUpdated, ItemDeleted etc does not provide a SharePoint URL to app web.

It would be great to have properties of type Uri like HostWebFullUrl and AppWebFullUrl.

To workaround 1, a lot of code will be written in the app event receivers to deploy content into Host web, i think...

To workaround 2, a lot of app event receivers will be written to put app web URL to properties of Host web, for later use in remote event receivers, i guess.

What do you think about all this?


Is it possible to install Sharepoint Foundation 2013 in a Windows 8 Pro box for development purposes?

$
0
0

I remember an article explaining how to install SharePoint Foundation 2010 in a Windows 7 box which was prone to some errors but however a great article (http://blogsp.idea80.com/2010/02/instalacion-de-sharepoint-2010-sobre.html). I wander if it would be posible to install 2013 in a Windows 8 pro box.

I want to try the SharePoint features in Visual Studio but I dont really want to go through the whole installation process for SharePoint in a server. I am not interested in ADS integration or anything else, just basic functionality to develop some basic add ons in Silverlight.

Any help would be greately appreciated.

thanks!

Direct link to "add a page" with chosen content type\page layout ?

$
0
0

Hi all

We have a publishing site where two content types\page layouts are avaliable, and one of them is set as default when a new page is added. 

Lets call the two Page Layout:  A and B.
I need to add two links on a site that editors use. The first link will create page layout A, and the other will create page layout B.

To create this direct link was a bit more trickier than I imagined. Any ideas on how that can be achieved ? 

Thanks

How to get user tasks from My Site task list?

$
0
0

Hi!

I'm working on a Web Part that is going to display the five tasks that are due next from the task list on the current users' My Site. I'm new to SharePoint and kind of lost here. If anybody has som suggestions or advice on how to achieve this I would be grateful.

Thanks!

Joakim

Dynamic Referencing Microsoft.SharePoint.dll based on its versoin.

$
0
0

Hi All!

I am using Mirosoft.SharePoint.dll in my code. I compile the code having reference of Microsoft.SharePoint.dll version 12.0. I assumed that it would automatically load any version of dll available at runtime. But thats not happening. When I run my applicatoin, it gives me error

"Could not load file or assembly 'Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified." 

The version of DLL available on system is 15.0.0.0. And I have to use same piece of code for every version of SharePoint (because each of the dll has same classes which I need) Please guide me how can I resolve my issue.

Is there any way I can load/refer a DLL based on version at runtime?

Thanks in advance.

Rizwan Ahmed 


Rizwan Ahmed. Software Engineer - Microsoft Lync | Exchange | SharePoint | Blackberry Enterprise Server | .NET


Installing Workflow through Web Platform Installer 4.5 - not possible

$
0
0

Hello,

I'm trying to install the SharePoint Workflow Manager on a Windows Server 2012. I've used the following link to download the Installation package:
http://go.microsoft.com/fwlink/?LinkID=252092

After the Installer downloads the "Workflow 1.0 Beta" the Installer is trying to "Installing IIS components" forever.

Installer

Can I use an alternative Version?


-

All these cryptic SharePoint 2013 workflow errors, how to find more details?

$
0
0

I have a working SharePoint 2013 workflow that suddenly stopped working anymore.  The Workflow Manager server works fine as some other 2013 workflows still work.  When this particular one starts it is cancelled.  In the workflow status page, there's the blue i icon next to the "Internal Status: Canceled".  Yesterday, I got this error:

   

RequestorId: 3b938f3a-822a-c9c1-2b3a-6163e80e75ca. Details: System.ApplicationException: HTTP 500
{"Transfer-Encoding":["chunked"],"X-SharePointHealthScore":["0"],"SPClientServiceRequestDuration":["307"],"SPRequestGuid":["3b938f3a-822a-c9c1-2b3a-6163e80e75ca"],"request-id":["3b938f3a-822a-c9c1-2b3a-6163e80e75ca"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"MicrosoftSharePointTeamServices":["15.0.0.4420"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1; RequireReadOnly"],"Cache-Control":["max-age=0, private"],"Date":["Tue, 12 Feb 2013 03:57:05 GMT"],"Server":["Microsoft-IIS\/7.5"],"X-AspNet-Version":["4.0.30319"],"X-Powered-By":["ASP.NET"]}

   at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context)
   at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
   

And today I got this:

RequestorId: 3b938f3a-822a-c9c1-2b3a-6163e80e75ca. Details: System.ApplicationException: HTTP 400
{"Transfer-Encoding":["chunked"],"X-SharePointHealthScore":["0"],"SPClientServiceRequestDuration":["23"],"SPRequestGuid":["3b938f3a-822a-c9c1-2b3a-6163e80e75ca"],"request-id":["3b938f3a-822a-c9c1-2b3a-6163e80e75ca"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"MicrosoftSharePointTeamServices":["15.0.0.4420"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1; RequireReadOnly"],"Cache-Control":["max-age=0, private"],"Date":["Fri, 15 Feb 2013 14:37:22 GMT"],"Server":["Microsoft-IIS\/7.5"],"X-AspNet-Version":["4.0.30319"],"X-Powered-By":["ASP.NET"]}

   at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context)
   at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

I have seen these HTTP 500 and HTTP 400 often from time to time.  My main question is how do I go about finding more information about what happened behind.  The SharePoint logs offered nothing, and I can't seem to find any logs on the Workflow Manager server.  Any suggestions?

Getting document library data using the REST API

$
0
0

I'm having trouble getting both the document URL and list item ID from a document library using the REST API.

I have a custom list and a document library. One of the list fields is a lookup to the document library to allow one more documents to be associated with a list item. I'm working with the REST API using Javascript and jQuery in a visual webpart to provide a front-end for these lists so that documents can be dragged and dropped onto the list items to associate them.

I'm currently expanding the list data to include the ID and title field of associated documents. I can get the document list item ID and Title field using _api/web/lists/getbytitle('doclibname')/items but this doesn't include the document file name or URL, and I can get the file information using _api/web/lists/getbytitle('doclibname')/rootfolder/files but this doesn't included the list item ID.

Is there any way to get the list item ID and file name or URL for a document using the REST API? Ideally I would like to have one call to return all of the data from my list including the ID and URL of all associated documents. Failing that, can anyone suggest an alternative approach?

Thanks!

how to show the custom webpart in a new tab?

$
0
0
have created a custom webpart of outlook calendar and want to show in a new tab?

Enable "Display Search box" programmatically

$
0
0

Hi all, 

how can I enable the "Display Search box" programmatically in SP2013 when provisioning a new webpart. What is the property called. 

Cheers

Viewing all 1404 articles
Browse latest View live


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