Fetching workflow status from Extended Properties in SharePoint 2013 sequential workflow (Farm solutions) option

HI,
I am using VS 2012, I have selected the option "sharepoint sequential workflow (Farm solution) option and not the workflow App model.
Earlier in SharePoint 2010, the approver status column can be got from ExtendedProperties["TaskStatus"] and which contained either "#" or "@" as its value.
However, in SharePoint 2013, the ExtendedProperties does not contain the "TaskStatus" key. In the quickwatch, i was able to see the value as "#" associated to some guid key. In the debug mode,i can see the below:
(new System.Collections.Hashtable.HashtableDebugView(TaskPropertiesForManagerAfter.ExtendedProperties)).Items[12]
But I’m not sure how to get to it from the code?
How to retrieve the Task Status using ExtendedProperties in SharePoint 2013?
Thanks

Having problems getting SPD 2013 installed on my laptop because of a trial of O365, but I know in SPD 2010 you could find the BCC fields, etc... in the Advanced properties, it wasn't directly available via the common interface.  I know 2013 is very
different from 2010, and if I can get it to install correctly, I will update, but look for an advanced property, or an XML view where you can find the FROM: field.

Similar Messages

  • Reorder User Profile properties in SharePoint 2013.

    Hi, I have created custom user profile properties in SharePoint 2013 under User Profile Service Application, now I want to change the order of properties as well as also want to move OOTB properties and custom properties from one section to another section.
    Is there any Power Shell command available to move properties between sections?
    Regards,    

    Hi Prakash,
    Use the script in this blog to retrive user profile properties from a certain section.
    http://stevemannspath.blogspot.in/2013/05/sharepoint-20102013-using-powershell-to.html
    # Dynamic Settings
    $mySiteUrl = "http://mysite.company.net"
    $findProperty = "PictureUrl"
    Next, we needed to establish the server context:
    # Obtain Context based on site
    $mySiteHostSite = Get-SPSite $mySiteUrl
    $mySiteHostWeb = $mySiteHostSite.OpenWeb()
    $context = Get-SPServiceContext $mySiteHostSite
    From the context we can instantiate a ProfileManager object and retrieve all of the SharePoint User Profiles:
    # Obtain Profiles from the Profile Manager
    $profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context)
    $AllProfiles = $profileManager.GetEnumerator()
    $outputCollection = @()
    Next, we loop through the profiles and retrieve the account name (for identification purposes) and the property we are interested in finding:
    # Loop through profiles and retrieve the desired property
    foreach ($profile in $AllProfiles)
    $output = New-Object System.Object
    $output | Add-Member -type NoteProperty -Name AccountName -Value $profile["AccountName"].ToString()
    $output | Add-Member -type NoteProperty -Name $findProperty -Value $profile[$findProperty]
    $outputCollection += $output
    Finally, we list out the collection items that do not have a value for the property (ie. null):
    # List all Accounts that do not contain the property
    $outputCollection | Where-Object {[bool]$_.($findProperty) -ne $true}
    FULL SCRIPT
    # Dynamic Settings
    $mySiteUrl = "http://mysite.company.net"
    $findProperty = "PictureUrl"
    Write-Host "Beginning Processing--`n"
    # Obtain Context based on site
    $mySiteHostSite = Get-SPSite $mySiteUrl
    $mySiteHostWeb = $mySiteHostSite.OpenWeb()
    $context = Get-SPServiceContext $mySiteHostSite
    # Obtain Profiles from the Profile Manager
    $profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context)
    $AllProfiles = $profileManager.GetEnumerator()
    $outputCollection = @()
    # Loop through profiles and retrieve the desired property
    foreach ($profile in $AllProfiles)
    $output = New-Object System.Object
    $output | Add-Member -type NoteProperty -Name AccountName -Value $profile["AccountName"].ToString()
    $output | Add-Member -type NoteProperty -Name $findProperty -Value $profile[$findProperty]
    $outputCollection += $output
    # List all Accounts that do not contain the property
    $outputCollection | Where-Object {[bool]$_.($findProperty) -ne $true}
    In this blog, we can refer the script to create new section and new properties to this section.
    http://sergioblogs.blog.co.uk/2013/01/08/powershellscript-to-add-new-user-profile-properties-from-the-term-store-15407371/
    # PowerShell Script to Add New User Profile Properties from the Term Store
    # Get parameters
    $mySiteWebApp = Read-Host "Please enter the MySite Web Application URL"
    $termStoreSrvApp = Read-Host "Please enter the Term Store Service Application name"
    # Add SharePoint DLLs
    [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
    [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Sharepoint.Administration")
    [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Sharepoint.Taxonomy")
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.UserProfiles")
    # Get site collection for MySite
    #$sitecollection = Get-SPSite | Where-Object {$_.Url -eq "http://yourMySiteHostURL"}
    $sitecollection = Get-SPSite | Where-Object {$_.Url -eq $mySiteWebApp}
    if($sitecollection -ne $null) {
    # Get the taxonomy session
    $taxSession = Get-SPTaxonomySession -site $sitecollection
    # Get the term store - you will need to amend the value for the correct name of your MMS Name
    #$termStore = $taxSession.TermStores["Managed Metadata Service"]
    $termStore = $taxSession.TermStores[$termStoreSrvApp]
    if($termStore -ne $null) {
    # Get the term store group for Swisslo
    $termStoreGroup = $termStore.Groups["Name of Term Store"]
    # Get the term sets - Preset with examples for terms (Customer, Function, IndustrySegment, Language, Location, Organization), amend as required
    $termSetCustomer = $termStoreGroup.TermSets["Customer"]
    $termSetFunction = $termStoreGroup.TermSets["Function"]
    $termSetIndustrySegment = $termStoreGroup.TermSets["Industry Segment"]
    $termSetLanguage = $termStoreGroup.TermSets["Language"]
    $termSetLocation = $termStoreGroup.TermSets["Location"]
    $termSetOrganization = $termStoreGroup.TermSets["Organization"]
    # Get the user profile app - change UPS Name as required
    $serviceApplication = Get-SPServiceApplication | ?{$_.TypeName -eq "User Profile Service Application"}
    $serviceContext = [Microsoft.SharePoint.SPServiceContext]::GetContext($serviceApplication.ServiceApplicationProxyGroup, [Microsoft.SharePoint.SPSiteSubscriptionIdentifier]::Default)
    $userProfileConfigManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileConfigManager $serviceContext
    $userProfilePropertyManager = $userProfileConfigManager.ProfilePropertyManager
    $userProfileTypeProperties = $userProfilePropertyManager.GetProfileTypeProperties([Microsoft.Office.Server.UserProfiles.ProfileType]::User)
    $userProfileSubTypeManager = [Microsoft.Office.Server.UserProfiles.ProfileSubTypeManager]::Get($serviceContext)
    $userProfile = $userProfileSubTypeManager.GetProfileSubtype([Microsoft.Office.Server.UserProfiles.ProfileSubtypeManager]::GetDefaultProfileName([Microsoft.Office.Server.UserProfiles.ProfileType]::User))
    $userProfileProperties = $userProfile.Properties
    $ps = $userProfileSubTypeManager.GetProfileSubtype([Microsoft.Office.Server.UserProfiles.ProfileSubtypeManager]::GetDefaultProfileName([Microsoft.Office.Server.UserProfiles.ProfileType]::User))
    $pspm = $ps.Properties
    #Create new section in User Profiles - set the 'Name of the Section' throughout next chunk of code
    Write-Host "Creating new section for 'Name of Section'...."
    $allEntries = $userProfileConfigManager.GetPropertiesWithSection();
    $sectionExists =$false
    foreach ($temp in $allEntries) {
    if($temp.Name -eq "Name of Section") {
    Write-Host "Section for 'Name of Section' already exists.";
    $sectionExists = $true;
    $section = $temp
    if ($sectionExists -ne $true){
    $section = $allEntries.Create($true);
    $section.Name = "Name of Section";
    $section.ChoiceType = [Microsoft.Office.Server.UserProfiles.ChoiceTypes]::Off;
    $section.DisplayName = "Name of Section"
    $section.Commit();
    Write-Host "Section 'Name of Section' created"
    Write-Host "Creating new properties...."
    $Privacy = "public"
    $PrivacyPolicy = "OptIn"
    $coreProperties = $userProfilePropertyManager.GetCoreProperties()
    # Setting Custom Properties below, amend names as you did above to match your fields
    # Set new Custom Property for "Customer"
    $PropertyName = "SLCustomer"
    $PropertyDisplayName = "Customer"
    $newProperty = $coreProperties.Create($false)
    $newProperty.Name = $PropertyName
    $newProperty.DisplayName = $PropertyDisplayName
    $newProperty.Type = "string"
    $newProperty.Length = "50"
    $newProperty.IsMultivalued = $true
    $newProperty.TermSet = $termSetCustomer
    # Add the new property
    $coreProperties.Add($newProperty)
    $profileTypeProp = $userProfileTypeProperties.Create($newProperty)
    $profileTypeProp.IsVisibleOnEditor = $true
    $profileTypeProp.IsVisibleOnViewer = $true
    $userProfileTypeProperties.Add($profileTypeProp)
    $profileSubTypeProp = $pspm.Create($profileTypeProp);
    $profileSubTypeProp.IsUserEditable = $true
    $profileSubTypeProp.DefaultPrivacy = $Privacy
    $profileSubTypeProp.AllowPolicyOverride
    $pspm.Add($profileSubTypeProp);
    # Set new Custom Property for "Function"
    $PropertyName = "SLFunction"
    $PropertyDisplayName = "Function"
    $newProperty = $coreProperties.Create($false)
    $newProperty.Name = $PropertyName
    $newProperty.DisplayName = $PropertyDisplayName
    $newProperty.Type = "string"
    $newProperty.Length = "50"
    $newProperty.IsMultivalued = $true
    $newProperty.TermSet = $termSetFunction
    # Add the new property
    $coreProperties.Add($newProperty)
    $profileTypeProp = $userProfileTypeProperties.Create($newProperty)
    $profileTypeProp.IsVisibleOnEditor = $true
    $profileTypeProp.IsVisibleOnViewer = $true
    $userProfileTypeProperties.Add($profileTypeProp)
    $profileSubTypeProp = $pspm.Create($profileTypeProp);
    $profileSubTypeProp.IsUserEditable = $true
    $profileSubTypeProp.DefaultPrivacy = $Privacy
    $profileSubTypeProp.AllowPolicyOverride
    $pspm.Add($profileSubTypeProp);
    # Set new Custom Property for "Industry Segment"
    $PropertyName = "SLIndustrySegment"
    $PropertyDisplayName = "Industry Segment"
    $newProperty = $coreProperties.Create($false)
    $newProperty.Name = $PropertyName
    $newProperty.DisplayName = $PropertyDisplayName
    $newProperty.Type = "string"
    $newProperty.Length = "50"
    $newProperty.IsMultivalued = $true
    $newProperty.TermSet = $termSetIndustrySegment
    # Add the new property
    $coreProperties.Add($newProperty)
    $profileTypeProp = $userProfileTypeProperties.Create($newProperty)
    $profileTypeProp.IsVisibleOnEditor = $true
    $profileTypeProp.IsVisibleOnViewer = $true
    $userProfileTypeProperties.Add($profileTypeProp)
    $profileSubTypeProp = $pspm.Create($profileTypeProp);
    $profileSubTypeProp.IsUserEditable = $true
    $profileSubTypeProp.DefaultPrivacy = $Privacy
    $profileSubTypeProp.AllowPolicyOverride
    $pspm.Add($profileSubTypeProp);
    # Set new Custom Property for "Language"
    $PropertyName = "SLLanguage"
    $PropertyDisplayName = "Language"
    $newProperty = $coreProperties.Create($false)
    $newProperty.Name = $PropertyName
    $newProperty.DisplayName = $PropertyDisplayName
    $newProperty.Type = "string"
    $newProperty.Length = "50"
    $newProperty.IsMultivalued = $true
    $newProperty.TermSet = $termSetLanguage
    # Add the new property
    $coreProperties.Add($newProperty)
    $profileTypeProp = $userProfileTypeProperties.Create($newProperty)
    $profileTypeProp.IsVisibleOnEditor = $true
    $profileTypeProp.IsVisibleOnViewer = $true
    $userProfileTypeProperties.Add($profileTypeProp)
    $profileSubTypeProp = $pspm.Create($profileTypeProp);
    $profileSubTypeProp.IsUserEditable = $true
    $profileSubTypeProp.DefaultPrivacy = $Privacy
    $profileSubTypeProp.AllowPolicyOverride
    $pspm.Add($profileSubTypeProp);
    # Set new Custom Property for "Location"
    $PropertyName = "SLLocation"
    $PropertyDisplayName = "Location"
    $newProperty = $coreProperties.Create($false)
    $newProperty.Name = $PropertyName
    $newProperty.DisplayName = $PropertyDisplayName
    $newProperty.Type = "string"
    $newProperty.Length = "50"
    $newProperty.IsMultivalued = $true
    $newProperty.TermSet = $termSetLocation
    # Add the new property
    $coreProperties.Add($newProperty)
    $profileTypeProp = $userProfileTypeProperties.Create($newProperty)
    $profileTypeProp.IsVisibleOnEditor = $true
    $profileTypeProp.IsVisibleOnViewer = $true
    $userProfileTypeProperties.Add($profileTypeProp)
    $profileSubTypeProp = $pspm.Create($profileTypeProp);
    $profileSubTypeProp.IsUserEditable = $true
    $profileSubTypeProp.DefaultPrivacy = $Privacy
    $profileSubTypeProp.AllowPolicyOverride
    $pspm.Add($profileSubTypeProp);
    # Set new Custom Property for "Organization"
    $PropertyName = "SLOrganization"
    $PropertyDisplayName = "Organization"
    $newProperty = $coreProperties.Create($false)
    $newProperty.Name = $PropertyName
    $newProperty.DisplayName = $PropertyDisplayName
    $newProperty.Type = "string"
    $newProperty.Length = "50"
    $newProperty.IsMultivalued = $true
    $newProperty.TermSet = $termSetOrganization
    # Add the new property
    $coreProperties.Add($newProperty)
    $profileTypeProp = $userProfileTypeProperties.Create($newProperty)
    $profileTypeProp.IsVisibleOnEditor = $true
    $profileTypeProp.IsVisibleOnViewer = $true
    $userProfileTypeProperties.Add($profileTypeProp)
    $profileSubTypeProp = $pspm.Create($profileTypeProp);
    $profileSubTypeProp.IsUserEditable = $true
    $profileSubTypeProp.DefaultPrivacy = $Privacy
    $profileSubTypeProp.AllowPolicyOverride
    $pspm.Add($profileSubTypeProp);
    Write-Host "Completed"
    } else {
    #Termstore not found
    Write-Host "Unable to connect to term store"
    } else {
    Write-Host "Unable to connect to MySite Web Application"
    Need more effort to change this code to work for your requirement.
    Thanks & Regards,
    Emir
    Emir Liu
    TechNet Community Support

  • How to migrate files from different databases to sharepoint 2013?

    Hello everyone,
    I need to migrate files of various formats from two databases to SharePoint 2013 ? How should I pursue? Please explain..
    Scenario : Two different databases on different systems have loads of files. I need to migrate them to SharePoint?
    Any suggestions/ Answers

    Hi,
    You need to copy the database into your network shared folder or SharePoint Server where you wanted to attach this content DB to your newly created web application.
    Hope and Afraid,
    Same Domain has been used. I mean if you move the content db from the server 1 which using the AD1 for authenticate the users,
    So your new server 2 and web application must have configured to authenticate the AD 1 users.Otherwise user not found exception will be thrown. 
    If not  still you can change the site collection administrator for the site which is migrated from the server 1.
    Murugesa Pandian., SharePoint 2010 | MCPD | MCTS |Configure

  • User Profiles properties in SharePoint 2013

    Hello Everyone,
    Can we set User Profiles properties in SharePoint 2013 ? 

    Most of them, yes. What are you specifically looking to do?
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • SharePoint 2013 creating new farm system.formatException ?

    I have SharePoint 2013 and my farm is not working I wanted to create new farm it give error System.formatException
    you can see my question and the image in here also:
    http://sharepoint.stackexchange.com/questions/138926/i-want-to-create-new-server-farm-in-sharepoint-2013-it-give-validation-error 

    Hi,
    According to your description, my understanding is that you failed to create a new farm.
    It seems that several issues exist in IIS. Please go to IIS manager > each site > advanced settings > general > ID to see if it is beyond int32 range or includes non-number value. Besides, please reset IIS and reboot the SQL server.
    Please have a try to create new farm with power shell.
    How to create new farm with power shell in SharePoint 2010:
    https://habaneroconsulting.com/insights/create-a-sharepoint-2010-farm-with-powershell#.VTXDSHkcQ5c
    Several similar posts for your reference:
    https://social.technet.microsoft.com/Forums/en-US/658f6d99-60be-4e1d-b81b-7640eb5545f0/configuration-wizard-error-systemformatexception-was-thrown-input-string-was-not-in-correct?forum=sharepointadminprevious
    https://social.technet.microsoft.com/Forums/en-US/a59993bb-abe0-44e6-89f6-a86f0dbdd23a/systemformatexception-input-string-was-not-in-a-correct-format-exception-when-creating-a-new?forum=sharepointadminprevious
    http://stackoverflow.com/questions/14434926/sharepoint-products-technologies-configuration-wizard-system-formatexception
    Best Regards,
    Dean Wang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • SharePoint 2013 we have edit list option

    Hi Friends,
    In the SharePoint 2013 we have edit list option is there.If we edit the list all the rows will be in edit mode.
    If I edit the list First column data in second column,second column data in third column and so one....
    SharePoint 2013 list edit mode how can I align the data in First column data in first column,Second column data in second column and so one....
    Please can any one help me on same.It is very urgent.
    Thanks,
    Tiru
    tirupal

    Sorry I didn't get you. Please clarify below for my understanding.
    1. Are you referring to Quick Edit in SharePoint 2013 list?
    2.  What alignment --> By default first column will be on first column data. can you post more details on what you would like to accomplish.?
    Here is the something which I understood.
    Bala

  • Migrating from Moss 2007 to SharePoint 2013

    I am reaching out here as we require some inputs around migrating the SharePoint based application from MOSS 2007 to 2013.Please find more details from below
    Requirement:
    Migrating SharePoint site collection (which contains just 1 Top level site and 2 libraries with in it and no item level/library level permissions exists) which is on MOSS 2007 with size of 500GB to SharePoint 2013, hence we like to know your inputs in related
    to this
    Note:
    1) The site collection has its own separate content database
    2) There are nearly 200 thousand documents where the document with higher version is 90
    3) The documents are stored in the libraries with up to third level of folder structure
    4) The site collection is created based on custom site definition (created using visual studio)
    Few things that I like to mention/ask here
    a) Having 500GB data in one single content database inj the MOSS 2007 environment does it impacts the site performance?
    b) Migrating the site collection as is  onto single content database (all 500 GB into one content database) into destination SharePoint 2013, does it will be a good practice? Hope SharePoint 2013 content database limit is 200 GB, hence moving 500GB
    as is into one database will it be good practice?
    c) Does database attach and detach works for the databases which are of size 500GB?
    d) Can we do database attach and detach directly from MOSS 2007 to directly onto SharePoint 2013, without hopping onto SharePoint 2010 in between and then later to SharePoint 2013?
    e) If moving 500GB data into one content database will not be a good approach, can we split it onto multiple databases?
    f) If database attach and detach doesn’t help for databases which are of size 500GB, should we go for any tool based approach? If yes, which tool does best fit?

    a) Having 500GB data in one single content database inj the MOSS 2007 environment does it impacts
    the site performance?
    Inder: Yes, it will impact site performance at large extended, recommended is 200 gb only. Check it IO of your disk to analyze performance issue
    b) Migrating the site collection as is  onto single content database (all 500 GB into one content
    database) into destination SharePoint 2013, does it will be a good practice? Hope SharePoint 2013 content database limit is 200 GB, hence moving 500GB as is into one database will it be good practice?
    Inder: 
    Content database size (all usage scenarios)
    4 TB per content database
    Supported
    Content databases of up to 4 TB are supported when the following requirements are met:
    Disk sub-system performance of 0.25 IOPs per GB. 2 IOPs per GB is recommended for optimal performance.
    You must have developed plans for high availability, disaster recovery, future capacity, and performance testing.
    http://technet.microsoft.com/en-us/library/cc262787%28v=office.15%29.aspx#ContentDB
    c) Does database attach and detach works for the databases which are of size 500GB?
    Inder: Yes it does work
    d) Can we do database attach and detach directly from MOSS 2007 to directly onto SharePoint 2013, without
    hopping onto SharePoint 2010 in between and then later to SharePoint 2013?
    Inder: No, you need to pass through 2010 and then 2013
    e) If moving 500GB data into one content database will not be a good approach, can we split it onto
    multiple databases?
    Inder: you can go with 500 gb
    f) If database attach and detach doesn’t help for databases which are of size 500GB, should we go for
    any tool based approach? If yes, which tool does best fit
    Inder: Below are few tools you can try
    http://www.metalogix.com/Products/Content-Matrix.aspx
    http://en.share-gate.com/
    http://www.avepoint.com/sharepoint-migration-tools/
    http://www.quest.com/sharepoint/migration.aspx
    If this helped you resolve your issue, please mark it Answered

  • How to retrieve full flash solution from WSP if not than how to retrieve ascx files from Template folder in SharePoint 2013 ?

    How to retrieve ascx file from the Template folder in SharePoint2013
    My issue is, I have WSP only so I changed into zip and got my all web parts and also one dll file after that decrypted dll and got some C# code
    mixing with some system generated code but not ascx file that is for front-end part. So my question is how we can retrieve full flash solution if not, at least ascx files So if we were on SharePoint 2010 we could have got those file from __Template__
    folder but It’s on SharePoint 2013 and not able to get ascx.
    If we can do so, than will be easy to get the task to be done
    Suggestions would highly be appreciated. Thanks in Advance.
    Ashish

    Hi Amit,
    you can not move specific changes from Dev to production.
    but you can follow this process to make your workflow as it is as in Dev:
    Create a new workflow on the new list in Product.
    Create at least one step, one condition and one action in this workflow.
    1. In Dev server open your .xomal file as XML and copy the entire contents.
    2.In Production server Open your .xoml file as XML and Paste the entire contents
    3. repeat this operation for the xoml.rules file
    4.Double click the .xoml file for the new workflow to open the workflow in the Workflow Designer and click Check Workflow to verify no errors and then click Finish to ensure the workflow is saved.
    Whenever you need to make changes apply the same.
    Please Mark Answer and Vote me if it will to resolve your issue

  • Retrieve data from a list in SharePoint 2013 provider hosted App using CSOM

    I have developed a provider hosted app in SharePoint 2013. As you already know, Visual Studio creates web application and SharePoint app. The web application gets hosted inside IIS and the SharePoint App in SharePoint site collection. I'm trying to get
    data from a list hosted in SharePoint using CSOM. But I get ran insecure content error. 
    here is my code in Default.aspx
        <script type="text/javascript" src="../Scripts/jquery-1.8.2.js"></script>
        <script type="text/javascript" src="../Scripts/MicrosoftAjax.js"></script>
        <script type="text/javascript" src="../Scripts/SP.Core.js"></script>
        <script type="text/javascript" src="../Scripts/INIT.JS"></script>
        <script type="text/javascript" src="../Scripts/SP.Runtime.js"></script>
        <script type="text/javascript" src="../Scripts/SP.js"></script>
        <script type="text/javascript" src="../Scripts/SP.RequestExecutor.js"></script>
        <script type="text/javascript" src="../Scripts/App.js"></script>
        <html xmlns="http://www.w3.org/1999/xhtml">
        <head runat="server">
            <title></title>
        </head>
        <body>
            <form id="form1" runat="server">
            <div>
                <input id="Button1" type="button" value="Get title via CSOM" onclick="execCSOMTitleRequest()" /> <br />
                <input id="Button2" type="button" value="Get Lists via CSOM" onclick="execCSOMListRequest()" />
            </div>
                <p ID="lblResultTitle"></p><br />
                <p ID="lblResultLists"></p>
            </form>
        </body>
        </html>
    and App.js is:
        var hostwebUrl;
        var appwebUrl;
        // Load the required SharePoint libraries
        $(document).ready(function () {
            //Get the URI decoded URLs.
            hostwebUrl =
                decodeURIComponent(
                    getQueryStringParameter("SPHostUrl")
            appwebUrl =
                decodeURIComponent(
                    getQueryStringParameter("SPAppWebUrl")
            // resources are in URLs in the form:
            // web_url/_layouts/15/resource
            var scriptbase = hostwebUrl + "/_layouts/15/";
            // Load the js files and continue to the successHandler
            //$.getScript(scriptbase + "/MicrosoftAjax.js",
            //   function () {
            //       $.getScript(scriptbase + "SP.Core.js",
            //           function () {
            //               $.getScript(scriptbase + "INIT.JS",
            //                   function () {
            //                       $.getScript(scriptbase + "SP.Runtime.js",
            //                           function () {
            //                               $.getScript(scriptbase + "SP.js",
            //                                   function () { $.getScript(scriptbase + "SP.RequestExecutor.js", execCrossDomainRequest); }
        function execCrossDomainRequest() {
            alert("scripts loaded");
        function getQueryStringParameter(paramToRetrieve) {
            var params = document.URL.split("?")[1].split("&");
            var strParams = "";
            for (var i = 0; i < params.length; i = i + 1) {
                var singleParam = params[i].split("=");
                if (singleParam[0] == paramToRetrieve)
                    return singleParam[1];
        function execCSOMTitleRequest() {
            var context;
            var factory;
            var appContextSite;
            var collList;
            //Get the client context of the AppWebUrl
            context = new SP.ClientContext(appwebUrl);
            //Get the ProxyWebRequestExecutorFactory
            factory = new SP.ProxyWebRequestExecutorFactory(appwebUrl);
            //Assign the factory to the client context.
            context.set_webRequestExecutorFactory(factory);
            //Get the app context of the Host Web using the client context of the Application.
            appContextSite = new SP.AppContextSite(context, hostwebUrl);
            //Get the Web
            this.web = context.get_web();
            //Load Web.
            context.load(this.web);
            context.executeQueryAsync(
                Function.createDelegate(this, successTitleHandlerCSOM),
                Function.createDelegate(this, errorTitleHandlerCSOM)
            //success Title
            function successTitleHandlerCSOM(data) {
                $('#lblResultTitle').html("<b>Via CSOM the title is:</b> " + this.web.get_title());
            //Error Title
            function errorTitleHandlerCSOM(data, errorCode, errorMessage) {
                $('#lblResultLists').html("Could not complete CSOM call: " + errorMessage);
        function execCSOMListRequest() {
            var context;
            var factory;
            var appContextSite;
            var collList;
            //Get the client context of the AppWebUrl
            context = new SP.ClientContext(appwebUrl);
            //Get the ProxyWebRequestExecutorFactory
            factory = new SP.ProxyWebRequestExecutorFactory(appwebUrl);
            //Assign the factory to the client context.
            context.set_webRequestExecutorFactory(factory);
            //Get the app context of the Host Web using the client context of the Application.
            appContextSite = new SP.AppContextSite(context, hostwebUrl);
            //Get the Web
            this.web = context.get_web();
            // Get the Web lists.
            collList = this.web.get_lists();
            //Load Lists.
            context.load(collList);
            context.executeQueryAsync(
                Function.createDelegate(this, successListHandlerCSOM),
                Function.createDelegate(this, errorListHandlerCSOM)
            //Success Lists
            function successListHandlerCSOM() {
                var listEnumerator = collList.getEnumerator();
                $('#lblResultLists').html("<b>Via CSOM the lists are:</b><br/>");
                while (listEnumerator.moveNext()) {
                    var oList = listEnumerator.get_current();
                    $('#lblResultLists').append(oList.get_title() + " (" + oList.get_itemCount() + ")<br/>");
            //Error Lists
            function errorListHandlerCSOM(data, errorCode, errorMessage) {
                $('#lblResultLists').html("Could not complete CSOM Call: " + errorMessage);
    Any solution is appreciated.

    Hi,
    To retrieve data from list in your provider-hosted app using SharePoint Client Object Model(CSOM), you can follow the links below for a quick start:
    http://msdn.microsoft.com/en-us/library/office/fp142381(v=office.15).aspx
    http://blogs.msdn.com/b/steve_fox/archive/2013/02/22/building-your-first-provider-hosted-app-for-sharepoint-part-2.aspx
    Best regards
    Patrick Liang
    TechNet Community Support

  • Adding a app from app store in SharePoint 2013

    I have configured  an app domain and i can add apps from app store to my SharePoint 2013 site,issue is that app is not loading on my site and showing blank space instead  .I tried to open app url but its showing blank without prompting any error
    in IE ,what can be the issue?
    Update:In firefox its showing an error  "no element found"  for the app url.How do I verify if the app is added correctly?

    Hi,
    According to your post, my understanding is that the store app cannot be displayed in the site.
    I recommend to make sure you have the permission to use the app.
    You can also add the other apps to check whether it works.
    In addition, please create a new web application without Host Headers.
    Here is a similar thread for your reference:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/8bbbb578-81d0-4660-952e-22acd2fe21da/sharepoint-apps-store-page-not-found?forum=sharepointgeneral
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • After Migrating from Sharpoint 2010 to Sharepoint 2013 list filter options changed

    Hi All,
    After migrating from SP 2010 to SP2013 i found list View filter option is changed and filter is not working Pls help its really urgent.... you can check field 1 and field 2 in following screen shot.
    Prasad kambar

    Hi  ,
    According to your description, my understanding is that your list filter cannot work after Migrating from SharePoint 2010 to SharePoint 2013.
    For your issue, please check your log files for any issues. Also you can refer to the blogs for troubleshooting SharePoint 2013 migration:
     Firstly try running Test-SPContentDatabase on your source database for any issues -
    Test-SPContentDatabase - http://technet.microsoft.com/en-us/library/ff607941.aspx
    Troubleshoot site collection upgrade issues in SharePoint 2013 http://technet.microsoft.com/en-us/library/jj219648.aspx
    Verify database upgrades in SharePoint 2013 -http://technet.microsoft.com/en-us/library/cc424972.aspx
    And please have a look at your custom solution on your site.
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Export Records from CRM 2011 to Sharepoint 2013

    We currently have CRM 2011 and are about to install Sharepoint 2013.
    We are wondering is it possible to export records from Entities in CRM 2011 to a folder in Sharepoint 2013?
    If this is possible can it be automated to run on a schedule?
    Any help on this is greatly appreciated.
    Thanks.

    You can use a custom timer job in SharePoint 2013 to be scheduled to run. This job could interact with your CRM system to import the entities to a folder or List in SharePoint. Andrew has a link here:
    http://www.andrewconnell.com/Creating-Custom-SharePoint-Timer-Jobs
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • Get/retreive managed metadata column value from Document Library using SharePoint 2013 JSOM

    Hi,
    I am trying to retrieve managed metadata column (NewsCategory) value in SharePoint 2013 Document library using JSOM.
    I get "Object Object" rather than actual value.
    I tried:-
    var newsCat = item.get_item('NewsCategory');
    alert(newsCat) //Displays [Object Object]
    var newsCatLabel = newsCat.get_label();
    var newsCatId = newsCat.get_termGuid();
    But, I get the error "Object doesn't support property or method get_label()"
    I also tried :-
    var newsTags = item.get_item(' NewsCategory ');
    for (var i = 0; i < newsTags.get_count() ; i++) {
    var newsTag = newsTags.getItemAtIndex(i);
    var newsTagLabel = newsTag.get_label();
    var newsTagId = newsTag.get_termGuid();
    Even now I get the error "Object doesn't support property or method get_count()"
    I have included " NewsCategory " in the load request:- context.load(items, 'Include(File, NewsCategory)');
    Any idea what the issue is? Do I have to add any *.js file using $.getScript?
    I added following .js files
    var scriptbase = _spPageContextInfo.webServerRelativeUrl + "/_layouts/15/";
    $.getScript(scriptbase + "SP.Runtime.js", function () {
    $.getScript(scriptbase + "SP.js", function () {
    $.getScript(scriptbase + "SP.Core.js", function () {
    Thanks in Advance,

    Hi Patrick,
    I already added those references. I just pasted the parts of script snippet in my initial post. To avoid confusion I am pasting here complete script.
    2.1.1.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    var scriptbase = _spPageContextInfo.webServerRelativeUrl + "/_layouts/15/";
    $.getScript(scriptbase + "SP.Runtime.js", function () {
    $.getScript(scriptbase + "SP.js", function () {
    $.getScript(scriptbase + "SP.Core.js", function () {
    function getdata() {
    var context = new SP.ClientContext.get_current();
    var web = context.get_web();
    var list = web.get_lists().getByTitle('Documents');
    var camlQuery = new SP.CamlQuery();
    var filterCategory = 'Solutions';
    var IDfromTaxonomyHiddenList = 15;
    camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef LookupId="TRUE" Name="'+filterCategory+'" /><Value Type="ID">' + IDfromTaxonomyHiddenList +'</Value></Eq></Where></Query></View>');
    /*the above CAML query successfully gets all the list items matching the criteria including "NewsCategory" managed metadata column values
    But when I try to display the value it retrieved it ouputs/emits Object Object rather than actual values */
    var items = list.getItems(camlQuery);
    context.load(items, 'Include(File,NewsCategory)');
    context.executeQueryAsync(
    Function.createDelegate(this, function (sender, args) {
    if (items.get_count() > 0) {
    var listItemEnumerator = items.getEnumerator();
    while (listItemEnumerator.moveNext()) {
    var oListItem = listItemEnumerator.get_current();
    var file = oListItem.get_file();
    var name = file.get_name();
    var newsCat = oListItem.get_item('NewsCategory'); alert(newsTags.constructor.getName());
    alert(newsCat) //Displays [Object Object]
    var newsCatLabel = newsCat.get_label(); // Here it errors out with message "Object doesn't support property or method get_label()"
    var newsCatId = newsCat.get_termGuid();
    } //end while
    }//end if
    Function.createDelegate(this, function (sender, args) {
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    ExecuteOrDelayUntilScriptLoaded(getdata, "SP.Core.js");
    </script>
    In the above script "var name = file.get_name(); " gets the exact file name.
    But the line "var newsCat = item.get_item('NewsCategory');
           alert(newsCat) //Displays [Object Object]  rather than actual value.
    Issue resolved replace "oListItem.get_item('NewsCategory');" with oListItem.get_item('NewsCategory').get_label();"
    Thanks

  • Configure High Availability in SharePoint 2013 having Single Farm

    Hi All,
    we are having 2 SharePoint server having single farm and two databases in cluster.
    we need to Configure HA and NLB between these 2 SharePoint Servers.
    Please Help..!!

    If the database servers are in a cluster then all you need to do is configure Load balancing for the SharePoint servers.  Review this site for more information:
    http://technet.microsoft.com/en-us/library/cc748824.aspx 
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Installation of SharePoint 2013 three-tier farm installation

    Is it an actual requirement that WFE1 and APP1 be separate servers (virtual or physical), or is recommended best practice?
    And more than that, I was going to make DC1, WFE1, and APP1 all reside on the same virtual server.  I'll take the spitballs, but again the question is:  does this violate a software/hardware system requirement as well as recommended best practice,
    or just the latter?
    Thanks.

    For SharePoint 2013, it is
    not supported to install SharePoint on a DC. While you can also place all VMs on a single virtual server host, you do need to take into consideration that you're putting all of your eggs in a single basket. If that host fails, so does everything with it.
    Consider clustering your virtual hosts with shared storage to at least provide failover capabilities.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Maybe you are looking for

  • How do I move firefox from one hard drive to another with all of its preferences with it ( bookmarks, Facebooks, Menu bar, ect. )?

    I put in a bigger hard drive and want to move fire fox to the new drive. Both drives are now in the computer. The computer is a Mac Pro (early one ).

  • Problem in loading Context.xml file

    Hi, I just tried to create datasource from context.xml. i did the following steps 1. i added context.xml file in webapps/META-INF/ 2. I added the below values to that xml file. <?xml version="1.0" encoding="UTF-8"?> <Context antiJARLocking="true" pat

  • Finding my Custom Away Message

    I've searched through the posts already on here, and they don't lead me to where I need to be. I'm looking to switch computers as I graduate, and want to take my (quite extensive) collection of custom away messages from iChat 3.1.4. I've looked in Ho

  • Keytouch doesn't map keys properly

    Hello, I've a Logitech Desktop Wave Keyboard (Cordless) and I tried configuring the special keys via keytouch, but it doesn't seem to work. I always get this error: keytouch-init: Failed to set keycode: keycode 142 to scancode 8450 (0x2102) keytouch-

  • ICal publication on IIS Website with SSL

    Hi, Can i publish iCal calendars on IIS Webdav directory with SSL configuration on an other port than default 443 ??? I try to publish on this server and this work for: - "http" site - "https" site with ssl port 443 but no with "https" site with ssl