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

Is there a way to call the REST APIs for my lists inside my Content Search WebPart Display Template

$
0
0

I am working on a content search web-part inside my SharePoint Enterprise server 2013.

Now i have the following general overview of my current sites and lists which i am trying to query inside my web part:-

  • Inside the Root site i have a list named Dept . SiteURL=http://servername/
  • Inside another sub-site I have a list named Module which have a lookup field (DeptID) referencing the Dept list. SiteURL=http://servername/Modules/
  • Now for each module item (inside the Module list) we have a sub-site representing this module item. the sub-site url will contain the module item ID, as follow;http://servername/Modules/1 (representing module item id 1),http://servername/Modules/2 , etc..
  • Inside each Module sub-site we have a Tracking list.

Now i have added a Content Search WebPart inside my Dept list display form; To show all the Tracking items which are related to the current Dept Item (the dept item which is being rendered inside the display form).

So inside the content search web-part i am trying to do the following:-

  1. By default, when users click on a certain Department item, they will be redirected to its display form. and the department ID will be inside the URL such as `DispForm.aspx?ID=16`..
  2. Now using the REST API i can query all the Modules items inside the Module List, which have thier DeptID (lookup column) = the current DeptID (for example 16).
  3. So in this way i will have a list of all the module items' IDs which are related to the current Dept.
  4. Then i can inside my content search web part's display template (which will mainly show all the tracking items from all the module sub-sites) to specify to only show the Tracking items which are inside a sub-site and this sub-site have its url = one of the related module IDs...

Now i am not sure how i can achieve these four steps inside my display templates?

Thanks



How to create an Event Receiver that can act if ANY of the list has an item added/edited/deleted anywhere in the web application (or even site-collection)?

$
0
0

Hi there

How to create an Event Receiver that can act if ANY of the list has an item added/edited/deleted anywhere in the web application (or even site-collection)?

Thanks.


List View Threshold error for Update Item in Workflow

$
0
0
I'm trying to update an item in a very large archived list(200,000 items)say List B on status change on List A. I'm using Create new Item and Update same item based on a look up value. I have to copy 70 columns from List A to List B. Create New item allows to create 55 columns one at a time so i'm using update action to update rest 15 cols. Update is failing with the error message that this action is prohibited because of list threshold. The column i'm using for look up is indexed and I'm using app step also. This was working fine but started failing unexpectedly since afternoon.

how to split string type field value in sharepoint list item using jquery

$
0
0

Hi Team,

I have a fairly simple issue. I have created a script editor web part and uploaded the below code to retrieve and display the SharePoint list item. I am getting the value "undefined" when i try to retrieve the look up column value in SP list which holds set of strings. (tex1 ; text2; text3). How to achieve this?

<script type="text/javascript" src="filelink/jquery-1.4.2.min.js"></script>

//to download SPServices click here<script type="text/javascript" src="filelink/jquery.SPServices-0.5.4.min.js"></script><script language="javascript" type="text/javascript"> $(document).ready(function() { $().SPServices({ operation: "GetListItems", async: false, listName: "Announcements", CAMLViewFields: "<ViewFields><FieldRef Name='LookupColumn' /></ViewFields>", completefunc: function (xData, Status) { $(xData.responseXML).find("[nodeName='z:row']").each(function() { var liHtml = "<li>" + $(this).attr("ows_LookupColumn") + "</li>";

alert(liHtml);

$("#tasksUL").append(liHtml); }); } }); });</script><ul id="tasksUL"/>

 Thanks in advance.


Error with Taxonomy:TaxonomyWebTaggingControl on Chrome

$
0
0

My page has a taxonomy web control on my custom web part

the markup is

<Taxonomy:TaxonomyWebTaggingControl runat="server" ID="txtTaxonomy" Visible="true" IsDisplayPickerButton="true"
                IsMulti="true"
                AllowFillIn="true"
                IsAddTerms="false"
                IsIncludePathData="false"></Taxonomy:TaxonomyWebTaggingControl>

whenever the page load on chrome, a JS alert will always be shown with message "There was an error processing the request". when i open developer mode and view the console i saw the error shown in the image

This issue does not happen on IE or firefox. the custom web part is written with aspx and C#. Sharepoint Server is 2013

Taxonomy control is registered with

