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

Resolve user for people picker field

$
0
0

Hi,

Recently i have tried following format of people picker to add user in list field type people picker using CSOM and it is working without using Web.Ensure() method.

Format : "-1;#useremail"

I would like to know how SharePoint resolve user for above format and what exactly  -1 is doing in the beginning. 

Thanks is advance.

 


See all documents into collection site

$
0
0

Hi;

I search a solution to see or display or export all documents into SP collection site ?

Regards

dowload multiple documents and folders

$
0
0

Hi;

Search a solution to dowload multiple documents at once (from for example of zip file) ?

Regards

Read data from SP list via JavaScript or JQuery?

$
0
0

I've tried some of the examples I've found on various blogs, but none seem to work reading the comments or when I try them.

Looking to read data from a list, and display in a grid or textbox.

Convert script powershel to c#

$
0
0

Hello

 I have convert the script powershell to c# code:

$web = Get-SPWeb "https://intranet.oursite.com/"
$list =$web.GetList("/sites/test/Lists/Order")
$view = $list.Views["ScriptTest"]
$exportlist = $null
$exportlist = @()
$items = $list.GetItems($view) | Group-Object Title

$items | select @{name="Title"; expression={$_.name}}, @{name="Quantity"; expression={($_.Group | select @{name="q"; expression={$_['ItemQuantity']}}  | measure q -sum).sum }}

Thanks


Same JavaScript two time

$
0
0

In SharePoint 2010, I used https://jqueryui.com/tabs/ with CEWP for tabs. It's work and fine. But When I use same thing in 2nd CEWP (another tab line) , It doesn't work. Seem like if you use same JavaScript two time with one page.. Both are not working.. Any Idea?

best Regards

Lasantha

SP2010 - Workflow Transaction Timeout Error

$
0
0

hi there,

I know this has been analyzed in various blogs and forums, but I still haven't found any valid solution for this. Let me get more specific: Very often (at least 9-10 times day) we are getting workflows terminated, due to the following error in the logs:

OWSTIMER.EXE (0x14E8): Error in persisting workflow: System.Transactions.TransactionAbortedException:The transaction has aborted. ---> System.TimeoutException: Transaction Timeout

We have increased event throttling and transaction timeout in our web application, and the error doesn't occur when the process that is running the workflow is IIS. However, after a delay activity,when the workflow is picked up by the timer service of our application server(you will notice that the source process of the error is ALWAYS the timer job/owstimer.exe) , our workflows very frequently crash with the above error. I think it's not coincidence that the error happens aboutone minute after it gets picked upby the timer job, which probably means that we should increase the transaction timeouts for the timer process also (the default is one minute so 99% this is the source of our problem).

As I wrote above, I have already increased the <system.transactions>entry in the web config of our web app, but this setting seems to be ignored by the timer process of our app server. I also tried to add it in the owstimer.exe.config file to no avail. So the real question is:How can the system.transaction timeout value be changed so that it affects the workflow timer job of the sharepoint timer service (owstimer.exe)?

Any help would be highly appreciated because this has turned to be a really annoying problem for our users in the production farm - imagine having to restart ~10 workflows during the work day.

Thanks,

Spyros


Trouble switching between two asp Panels in a webpart

$
0
0

Here is the functionality I need:

- programmatically create a Sharepoint webpart (not visual webpart) that contains two screens.  The user first sees the first screen.  When the user clicks Next, the first screen goes and the second screen shows up.

