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

How to remove titel from site ect. home from home.aspx

$
0
0

hi can anybody tell me

how do I remove title from the exact site home.aspx



Adding Link from a "Ribbon Menu", saves the relative url for links pointing to the same sharepoint 2013 sitecollection

$
0
0

Hi

I am very new to Share point development. We have a Share point 2013 website. In the site when we add an item to a List, we have the column "Body" which is an Enhanced rich text editor. If a hyperlink is inserted into the body using the ribbon menu  then it just saves the relative url for the link if the link is pointing within the same website.

But if we add a link which points to an external website then it saves the absolute url. But we need the link to save the absolute url for all cases. Since this is not happening it is creating a problem for us and I have tried a lot of ways to save the absolute path for the internal links. Can somebody help me how to do that?


What is the significance of the Assembly Deployment Target and Feature Scope?

$
0
0

Hello,

We have created a project as Farm Solution (not sandbox).

Under project properties we can see an option for Assembly Deployment Target : GAC or WebApplication.

I know that GAC will deploy the dll to windows\assemblies and WebApplication will deploy to website/bin folder.

Now, we add a feature to the project; in here we can see a dropdown for scope with options as: Farm; Web; Site; WebApplication. I know that depending upon what option is chosen; the feature can then be activated by going to the respective manage features option via SharePoint front end UI.

Can you tell me what is the significance of the Assembly Deployment Target and Feature Scope?



sharepoint online :error occurs when add a reference to the sp.runtime.js

$
0
0

Hi. I have a test version up of sharepoint online.
I have created a copy of a sitecollection for evaluation and understood that in some cases sp.js and sp.runtime.js does not load.
That site use JSOM so I added reference as the following post.
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/ede0b05a-7365-481b-a7ce-ef1096fef983/sharepoint-2013-javascript-not-getting-loaded-some-times?forum=appsforsharepoint
But then error occured at sp.runtime.js, row 2 59,270th character, "SCRIPT5007: Unable to get property '/sites/root-eval/_api/contextinfo' of undefined or null reference".
If this is a common problem, please tell me how to respond.

Sharepoint saving to external webservice

$
0
0

I need save documents from SharePoint Library to external webservice from another supplier. Is possible? anyone have any examples?

Torres

SharePoint:MenuItemTemplate - passing parameter in java script function

$
0
0

Hello ,

  Please Check the following code :

   <script type="text/javascript">
            function DeleteCase(CurrentItemId) {
                alert(CurrentItemId);
            }

</script>

<SharePoint:MenuTemplate ID="_gridMenuItems_TemplateTwo" runat="server">
                    <SharePoint:MenuItemTemplate ID="_deleteMenuItemTemplateTwo" 
                           Text="Delete"
                           ClientOnClickScript="DeleteCase();"     // How Can I pass Cuurent ID of item                    
                                                 runat="server"/>

                </SharePoint:MenuTemplate>

 <SharePoint:SPGridView ID="_casesSPGridView" AllowFiltering="true" AllowSorting="true"
                      AutoGenerateColumns="false" runat="server" Width="100%"
                    DataSourceID="_casesDataSource" FilteredDataSourcePropertyName="FilterExpression"
                    FilteredDataSourcePropertyFormat="{1} = '{0}'" OnSorting="_casesSPGridView_Sorting">
                    <Columns>
                        <SharePoint:SPMenuField HeaderText="Case" 
                                                TextFields="VGSP_TicketTaleIMS_Cases_CaseName" 
                                                MenuTemplateId="_gridMenuItems_TemplateOne"
                                                NavigateUrlFormat='Details.aspx'
                                                NavigateUrlFields="ID"/>

                     </Columns>       


ASk


Retrieve analytics reports programmatically in SharePoint 2013 using Object model?

$
0
0

All,

Is any code sample available to get Analytical reports using "Microsoft.Office.Server.Search" dll in object model?

How to get analytics reports programmatically in SharePoint 2013?

$
0
0

In SharePoint 2010 it was possible to obtain data from web analytics programmatically using Microsoft.Office.Server.WebAnalytics.Reporting.AnalyticsReportFunction class.

How can you get search reports programmatically in SharePoint 2013? Are there new assemblies or classes that can be used to obtain them?

In my scenario, i am mostly interested in the most searched terms at web application or service application level. 

In SharePoint 2013 the Web Analytics Service Application was merged into the Search Service Application. It seems now that the old assemblies used for this (Microsoft.Office.Server.WebAnalytics.dll and Microsoft.Office.Server.WebAnalytics.UI.dll) are not available any more.

They are available in the user interface as Excel reports, in CA->Application Management->Manage Service Applications->Search Service Application->Usage Reports , but I am interested to obtain these reports programmatically.

Is this scenario still supported in SP 2013?


Exception while creating termset using SharePoint webservice