<%@ Register TagPrefix="Taxonomy" Namespace="Microsoft.SharePoint.Taxonomy" Assembly="Microsoft.SharePoint.Taxonomy, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

Accessing Context object in ASMX service in Provider hosted app

$
0
0

Hi,

I am developing SharePoint online hosted app. Almost all my logic and SP objects manipulation is in the c# codebehind(not JS), but now i need to call my already implemented method from js. I created .asmx and called it via jquery AJAX. The service is hit with all needed parameters, but i cannot create the ClientContext object so i can actually run the method i need. What should i do to have the context created?

Thanks,

Sudheer


SharePoint Complex form and workflow

$
0
0

Hi,

I have developed a few massive and complex forms in SharePoint but the load performance was not really happy.

It took a few minutes to load the form even if I use powerful form (ninetex, bpc powerform) or InfoPath.

I have about 450 fields in my form and probably because of these fields it will take some times to load.

Appreciate anyone can advise the correct way for such this development.

Thanks

fifie2610@yahoo.com

Sharepoint Online Saving Issues

$
0
0

Hello,

I have an issue in saving a large files in SharePoint online.

I have tried it many times and it keep giving us an error message as below.

suggest please for resolution.


Regards, Rangnath Mali. MCP



Use Subsite as Homepage (default landing page)

$
0
0

Hello,

actually I'm pretty sure that this question was answered already, I still can't find a solution, because other threads solutions won't work for me so far.

How can I achieve that a subsite will be the default landing page?

So for example if a user opens "mysharepoint.domain.com" i wan't them to get "mysharepoint.domain.com/news/default.aspx" which is a subsite of the site collection.

I can't change the welcome page in site settings, since I get an error saying that the welcome page must be part of the current site. When I use the button in the ribbon to mark it as homepage users still don't get redirected to the site when they point to "mysharepoint.domain.com".

Is there any solution?

Sharepoint 2013 BCS | Association between SharePoint List and external content type

$
0
0

I have a requirement to build a relation between list and external content type

E.g.

List Name = Person and have following columns

Person ID

Name

External content type:

1) Create external content type from WCF service with following fields

Person ID

Salary

Now I want to create association between list and external content type on basis of person ID and salary would be auto populated in the list

List items are

1 VD

2 BC

3 GH

External content type is returning following

1 500

2 599

3 548

In the list salary would be auto populate like this.

1 VD 500

2 BC 599

3 GH 548

Please advise if it is feasible.

How to retrieve & populate: Logged User's Email & Phone ?

$
0
0

Hello Forum

In my Office 365 (SharePoint Online) I have a very simple Custom List which consists of a bunch of columns/fields, and I have a requirement that when a user clicks on: Add New Item, The logged user's name or email address will be populated into a PeoplePicker field (EmployeeName), and the logged user's phone number will be populated into another SingleLineText field called (EmployeePhone). Other fields will be filled manually by the user.

How can I accomplish this? Could you please share with me some code/scripts?

For getting the user\s email address and populating it into a PeoplePicker field (EmployeeName) I have used the script below. But, I am not happy with it as it only works with IE, But, NOT other browsers.

<script type="text/javascript" src="/jquery-1.12.0.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            ExecuteOrDelayUntilScriptLoaded(setLoginName, "clientpeoplepicker.js");
        });

        function setLoginName() {
            var loginName = _spPageContextInfo.userLoginName;
            var peoplePickerDiv = $("[id$='ClientPeoplePicker'][title='EmployeeName']");
            var peoplePickerEditor = peoplePickerDiv.find("[title='EmployeeName']");
            var spPeoplePicker = SPClientPeoplePicker.SPClientPeoplePickerDict[peoplePickerDiv[0].id];
            peoplePickerEditor.val(loginName);
            spPeoplePicker.AddUnresolvedUserFromEditor(true);
        }
     </script>


I would really appreciate if you could help me to get these two values from user's profile, Delve, or anywhere as long as the code is something I can put inside a Script Editor web part.

Thank you very much.

    

SharePoint Online branding

$
0
0

Hi All,  I am tasked to brand SharePoint Online site. Well, I have a little exposure to SharePoint branding. These are the primary requirements:

  • Using the company’s colors and not SharePoint colors.
  • Master page should be more vibrant and should have carousel or some sliding image gallery.
  • Navigation should be simple.
  • Page layouts should have some similar color code as master page but simpler with company information, history etc.
  • [Optional] Responsive Site.   