I have the following code below but it doesn't work.  First, for some reason two labels that say "Second screen" show up instead of just one.  Second, both the label for the first screen and the label for the second screen are visible when the page loads even those the second panel's visibility is set to false.  And third, when I click Next, nothing happens.  Any idea why?  Thanks.

 protected override void CreateChildControls()
        {
            pnlUserAccount = new Panel();
            pnlUserAccount.Visible = true;
            lblUserAccount = new Label();
            lblUserAccount.Text = "First screen.";
            pnlUserAccount.Controls.Add(lblUserAccount);

            pnlPermissions = new Panel();
            pnlPermissions.Visible = false;
            lblPermissions = new Label();
            lblPermissions.Text = "Second screen.";
            pnlPermissions.Controls.Add(lblPermissions);
           
            btnCreateAccount = new Button();
            btnCreateAccount.Text = "Next";
            btnCreateAccount.CausesValidation = true;
            btnCreateAccount.Click += new System.EventHandler(btnCreateAccount_Click);
            btnCreateAccount.UseSubmitBehavior = false;
            pnlUserAccount.Controls.Add(btnCreateAccount);

            Controls.Add(pnlPermissions);
            Controls.Add(pnlUserAccount);

        }

        private void btnCreateAccount_Click(object sender, EventArgs e)
        {
            pnlUserAccount.Visible = false;
            pnlPermissions.Visible = true;
        }

 protected override void Render(HtmlTextWriter writer)
        {
            EnsureChildControls();

            AddAttributesToRender(writer);

            pnlUserAccount.RenderControl(writer);
            lblUserAccount.RenderControl(writer);
            pnlUserAccount.Visible = true;

            pnlPermissions.RenderControl(writer);
            lblPermissions.RenderControl(writer);
            pnlPermissions.Visible = false;

            writer.AddStyleAttribute("margin-right:20px; width", "120px");
            btnCreateAccount.RenderControl(writer);
        }


Get SELECTED items from an external list (BCS) using the javascript client object model

$
0
0

I thought this would be simple, but I am stumped by the object model at this point. here is my situiation.

I would like to return the value of a particular column called 'Prokey' from an external list.

Now , getting selected items is easy enough using:

SP.ListOperation.Selection.getSelectedItems(context); 

but this only returns IDs. in the case of external lists, the BdcIdentity column value.

getting the column values is also pretty easy with this bit of code:

var queryFields = '<ViewFields><FieldRef Name="Prokey" /><FieldRef Name="BdcIdentity" /></ViewFields>';
var camlQuery = new SP.CamlQuery();
camlQuery.set_viewXml(queryFields);
wwlistItems= mylist.getItems(camlQuery);
context.load(wwlistItems,'Include(Prokey,BdcIdentity)');
context.executeQueryAsync(ReadListItemSucceeded, ReadListItemFailed);

but this code returns THE ENTIRE LIST, not just selected items. I have tried to combine the two (creating a CAML query with a Where clause for each selected item's BdcIdentity value, but I get no results from the query

Pass An Additional Variable to an Event Hendler

$
0
0

I have a need to write to SharePoint that uses FedAuth Client authentication. I use the following to setup the handler:

Dim clientContextLoad As ClientContext = New ClientContext(MY_SITE)
AddHandler clientContextLoad.ExecutingWebRequest, AddressOf spAuth.ClientContext_ExecutingWebRequestLoad
clientContextLoad.Credentials = CredentialCache.DefaultCredentials

The handler code is:

 public void ClientContext_ExecutingWebRequestLoad(object sender, Microsoft.SharePoint.Client.WebRequestEventArgs e)
{
    CookieContainer cc = new CookieContainer();

    foreach (var c in SharepointTrustCookies)
         cc.Add(c);
    e.WebRequestExecutor.WebRequest.UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)";
    e.WebRequestExecutor.WebRequest.CookieContainer = cc;
    e.WebRequestExecutor.WebRequest.Method = "PUT";
    e.WebRequestExecutor.WebRequest.Accept = "*/*";
    e.WebRequestExecutor.WebRequest.ContentType = "multipart/form-data; charset=utf-8";
    e.WebRequestExecutor.WebRequest.AllowAutoRedirect = false;
    e.WebRequestExecutor.WebRequest.Headers.Add("Accept-Language", "en-us");
    e.WebRequestExecutor.WebRequest.Headers.Add("Translate", "F");
    e.WebRequestExecutor.WebRequest.Headers.Add("Cache-Control", "no-cache");
    //e.WebRequestExecutor.WebRequest.ContentLength = line.Length;

}

I use the following to call the handler:

Microsoft.SharePoint.Client.File.SaveBinaryDirect(clientContextLoad, filename, stream, True)

I need to pass the "line" into the clientcontextload.ExecutingWebRequest event so I can determine the line.length for the ContentLength.


Custom authentication web part that includes FBA and AD - with a custom link - redirecting user to the home page

$
0
0

Good afternoon,

So I developed a web part years back that has both FBA and AD windows auth inside. I am trying to use a custom link on the site for users to go to the custom login form. The authentication works; however, the redirect or inclusion of the source is not being added to the URL and I am not sure what I am missing; other than I am trying to not use the                             <wssuc:Welcome id="explitLogout" runat="server"/>  but my own link. It is probably something dumb that I am missing - any suggestions to point me in the right direction? (FYI: It is working on our production site, but am redoing our site so ...)

Thanks!

KZ


Part II:  I also see this   i:0#.f|fbadatabase   or i:0#.w|  before the user name which some how I got rid of that as well on the current site - and just do not remember how!

track Version->restore event

$
0
0

When file version is restored to earlier one for file by Version History->restore command, ItemUpdating event gets called. Can we know if call is due to Version ->restore command?

Thanks in advance.


shwetank

Restore SharePoint list backup with custom name

$
0
0

Hi All,

I have taken SharePoint list back up. Is there any way to restore it in the same site collection with the different list name?



srinivas

Export to excel gridview image button is not firing at first time in sharepoint 2010

$
0
0

Hi,

I have gridview i want to export gridview data into excel for that i am using image button.My issue is when i click first time on image button to export gridview to excel.Image button event is not firing at first time.Second time it is firing.

Please help me to resolve this issue.

Image viewer/ carousel using Jquery


Possible ways to read a .docx file :

$
0
0

Hi,

Can any one let me know the possible ways to read a .docx file. I any a solution that could be either server side as well as client side.

Thanks in advance.

Regards:

Sanjay

Possible ways to read a .docx file :

$
0
0

Hi,

Can any one let me know the possible ways to read a .docx file. I need any a solution , either server side as well as client side.

Thanks in advance.

Regards:

Sanjay

Import share point list to excel return data is null (excel result empty but SharePoint list has more than 50000rows

$
0
0

I have a share point list i want to export share point list to excel 

It cross to more than 5000 rows and  it has consist of multi test drop down ,choices and No custom code

How can i resolve  this issue? i tried  change views but no luck ,any other options are available 

Please share Limitation export share point list to excel   


Sridhar Mandipudi


Retrieve user details when buttons is Clicked

$
0
0

Hi guys,

this is just a random question. I'm not sure if this is possible or not. Using JavaScript and REST on SharePoint. Does anyone know how to retrieve a users SharePoint logon details for instance when a button is clicked on a page, the email of the user that clicked the button will be retrieved.

I need this because I am trying to create a system whereby if a user clicks a button, I can look at the format of the email or location of the user to determine what country he resides and then using that information open up outlook message with the corresponding email for the location in which the user resides.

as an example

I have 3 emails....a) Ghanalocation@yahoo.com   b)englandlocation@yahoo.com  C)asialocation@yahoo.com

if a user in Ghana clicks on a button, outlook will open with the Ghana location email.

is this possible to achieve?

thanks

 

RefinableInt not working in search API

$
0
0
/sites/my/_api/search/query?querytext=%27(ContentTypeId:0x01489534544341EDD* AND ListId:C694N7-C900-48BE-V1E3-5094087615F2) %27&rowlimit=30&TrimDuplicates=true&selectproperties=%27ListItemID,Title,RefinableInt00,FYOWSNMBR%27

The above url is the one I use for Search API to retrieve data from lists.I have mapped a crawled property to RefinableInt00 and also full crawl has been done to reflect it in the site.But the result of RefinableInt is blank. I get the results of "selectproperties" from "data.d.query.PrimaryQueryResult.RelevantResults.Table.Rows.results".There I get the values of Title,FYOWSNMBR etc.Please find the screenshot attached below. 
Thanks in advance

Viewing all 11571 articles
Browse latest View live


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