$
0
0

Hi, 

I am trying to create a new term set in SharePoint 2013 using a custom web service deployed on SharePoint server. I have written below code to create the term set.

SPSecurity.RunWithElevatedPrivileges(delegate()
                {
    using (Impersonator imp = new Impersonator("Username", "Domain", "Password"))
                    {
                        using (SPSite site = new SPSite("http://server:8002/sites/site/"))
                        {
site.AllowUnsafeUpdates = true;
TaxonomySession session = new TaxonomySession(site);
TermStore termStore = session.TermStores["Managed Metadata Service"];
var termStoreAdmin = termStore.TermStoreAdministrators.Where(obj => obj.PrincipalName.Contains("domain\\username")).FirstOrDefault();

if (termStoreAdmin == null)
termStore.AddTermStoreAdministrator("domain\\username");

Group group = termStore.GetGroup(new Guid(groupGuid));
if (group != null && !string.IsNullOrEmpty(termSetName))
{
TermSet termset = group.TermSets.FirstOrDefault(obj => obj.Name.Equals(termSetName));
if (termset == null)
{
termset = group.CreateTermSet(termSetName);
termSetGuid = termset.Id.ToString();
}
SetupNavTermSet(termset, session, site.OpenWeb());
}
termStore.CommitAll();
}
}
}

In this code I am getting exception while executing group.CreateTermSet(termSetName);line, the error is:

Error    :  Value cannot be null.
Source : Microsoft.SharePoint
Error Details :     at Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.GetUserIdentifierEncodedClaim(IIdentity identity)
   at Microsoft.SharePoint.Taxonomy.Internal.CommonUtilities.GetCurrentUserName()
   at Microsoft.SharePoint.Taxonomy.TaxonomySession.get_CurrentUserName()
   at Microsoft.SharePoint.Taxonomy.Group.CreateTermSet(String name, Guid newTermSetId, Int32 lcid)
   at Microsoft.SharePoint.Taxonomy.Group.CreateTermSet(String name)
   at SplitVisionMetadataManagement.CustomManageMetaDataWCFService.<>c__DisplayClassc.<CreateTaxonomyTermSet>b__8()

Does anybody got this issue and solution?

Thanks in advance...


Ravi Patil

Uploading files to the SharePoint Document Library and updating any metadata columns Using REST.

$
0
0

I'm trying to uploading file to the SharePoint library and updating metadata using REST.

The upload is working, butupdating metadatadoes not work so can you help me ,How to update metadata using REST?

Thanks In Advance.

Modify HTML Field Security Using Powershell or C#

$
0
0

I searched a lot but not able to find out how to Modify HTML Field Security in SP2013 Using Powershell or C#

Need help..!!

Updating SharePoint 2013 Workflow in production environment (not during development)

$
0
0

Hi!

I'm trying to find the recommended approach to update the definition (xaml) of a workflow developed using VS 2013, when an earlier version of that workflow has already been deployed using a wsp. So imagine that I have a VS project with a package that includes a feature that includes a workflow definition and association files. i.e. standard approach for developing workflows using VS. I have deployed and activated the feature, now there are workflow instances running and the inevitable moment has come (either because a bug has been detected or some minor tweak needs to be done) that requires a new version to replace the current one.

I have taken the following under consideration already:

1) There is a known VS bug, accepted by MS. That one has to do with the development process and I'm already using the workaround mentioned there that involves killing a task after retracting the old wsp and before deploying the new one.But this only helps when developing and I'm looking for a solution for my production environment and how to deploy the new version there.

2) I don't mind having existing instances to continue running with the previous version

3) Having experience with Workflow Foundation (outside the context of SharePoint)I understand that some changes can result in the deserialisation of running instances to fail. I accept this side effect. Nothing we can do about it.

4) I understand that one solution is to rename my project, change the guids and workflow name, deploy it as a completely new thing and disable the creation of new instances for the old one (as described here). But this would mean that updating workflows it not actually supported.

So what is the deal with this issue?


Dimitris Papadimitriou, Software Development Professional

SharePoint: Hyperlink Switchboard linked to HTML

$
0
0

Website button --> SharePoint list item --> Correct hyperlink

I need to make hyperlinks in a HTML page direct to SharePoint and then to the specified hyper-link.

This is so that weblinks can be updated from SharePoint without editing the code.

SharePoint needs to act as a kind of hyper-link switchboard.

Any help on how to do this would be greatly appreciated.

send image in workflow mail body

$
0
0

Hi  All,

I have image problem in my workflow mail. Here is a situation

I am using visual studio sendmail activity in workflow. Body of mail is assigned from enhanced rich text field of sharepoint list. everything works well except if there is an image in sp list field. Images are saved in another sp picture library.   