I have seen a content and videos:

Q: CanI use Design Manager and make own custom master pages / Master pages on SharePoint Online??

Q:  Q: What other tools I can use to brand SharePoint Online? 

Q: Any free template that I can use? I tried 
Avicia but it did not work as master pages were not with custom master pages. 

Q: Any good third party that I can use?? 
http://bindtuning.com/cms/sharepoint/office-365-v2013/ 
Any affordable that is available in market?  

Any help would be highly appreciated!! 

Thank you. 


Sandy


How to use Search Box web part to search of list only.

$
0
0

Hi

I have a page that content of some web part. 

in this page I have a Contacts list web part. I want to be able to search an Item for example Family column from this list.

what am i do?

I was add a search box web part but it was search from all of item in all sites!!how can set it only search from this list

Date lag computations in SharePoint 2013 calendar

$
0
0

Hello,

I've just added a SharePoint 2013 Calendar application to a web page and a few events to the calendar, which I will call here "Pro-Format Release 3" and "Actual Release 3" respectively. Both events last several days and overlap slightly. For instance, PFR3 begins, say, on January 1st 2017 and ends on January 31st, 2017, whereas AR3 begins on January 5th, 2017 and ends on February 5th, 2017.

I would like to programmatically display a third event in the calendar which would graphically display the lag between PFR3 and AR3. I can't use .Net/C#, PowerShell or jQuery for development because of corporate security constraints.

I have thought of manually creating a third event and computing the lag between the other events within a calculated field, but have given up because calculated fields seem too "primitive" for my purposes.

Any suggestions as to how I could do the above, given my constraints?

Many thanks.

Sharepoint 2013 Apps

$
0
0

Hello,

I am very new to sharepoint, i have created sharepoint hosted app and tried to add it on to page from app catalog. The app has been added successfully but unable to see the functionality. App has been built using JSOM. On the contentplace holder of the app instead of app functionality it's displaying Your contetnt goes here..



Workflow 2013 - passing array argument

$
0
0

Hi,

I got this simple workflow with composite task that looks like this:

As you can seen nothing fancy. For this workflow I also got a custom initiation form with a simple text box for entering account names. But apparently this is not how you should pass that argument:

wfParams['assignedTo'] = strInputValue.split(";");

I keep getting error when trying to start workflow:

An error occured when starting workflow. Type 'System.Object[]' with data contract name 'ArrayOfanyType:http://schemas.microsoft.com/2003/10/Serialization/Arrays' is not expected.

Is there any other way to pass arrays to workflow?

How to use SP.Change object in CSOM?

$
0
0
I need to access audit information from sharepoint 2013 site from client side code. In server side we have SPAuditQuery and SPAudit class for this purpose.

 I could not find any api from client side which could fetch the audit information from content database.

I found SP.Change api in client side, however there is not much documentation on it as how to use and what it returns ?

Please suggest on the same.

Thanks in advance
Kunal Valecha

Kunal Valecha

Accessing Audit Logs using CSOM in Sharepoint 2013

$
0
0

Hi,

Is there a possible solution to access the Audit Log data via CSOM . I do not want to query for the data directly in the database using the Server side Model.

Do let me know if you know of a solution.

Regards,

Vinay Shetty

List Definition

$
0
0

Hi,

I created some List Definitions and I see they are deployed correctly by Visual Studio.

The List Instances with those custom List definitions are also being created on deployment.

The List Definitions, content types, site columns are all deployed to SharePoint and I'm able to create new Lists Instances programmatically and and also from sitemanager.aspx (mysite/_layouts/15/sitemanager.aspx).

Although, when I'm on "site contents" page (mysite/_layouts/15/viewlsts.aspx) and I hit "Add an App", I don´t see my custom lists definitions to create new instances from them.

What  can be happening?

Is there any configuration that prevents my custom list definitions from appearing on "Add an App"?

Thank you sou much,

JD

Clear Field when User remove from Client Side People Picker

$
0
0

Hi,

I have place client side people picker and some field. When user enter user in people picker on its focus lost i get / filled field based on people picker value.

Want i want when user delete user from people picker so that all fields also get refresh / blank. pls guide how to achieve that.

secondly how to restrict people picker to just allow only one user.

Thanks.


iffi

Viewing all 25064 articles
Browse latest View live


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