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

CAML query help needed - need system time plus or minus a number of minutes

$
0
0

Is there a way to replace the date / times in the query below with the current date/time plus or minus a number of minutes?

<Query><Where><And><Geq><FieldRefName="SendDate"/><ValueIncludeTimeValue="TRUE"Type="DateTime">2011-01-01T15:55:52Z</Value></Geq><Leq><FieldRefName="SendDate"/><ValueIncludeTimeValue="TRUE"Type="DateTime">2011-12-31T15:56:29Z</Value></Leq></And></Where></Query>

upload and download the file same name but different extension from the document library

$
0
0

HI,

     I am using the Client Object Model (Copy. Asmx ) To upload and download the file from the document library.

I am having the mandatory File ID for the each Document.

I tried to upload the the document (KIF53.txt) with File ID (KIF53) uploaded successfully.

Again I tried to Upload the document(KIF53.docx) With File ID(KIF53) its uploaded the file but it not upload the File ID in the Column

Please find the below screen shoot for the reference.


upload and download the file same name but different extension from the document library

$
0
0

HI,

     I am using the Client Object Model (Copy. Asmx ) To upload and download the file from the document library.

I am having the mandatory File ID for the each Document.

I tried to upload the the document (KIF53.txt) with File ID (KIF53) uploaded successfully.

Again I tried to Upload the document(KIF53.docx) With File ID(KIF53) its uploaded the file but it not upload the File ID in the Column

Please find the below screen shoot for the reference.

VisualWebPart .ascx.g.cs not getting generated for Visual Web part

$
0
0

Hi,

I am creating a Visual Web part using VS 2012 with sharepoint developer tools (version: 11.0.60226.0). But whenever I create a new visual web part project the .ascx.g.cs page is not getting generated and getting an error "initialize Control " doesnot exist.

Can someone guide me to resolve this error

Thanks in advance.

Get rid of 'View Entries' in a SharePoint 2010 Append-Only

$
0
0

Hi,

I have SharePoint List and that has "Comments" column which is "Multiple lines of text" and with "<label for="onetidAppendOnly">Append Changes to Existing Text</label>".

It is showing "View Entries..." as a Item in a List View Comments Column. I want to rid of it.

Can anyone tell me?

Thanks & Regards

Poomani Sankaran

Check the DocumentSet is exist with the same name in a docuemnt library or not ?

$
0
0

Hi,

I am creating DocumentSet in timerJob and I want to validate that My Document set is exist in the Document Library or not.

please tell me the block of code to validate the Document Set is Exist or not ?

Thanks,

Deepak

Banner showing on library/list pages and not site pages

$
0
0

Hi everyone,

I am trying to insert a banner so it is visible on every page of my site and so I have customised my master page to do that in SPD.  Here is the code where I reference an image:-

<div id="s4-workspace">
<div id="s4-bodyContainer">
<div id="s4-titlerow" class="s4-pr s4-notdlg s4-titlerowhidetitle">
<div class="s4-title s4-lp">
<div class="s4-title-inner">

<table class="s4-titletable" cellspacing="0" style="background-image:url('../../images/SiteBanner7.png')">

The banner is showing on library and list pages but not on any of the main customer facing pages.  Does anyone have the solution?

Many thanks for any help

 

Banner image not showing in Chrome

$
0
0

Hi everyone,

I have created a banner which has a logo in it and uploaded it into my images folder.  I have created a new css document and saved that in my style library which refers to the banner I created:-

.ribbonbackground, .s4-title {
background:url('http://spdev.xwwl.nhs.uk/sites/BI/PublishingImages/SiteBanner7.png') no-repeat 0 0 !important;
} 

I then made reference to this css file in the Site Master Page Settings on my site under alternative css URL.

The banner is showing correctly in internet explorer but the image in the banner isn't showing when I view the site on Chrome.

Does anyone knowthe solution to get it to show in Chrome?

Many thanks for your help

Natalie

xXx


Powershell Script to Enable and Disable SharePoint list versioning

$
0
0

Hi,

We have a Sharepoint list with a date and time field named 'Today' which we update overnight
via PowerShell script to give the current date and this recalculates other calculated fields
in the list.

All is fine but we have versioning enabled on the list and so we get a new version created everyday.

Is there a way to disable the versioning prior to running the update and then re-enable
after?

This is the script

Add-PSSnapin Microsoft.SharePoint.PowerShell

Start-SPAssignment -Global
$SPWeb = Get-SPWeb "<SharePointSiteUrl>"
$List = $SPWeb.Lists["ListName"]
$Items = $List.Items
foreach ($item in $items)
{
 $modifiedBy = $item["Editor"]
 $modified = $item["Modified"]
 $item["Today"] = Get-Date
 $item["Editor"] = $modifiedBy
 $item["Modified"] = $modified
 $item.Update()
 $list.Update()
}
$SPWeb.Dispose()
Stop-SPAssignment -Global  

 

How do I add web part in the event receiver after the site is provisioned in SP 2010?

$
0
0
How do I add web part in the event receiver after the site is provisioned in SP 2010?

How to download documents from a library in bulk using C#?

$
0
0

I'm trying to figure out the best way to download all the documents from a given document library.

Is there any better way than to loop through every single item and downloading every file individually?

At times, I'll be required to get all the documents from the farm and looping through every single item in every single list is just not the right approach

Help with copying permissions and roles from one user to another. Issue with RoleDefinitions

$
0
0

I need help please. I’m trying to copy a role definition/name in SharePoint 2010 Powershell. 

