Quantcast
Channel: Developing Apps for SharePoint 2013 forum
Viewing all 8089 articles
Browse latest View live

Can I create a remote event receiver for an existing SharePoint list that isn't part of my app?

$
0
0

Currently I can capture remote List Item events in a list that originates from within my app (using the list url such as "Lists/List1") but I cannot seem to catch events for lists that exist in my SharePoint site already.  

I have tried referencing the list with it's full URL (like "http://hostweb.domain.com/Lists/List2") and while the app will deploy (it seems it won't if you don't have a valid list / template specificed) it never fires off my remote event receiver code.  

Is it possible to write remote event receivers for lists contained in SharePoint directly without them being a part of my app?


Lightswitch SharePoint App on premise

$
0
0

Hi,

could you describe the additionnal steps, compared  to Office365, involved in deploying a Lightswitch SharePoint App on Premise using the new VS2012 CTP4.

Thanks.

Where have ListItemVersionCollection and ListItem.Versions gone?

$
0
0

Hi,

I'm using VS2013 connecting to a SharePoint 2013 online (developer site).

I can view listItems using C# CSOM without a problem. But I wanted to see if I could get to previous ListItem versions. But listItem.Versions is not available:

( 'Microsoft.SharePoint.Client.ListItem' does not contain a definition for 'Versions' and no extension method 'Versions' accepting a first argument of type 'Microsoft.SharePoint.Client.ListItem' could be found (are you missing a using directive or an assembly reference?)")

Additionally, SPListItemVersion (ListItemVersion) and SPListItemVersionCollection (ListItemVersionCollection) are unavailable too. (After an extensive search, I've also tried going via the ListItem.File method, without success.)

So, any suggestions as to how I could get to a previous version of ListItem? Or is there something wrong with my version of VS2013?

Thanks.

Error when trying to add app from Sharepoint store in office 365 online "Sorry, only tenant administrators can add or give access to this app."

Can not show single List in App permissions requests dropdown list

$
0
0

Hi All,

I am trying to setup a SharePoint App so only one document library or list shows up in the permissions requests dropdown list when the App is activated for the first time. I have tried

     <Property Name="ListName" Value="MyCustomers">

and

     <Property Name="Title" Value="MyCustomers">

but this doesn’t work, all the lists are displayed.

I know <Property Name="BaseTemplateId" Value="101"/> works but shows up all the document libraries. I only want one.

**********
<?xmlversion="1.0"encoding="utf-8" ?>

<!--Created:cb85ee80c-f585-434ff-8bfc-12f4reewee0e34a9-->

<Appxmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest"

    Name="SharePointAppTest"

    ProductID="{07b0we23f8-9a21-4180-b8e7-e1a51493w1f}"

    Version="1.0.0.0"

    SharePointMinVersion="16.0.0.0"

>

 <Properties>

   <Title>SharePointAppTest</Title>

   <StartPage>~appWebUrl/Pages/Default.aspx?{StandardTokens}</StartPage>

 </Properties>

 <AppPrincipal>

   <Internal />

 </AppPrincipal>

 <AppPermissionRequests>

   <AppPermissionRequestScope="http://sharepoint/content/sitecollection/web/list"Right="Write">

     <PropertyName="Title"Value="Tech Documents" />

   </AppPermissionRequest>

 </AppPermissionRequests>

</App>

**********

I hope you can help
Colin


Error with Signing in to the SP Online from VS 2013

$
0
0

Hi,

I've created  a new project with SP Online app template in VS2013. Once the project is created, VS prompts me to login to the SP Online site. After providing the credentials, I'm facing the below shown error:


Not sure what does this error meant for, It would be really helpful if  someone can shed some light here.


Thanks, Kaviya (Please remember to click “Mark as Answer” on the post that helps you)


App error: Issuer name is not registered and Issuer name in token oesn't match any of the registered issuer names for trusted sts

$
0
0

I am trying to setup my environment for provider hosted apps, I used the tutorial below.

How to prepare your environments for Sharepoint Provider Hosted Apps

If I dont have any sharepoint calls in my app web, well it works, as soon as I want to make a CSOM call, then I get a 401 Error.

Yes the IssuerID matches on the app and the powershell script. (I used this script, http://blog.loitzl.com/2012/12/18/add-new-trusted-token-issuer-to-a-sharepoint-2013-site-s2s-hightrust-apps/)

Also the AppId matches on the web.config and appmanifest.xml

I tries using Jeremy Thake's blog TROUBLESHOOTING SHAREPOINT 2013 PROVIDER HOSTED APPS ON-PREMISES.

But after following slowly and detailed, I didnt find any mistake done on my side based on the above tutorials.

The errors on the logs are detailed below:

SPJsonWebSecurityBaseTokenHandler: Issuer name in token 'c4bfe291-0ddc-44fe-ae92-eea01e4cac44@06f1ff20-4355-47f0-96ff-71eaa90cc784' doesn't match any of the registered issuer names for trusted sts '1e3114c4-ad60-4a21-8e94-f9d8472af45d'.



SPApplicationAuthenticationModule: Failed to authenticate request, unknown error. Exception details: System.IdentityModel.Tokens.SecurityTokenException: Issuer name is not registered    
 at Microsoft.SharePoint.IdentityModel.SPJsonWebSecurityBaseTokenHandler.ValidateTokenIssuer(X509SecurityToken signingKey, String tokenIssuer)    
 at Microsoft.SharePoint.IdentityModel.SPJsonWebSecurityBaseTokenHandler.ValidateToken(SecurityToken token)    
 at Microsoft.SharePoint.IdentityModel.SPJsonWebSecurityTokenHandler.ValidateToken(SecurityToken token)    
 at Microsoft.SharePoint.IdentityModel.SPApplicationAuthenticationModule.TryExtractAndValidateToken(HttpContext httpContext, SPIncomingTokenContext& tokenContext)    
 at Microsoft.SharePoint.IdentityModel.SPApplicationAuthenticationModule.ConstructIClaimsPrincipalAndSetThreadIdentity(HttpApplication httpApplication, HttpContext httpContext, SPFederationAuthenticationModule fam)    
 at Microsoft.SharePoint.IdentityModel.SPApplicationAuthenticationModule.AuthenticateRequest(Object sender, EventArgs e)

Anyone could guide me?



Follow me on Twitter
levalencia Blog

Parsing the count of each grouped item in a list to another column

$
0
0

Hi All,

I have a calendar list to book training courses and a workflow that send emails to all the listed attendees and also called the exchange web service to populate individual outlook calendar diaries once they accept the training invite. Then I also created another list to record the total count of each accepted training item from the calendar list.

My problem is that I will like to send email to the initiator (maybe via a workflow) once the count on each item group is equal to 15.

Please any help will be appreciated.

Kind Regards

Louis


thanks





How to use a list of members of a sharepoint site in a custom web app on that sharepoint site

$
0
0

I was asked to not ask my question at office 365 forums but here, so I do

Dear all

My Situatiion is this:

  • Trying to create a "custom web app" for a site in Sharepoint 2013.
  • creating the "custom web app" with the corresponding button in he "new" menu in Access (Office 365)
  • purpose is to track activites with their corresponding teams.
  • Thus there will be a table "activites" that has a data field in which to enter for example the team leader
  • there will be evaluations running based on this, manual typing of the names is thus out of the question.
  • Dropdown menu is the preferered solution. The content of that drop down menu would need to be all the people that have access to this sharepoint site, (members of that site)
  • Obviously it makes no sense having a seperate table in that custom web app in which I manually need to enter all users. This would mean redundant data and extra work, because when I add a member to the site, I also have to add him to that list.
  • Preferred would be if I could link the list of sharepoint members as a table into the custom web app. In short I need the function that any MariaDB (or MySQL, or ....)  server can do with this simple command:CREATE VIEW sharepoint_users AS SELECT * FROM mysql.user;

BR

Display items in Grid view fetch by depending on drop down selected item

$
0
0

Hi  i have a scenario like below

I have masters lists as country and states  and regions , i created another list on that i created lockups for country and states and regions from masters 

Task is that when we select the country and state fields there should display a grid view with all the states and regions of that country with each column having  with check box , choice to selection for customer after selection of each items select booked button to s  ave the details

for this can i use java scriun darlypt  for above scenario if there is any example please send me the link for this

Thanking you,

Arun darly

How to implement tooltip for the list items for the particular column in sharepoint 2013

$
0
0

Hi,

I had created a list, How to implement tooltip for the list items for the particular column in SharePoint 2013.

Any help will be appreciated

How can I create a rich text column for a SharePoint app via Visual Studio 2012?

$
0
0

I'm creating a App part via Visual Studio 2012. I create a list via the VS 2012 UI. However, the only kind of "Multiple lines of text" column I can create is plain text. I need to a Enhanced rich text (Rich text with pictures, tables, and hyperlinks). How can I create that column via Visual Studio?

<label for="onetidRichTextFullHtml" style="font-family:inherit;font-size:inherit;color:inherit;vertical-align:middle;">colfjdkslfjEnhanced rich text (Rich text with pictures, tables, and hyperlinks)</label>
<label for="onetidRichTextFullHtml" style="font-family:inherit;font-size:inherit;color:inherit;vertical-align:middle;">Enhanced rich text (Rich text with pictures, tables, and hyperlinks)</label>

SharePoint 2013 Provider Hosted App Error

$
0
0

I am getting the following error when trying to run the app.

System.TypeInitializationException: The type initializer for 'SharePointContextProvider' threw an exception. ---> System.TypeInitializationException: The type initializer for 'TokenHelper' threw an exception. ---> System.Security.SecurityException: That assembly does not allow partially trusted callers.

Any Ideas.

How much more effort is involved to build an App verus a Farm solution?

$
0
0

OK everyone, I realize that the correct answer to this question is "it depends" so let's just take it for granted that you've already beaten me over the head with a blunt constructor and hear me out.

We've designed the spec for a SharePoint 2013 farm solution that includes several lists, two custom asp.net forms that will be deployed to content types with some custom code which runs with elevated privileges to insert and update items in the lists, and a custom timer job to do after-hours processing of the data. We're pretty comfortable with the tools and techniques we need to use and we think it will be about 100 hours of development time (give or take).

Now the boss has come back and added the requirement that the entire solution be deployable to O365 when the company migrates next year. I've read the documentation on creating apps and pushing the server-side code to Azure but no one on my team has ever worked with these technologies.

So what I'm asking is, for those of you who have already made the great leap to cloud development, did you find that you could build the same solution in roughly the same time? Or do you find that everything takes longer with the cloud and if so is it something like 10% more or 150%?

Microsoft Office Developer Tools for Visual Studio 2012 - Full download

$
0
0

Hi,

I´m working in a high secure :-) development network and can´t download the Microsoft Office Developer Tools for Visual Studio 2012 with the web installer. Does anybody knows wether there is a possibility to get a "full" installation file?

thanks in advance

kai


SharePoint 2013 Provider Hosted Apps running on local IIS on premise

$
0
0

Hi there, 

I have three issues with the Provider Hosted Apps on Premise running on the local IIS.  

1. App getting deleted from the page: I have placed my app on a page, when i made any changes to app (appweb or app) and click on F5, app prompts for to trust the app once again, after trusting it, is getting removed from the page. 

2. when i click on the title of the app, it is re-directing to App Web domain, how to avoid this. 

3. while app loading on the page, it is showing that "Working on it..." before loading the content, if i have multiple apps on one page, each will load at different times, it is looking like multiple blocks loading in page, how to load the page when all the app parts are already loaded. 

Thanks

Ram 

Register Sod Undefined Error While invoking the App

Incoming Emails in Share Point 2013

$
0
0

Hi,

I want to know can we setup Incoming Email in Share Point 2013 Apps in any environment e.g. SharePoint Hosted, Azure Auto Hosted or Provider Hosted ?

If yes then how and if no then please explain the reason.

It's very urgent. Please clarify asap.

Thanks in Advance !

Neetu Tanwar


Neetu Tanwar Software Developer

Create sharepoint components from Apps

$
0
0

Hi,

  I'm having the requirement that when the user install the apps, I want to create some site columns, content types, list instances, sharepoint groups with permissions etc. What type of apps needs to be created and how to achieve this requirement. I dont like to use sharepoint full trust / sandbox based solution? Also from the apps installation, I want to perform all operations. Is it possible?


Balaji -Please click mark as answer if my reply solves your problem.

Get Navigation Taxonomy term tree in SharePoint App

$
0
0

Since I have resigned myself to the fact that I will be unable to retrieve the navigation taxonomy information from the REST services in a SharePoint app (see here for details) which is what I have done in non-app code.  I have started down the road of using SharePoint JSOM code to retrieve the navigation tree.

Unfortunately I have run into a snag here also due to JSOM lazy loading and being unable to wait for context.executeQueryAsync calls to complete in my asynchronous functions.  I was wondering whether anyone has done something similar?

My non-working code:

(function () {"use strict";

    // The initialize function must be run each time a new page is loaded
    Office.initialize = function (reason) {
        $(document).ready(function () {
            app.initialize();

            var scriptbase = "/_layouts/15/";
            $.getScript('/_layouts/1033/init.js', function () {
                $.getScript(scriptbase + 'MicrosoftAjax.js', function () {
                    $.getScript(scriptbase + 'sp.runtime.js', function () {
                        $.getScript(scriptbase + 'sp.js', function () {
                            $.getScript(scriptbase + 'sp.core.js', function () {
                                $.getScript(scriptbase + 'sp.taxonomy.js', function () {
                                    $.getScript(scriptbase + 'sp.publishing.js', function () {
                                        $.getScript(scriptbase + 'sp.requestexecutor.js', function () {
                                            getAppWeb(null);
                                        });
                                    });
                                });
                            });
                        });
                    });
                });
            }).fail(function () { $('#divOutputContainer').html('<p style="colour:red">Invalid SharePoint Url, unable to load scripts.</p>'); })


            $('#load-sharepoint-context').click(getTargetSharePointContext);
        });
    };

    var appWebURL;
    var web;

    function getAppWeb(functionToExecuteOnReady) {

        var context = SP.ClientContext.get_current();
        web = context.get_web();
        context.load(web);
        context.executeQueryAsync(onSuccess, onFailure);

        function onSuccess() {

            appWebURL = web.get_url();

        }
        function onFailure(sender, args) {
            app.initialize();
            app.showNotification("Failed to connect to SharePoint. Error: " +
                args.get_message());
        }
    }

    var context
    var appContextSite;
    function loadFromSpecifiedUrl() {
        // define ClientContext for the specified SP site
        context = new SP.ClientContext.get_current();
        var factory = new SP.ProxyWebRequestExecutorFactory(appWebURL);
        context.set_webRequestExecutorFactory(factory);

        var appContextSite = new SP.AppContextSite(context, $('#txtSharePointUrl').val());
        var hostWeb = appContextSite.get_web();
        
        var taxonomySession = SP.Taxonomy.TaxonomySession.getTaxonomySession(context);

        var webNavSettings = new SP.Publishing.Navigation.WebNavigationSettings(context, hostWeb);
        context.load(webNavSettings.get_currentNavigation())
        var currentNavigationSettings = webNavSettings.get_currentNavigation();
        context.load(currentNavigationSettings);

        context.executeQueryAsync(function () {

            var termStoreId = currentNavigationSettings.get_termStoreId();
            var termSetId = currentNavigationSettings.get_termSetId();
                        
            var termStore = taxonomySession.get_termStores().getById(termStoreId);
            var termSet = termStore.getTermSet(termSetId);

            var navTermSet = SP.Publishing.Navigation.NavigationTermSet.getAsResolvedByWeb(context, termSet, hostWeb, 'CurrentNavigationSwitchableProvider');
            context.load(navTermSet);

            var navTermSet = SP.Publishing.Navigation.NavigationTermSet.getAsResolvedByWeb(context, termSet, web, 'GlobalNavigationTaxonomyProvider');

            var terms = navTermSet.get_terms();
            context.load(terms, 'Include(Id, Title, TargetUrl, FriendlyUrlSegment, Terms)');

            context.executeQueryAsync(function (sender, args) {
                recursorCount = terms.get_count();
                var newData = [];
                recursor(context, terms);
                $("#treeview").btechcotree({
                    containerid: "treeview"
                    , dataset: { "root": newData }
                    , datatype: $treedatatype.Json
                    , dataformat: $treedataformat.Hierarchy
                    , target: window.name
                });
            }, function (sender, args) {

            });

        }, function () {

        });
        
    }

    function recursor(context, terms) {

        var termsEnumerator = terms.getEnumerator();
        var newNodes = new Array();

        while (termsEnumerator.moveNext()) {
            var currentTerm = termsEnumerator.get_current();
            var newTerm = {
                "id": currentTerm.get_id().toString(),"name": currentTerm.get_title().get_value(),"href": currentTerm.get_targetUrl().get_value(),"childnodes": []
            }
            var subTerms = currentTerm.get_terms();
            if (subTerms.get_count() > 0) {
                context.load(subTerms, 'Include(Id, Title, TargetUrl, FriendlyUrlSegment, Terms)');
                context.executeQueryAsync(function (sender, args) {
                    newTerm.childnodes = recursor(context, subTerms);
                }, function (sender, args) {
                });
            }
            newNodes.push(newTerm);
        }

        return newNodes;
    }

})();
Everything works until I try to retrieve any information about a child node in secondary recursor calls, which of course will not work because the include does not appear to also apply to sub objects (unless these is some alternate syntax I am unaware of), and as soon as I need to call a secondary executeQueryAsync I am no longer procedural and the method completes before any recursive calls hit the server.


Viewing all 8089 articles
Browse latest View live


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