here is my code

  SPList list = workflowProperties.Web.Lists[workflowProperties.Item.ParentList.Title];
                           SPListItem item = list.GetItemById(workflowProperties.Item.ID);
                          mailBody = item["Detail"].ToString();

could anyone help me with this problem. I need to send mail with  image inside.

Please help 

thanks

Get ClientContext from Full sharepoint url?

$
0
0

I am receiving a full sharepoint url like 'http://TestServer/sites/TestSite/TestSubSite/_vti_bin/lists.asmx'

I know the following code will not work as the url does not directly reference a site.

using (var context = new ClientContext(http://TestServer/sites/TestSite/TestSubSite/_vti_bin/lists.asmx))

{
}

My question is...considering urls are provided to me, what logic can I apply to modify the url so that I am only referencing the subsite 'http://TestServer/sites/TestSite/TestSubSite'?

Thanks heaps.


- Not able to fetch data from Termstore ,Terms etc using Client Object model in Sharepoint 2013

$
0
0

Hi,

I want to fetch termstore, Termsets and related terms.However, Iam not even able to fetch the termstore. Below is the error message.

" TypeError: termStores is undefined

 termStoresEnum = termStores.getEnumerator(); "

BELOW IS MY CODE---- Dont know if iam missing any reference ,Please let me know.



<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>

$(document).ready(function () {

var scriptbase = _spPageContextInfo.webServerRelativeUrl + "/_layouts/15/";

$.getScript(scriptbase + "SP.Runtime.js",

function () {

$.getScript(scriptbase + "SP.js", function () {

$.getScript(scriptbase + "SP.Taxonomy.js", function () {

context = SP.ClientContext.get_current();

//Call your code here.

getTermStores();

});

});

});

});

function getTermStores() {

    session = SP.Taxonomy.TaxonomySession.getTaxonomySession(context);

    termStores = session.get_termStores();

    context.load(session);

    context.load(termStores);

    context.executeQueryAsync(

function(){

termStoresEnum = termStores.getEnumerator();

      var termStores = "Term Stores: /n";

      while (termStoresEnum.moveNext()) {

        var currentTermStore = termStoresEnum.get_current();

        var termStoreID = currentTermStore.get_id();

        var termStoreName = currentTermStore.get_name();

termStores += "Name: " + termStoreName + " ID:" + termStoreID;

}


}, function(){

//failure loading termstores.

});

}

</script>




Workflow Tasks Reports Best Practice

$
0
0

Hello All,

I am building SharePoint 2013 web application. I want to use SharePoint workflow 2013 in this web application (Designer Or VS)

What is the best practice to get statistical information about workflow tasks ? and by statistical information I mean total completed tasks, total ongoing tasks, each user tasks .......

Previously in SP 2010 I was doing that by building visual webpart that uses CAML query to get this information from the Tasks list .... Is there a better way in 2013 ?

Critical JavaScript syntax error in Visual Studio 2013 SharePoint 2013 solution

$
0
0
I opened a SharePoint 2013 solution whose source code I got from our Team Foundation Server. I changed the site URL to a site collection local to my virtual machine, and I began debugging the program.  Before a page was rendered, I twice received the error: JavaScript critical error in ...Pages/default.aspx SCRIPT:1002 Syntax Error.   The Visual Studio 2013 error gives the option to Stop Debugging or Continue, and the solution is deployed and activated after repeatedly hitting Continue.  I've researched the error, but I still don't understand the problem, especially since default.aspx is not part of the solution. 

REST API unable to retrieve custom lookup value

$
0
0

Hi,

I'm trying to retrieve a list item that contains an extended lookup field. For some reason I'm keep geting this error:

The field value for field "fieldname" of type "fieldtype" cannot be serialized.

The only real customization of the field is that it has altered rendering and thus far it been working just fine.

This is my sample REST query:

jQuery.ajax(
{
	url: "/_api/web/lists/getByTitle('MyList')/items/",
	dataType: "json",
	data: "$filter=startswith(ContentTypeId, '" + parentCtId.id + "')",
	processData: false,
	headers: { ACCEPT: "application/json;odata=verbose" },
	async: false
}).done(function (data)
{
}).fail(function (e)
{
});
Any ideas of what might be missing?

List Data Validation failed error

$
0
0

I'm getting the following error "List data validation failed." while trying to upload a document which already exists.

My Document library settings : Enabled Version Settings (Major), 

Require documents to be checked out before they can be edited : YES,

Validation Formula : =[End Date]>=TODAY()

If I upload a new document  to the document libraryeverything is working fine. If I edit properties of the ListItem everything works fine. The system throws error only when I upload already existing document.

If i make "Require documents to be checked out before they can be edited : NO" , then everything is fine. But business requirement forces me to do checkout.

Also if i change the Validation Formula : =[End Date]<=TODAY() , then everything works fine.

Viewing all 7589 articles
Browse latest View live


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