The below is only a piece of my script, but I have to find '$SearchUser" and wherever it lives (webs, lists, groups), I need to add "$account" and copy permissions from '$SearchUser" . We are doing this to limit certain users from access our farm (by adding a new AD domain that does not contain these users, then deleting the old domain). Every time I run it, it seems to mess up on this line:  $role = $web.RoleDefinitions.[$newRoleDef]. It is acting like the $newRoleDef is null, but it is not. When I outputfile the $newRoleDef, it has values, such as Read, Contribute.

foreach($Web in $Site.AllWebs)
{

if($Web.HasUniqueRoleAssignments -eq $True)
{
foreach($WebRoleAssignment in $Web.RoleAssignments )
{
if($WebRoleAssignment.Member.userlogin)
{
if($WebRoleAssignment.Member.LoginName -eq $SearchUser)

$WebUserPermissions=@()
foreach ($RoleDefinition in $WebRoleAssignment.RoleDefinitionBindings)
{

$newRoleDef = $RoleDefinition.Name
$assignment = New-Object Microsoft.SharePoint.SPRoleAssignment($account)
$role = $web.RoleDefinitions.[$newRoleDef]
$assignment.RoleDefinitionBindings.Add($role)
$_.RoleAssignments.Add($assignment)

Error because of override of owshiddenversion data

$
0
0
Hello all,

I am getting following error in ULS log while updating a PropertyBag value of a listitem in document library. It is being thrown from source -  sharepoint foundation. I am using SharePoint 2010.

Did any one here have experienced this error and know reasons for it?
Can this error fail the saving of property bag value for a list item?

Error
12/02/2014 12:38:08.50CustomProcess.exe (0x21B4)0x183CSharePoint FoundationGeneral8e2mHighError because of override of owshiddenversion data: list name = TestDocLib, item id = 2867

Please note, versioning is not enabled on document library.

Regards,
Indra

Thanking You,

Update list item with managed metadata field returns The security validation for this page is invalid

$
0
0


Using SharePoint 2010 Server

I'm attempting to programtically update a managed metadata field in a document library. I'm able to do it without issue on all other non-managed metadata fields. When I attempt it on a MM field I get the error message

"The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again."

After some digging I realised that this error was being caused because SharePoint was trying to write to the TaxonomyHiddenList list (../sites/mysite/Lists/TaxonomyHiddenList/AllItems.aspx)

When I update a document through the browser with a term (Term01), it shows up in this TaxonomyHiddenList . I can then run my application, apply Term01 to my new document and it works fine. But if I apply Term02 to my new document it gives me the error above.

Summary
My app can read the TaxonomyHiddenList fine but it can not perform an operation that would write to it, resulting in not being able to update the MM field.

Question
Is there any advice on how I can further debug this issue?

Is it possible to add a rich text field to a SharePoint 2013 site workflow initiation form?

$
0
0


I have what seems like a fairly simple task:

Using SharePoint Designer 2013, create a site workflow with initiation form input fields that have "Rich Text" options for a multi-line text boxes (the ability to insert basic tables, pictures, format text, etc.). Clicking on initiation form, you can add a multi-line text box but there is no option to select "Rich Text" box. These multi-line text boxes are then passed on to a site content type within a library. Help!! I've been looking at this for days!

Thank you!

SharePoint 2013 Promoted Links - What are the Background Image Cluster Vertical and Horizontal Start fields?

$
0
0
I've looked everywhere, and I can't find any reference to the two default fields in a Promoted Links library:

    Background Image Cluster Horizontal Start
    Background Image Cluster Vertical Start

What are this for?

SharePoint workflow shows Rejected after 1 user removed from workflow

$
0
0
I have a document approval workflow where I added 2 users. One of the users was added using a wrong account. I was not allowed to edit the task and redirect to the correct account, so the only option was to delete the user with the wrong account and add the user with the correct account. The user was then able to approve the document. The 2nd user also approved the document. However, the overall status of the document shows it is "Rejected" instead of "Approved". The event history shows that right after the user was deleted, the task was auto-cancelled. After the task was auto-cancelled, the workflow was Rejected. Why? Can the current document status be corrected? Can this be prevented?

How can I create a company-wide shared calendar in Office365 or SharePoint that can be accessed in Outlook and OWA?

$
0
0


How can I create a company-wide shared calendar in Office365 or SharePoint that can be accessed in Outlook and OWA?

I am looking for the simplest MS-supported option.

export and import list error(Import-SPWeb)

$
0
0
Hi!

I try to understand import(and export) processes in SharePoint. I've made a .cmp backup of one list. After that I delete some elements. And now I try to import list from cmp file to the same site but it fails - The element 'WebPart' in namespace 'urn:deployment-manifest-schema' has invalid child element 'Joins' in namespace 'urn:deployment-manifest-schema'. I didn't make any changes on the site. 

Also, I have a question - Can I use export for archiving lists? 

For example - I have a list with 3000 elements. I make a backup and delete them. When I need them again, I import list - and restored items appear in list. 

MS FPSE RPC Deprecation

$
0
0

Hello,

I am working on a solution to manage documents in Sharepoint 2010 using the .NET WebClient class and MS FPSE RPC.  The question I have is whether MS FPSE RPC is part of the road map for 2013 and future versions.  I know it is integral to the Sharepoint designer so I though perhaps it was a legacy technology that would be part of future releases.  The .NET solution works well and I would like to avoid rewriting a solution using WebDAV.  I read one discussion about IIS7 not supporting it but I think that may have been FPSE and not the RPC gateway.  Any help or clarification would be greatly appreciated.

Regards,

Jose

Viewing all 11571 articles
Browse latest View live


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