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

Sharepoint Form

$
0
0

Hi All,

We have to develop Data entry forms in Sharepoint 2010 and solution should be farm solution (WSP) so that Admin can install single unit. what should be best approach if team is from .Net background.

In my knowledge ,

List's default form (NewItem/Edit/Display) but these default form is difficult to pack in WSP package using module approach

Visual Web part using server side object code is easy option but how to display in site pages after deployment because no manual intervention required.

Application pages ? or Site Page With Code-Behind Using Visual Studio 2010 (http://blogs.msdn.com/b/kaevans/archive/2010/06/28/creating-a-sharepoint-site-page-with-code-behind-using-visual-studio-2010.aspx)

I am new in SP , please share your views on this , which approach should be good with minimum use of  Jquery/Javascript

Many Thanks.....

Anupam soni


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

Jquery/JavaScript to get current browser's name and its version

$
0
0

Hi,

I using sharepoint 2010, 

Is it possible using Jquery/JavaScript to get current browser's name and its version.

when my sharepoint site home page opens i need to display a popup msg of current browser name and its version.

can anyone help me on this.

With Regards,

RK

Workflow history

$
0
0

Hi,

I've a custom list where I've created a form in InfoPath Designer 2013 to get some simple categories and data from the users.

I've attached the OOB approval workflow with this custom list to run it through an approval process.

In terms of reporting, I want to report off of the workflow history data to see how long did it take for the first approver to approve the list item and how long did it take the second approver to approve the list item and so on and so forth..

Basically, I want to do reporting out of the workflow history but using selected milestones, like - Approved, In process etc.

Any help / direction will be greatly appreciated.

PS: Environment is sharepoint online 2010.

Thank you!

One or more field types are not installed properly. Go to the list settings page to delete these fields

Give Anonymous access to the sharepoint 2010 application page

$
0
0

Hi All,

My current application is FBA sharepoint 2010 site. Now i have to add one verification  application page. User will get this link on there email id, and once they will click on this link they should redirect to the verification page. But in my case user is redirected to the login page when they click on mentioned link.

Following are the changes which i have did in my application.

1) Created one Application page and added following code :-

protected override bool AllowAnonymousAccess
        {
            get
            {
                return true;
            }
        }

2) Inherited from UnsecuredLayoutsPageBase

3) In web.cofig added following lines :-

 <location path="_layouts/VerficationPage.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>

Please let me know what other changes i have to do to complete this activity.

Thanks

Sharepoint internet site

$
0
0

Please can any one share with me about design document of Internet Application

and what is the best approach for that.

Prob in list web part

$
0
0

Hi

I Created a  List in SharePoint 2010 and my requirement is how i can change the color of list column so that it can display on list  as a web part and its possible any out of box web part ?


RSS webpart - how to match the whole phrase

$
0
0

I've found this code for a custom webpart that takes a Sharepoint tag and passes the tag name to the RSS webpart.  The RSS webpart then creates the query string based on that tag so that the RSS webpart shows news results related to that particular tag:

http://www.wictorwilen.se/Post/Enhancing-the-SharePoint-2010-Tag-Profile-Page-with-Bing-news.aspx

Everything works fine except that the results returned as for any word as opposed to matching the whole phrase.  For example "Anniston Chemical Depot" will returns results for "depot" as well.  The URL we used for the RSS webpart is this:

http://news.google.com/news?hl=en&gl=us&authuser=0&gws_rd=ssl&um=1&ie=UTF-8&output=rss

Does anybody know what needs to be done to get the "match the whole phrase" results?  Do I need to change the custom webpart?  I don't think so since the website's documentation says that"That field is then used by the RSS Web Part to create the query string to get the RSS feed." so it looks like the RSS webpart is responsible for creating the final query string.  Is there some setting in the RSS webpart to match the whole phrase?

thanks,

Help with adding a user copying permissions from another user $RoleDefinition.Name SharePoint 2010 Powershell

$
0
0

Hello,

I need to basically find everyplace 'ADUser1' exists and then add a new 'ADUser2' with the same permissions as the first group.

I have created a script that runs through an entire web app and finds everyplace the AD account is directly given access to and access via a group.  I then need to add the new user and assign the permissions from the first ADUser, copy them. Below is not the entire script, just where I'm trying to add the new user.  The rest of the script works fine to find the first user.  I'm stuck with this part:  $role = $_.RoleDefinitions[$newRoleDef].  I get an error that I can call a method on a null valued experssion.. I guess I don't know how to specify to copy the role from the first user, and use it to set the new user?

          #Get the Permissions assigned to user
           $WebUserPermissions=@()
             foreach ($RoleDefinition  in $WebRoleAssignment.RoleDefinitionBindings)
             {
                             $WebUserPermissions += $RoleDefinition.Name +";"
        $newRoleDef = $RoleDefinition.Name
                            }
          #write-host "with these permissions: " $WebUserPermissions
          #Send the Data to Log file
          "$($Web.Url) `t Site `t $($Web.Title)`t Direct Permission `t $($WebUserPermissions)" | Out-File C:\Apps\Scripts\Logs\UserAccessReport.csv -Append
    $assignment = New-Object Microsoft.SharePoint.SPRoleAssignment($account)
                $role = $_.RoleDefinitions[$newRoleDef]
                $assignment.RoleDefinitionBindings.Add($role)
                $_.RoleAssignments.Add($assignment)
         }
       }

working with collections in powershell

$
0
0

Hi,

I'm struggeling with collections in Powershell in general.
I have a variable of type SPWebCollection created and want to add
1) a single SPWeb - Object
2) another collection of SPWeb - Objects

Can someone tell me please why the following doesn't work:

[Microsoft.Sharepoint.SPWebCollection]$allWebs += Get-SPWeb $URL1

or this

[Microsoft.Sharepoint.SPWebCollection]$allWebs += $site.AllWebs | Where-Object {$_.Url -like $URL2}

Finally I want to empty the $allWebs collection i.e. remove all objects. How do I do that?


I appreciate any feedback
Thank you

Error "Object refernce not set" when using http context in Eventreceiver for Document Library,

$
0
0

Hi,

Httpcontext returning null values when I used in item adding event of document library.

I have a document set home page which has document set properties(by default) and one OOTB document library is placed in the same page.When user clicking on upload documents in the ribbon I need to read the document set properties.

when uploading the docs if I pass the Hardcoded item id of the document set I am getting the values of the document set in the item added event.

now the problem, i have the id in the query string if i want to read the query string value using httpcontext in the itemadding event and pass it to item added event using httpruntime it is throwing "object reference error" .

if any body has any solution/workaround how to read the context in the document library event receiver,please help me out.

Thanks ,G1

sharepoint 2010 foundation calendar overlapping events

$
0
0

I am not much of a share point admin but I can edit the share point web interface. Once I get into share point central administration or share point design I am just guessing on what to do. 

We have users who are creating calendar events and they are overlapping other events. They would like it so that when they put in a new calendar event they get notified if they are conflicting with a current event that is already there.

I suggested to use the daily and weekly view which will show them but they insisted on share point notifying them rather than checking. 

Is it possible to do this without using share point designer? 


Craig Becker

Saving file to external network via VPN programmatically

$
0
0

To give you a background, I have a requirement wherein a report should be extracted from a SharePoint list and save it into a CSV file format and will be saved in another network by using VPN. This approach uses SharePoint Timer Jobs that will run in a specific time.

I have several questions to ask:

1. How to connect to a VPN programmatically?

2. Will connecting to a VPN in our production server will make our production sites inaccessible in our network?

3. What are the risk factors of this?

4. What are other alternative methods that I should take a look into?


----------------------- Sharepoint Newbie

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,


Need to know the meaning of each element in CAS Policy xml?

$
0
0

Hi,

below is the XML for CAS Policy , can somebody please explain me the meaning of each element in below xml in more simple language.

<CodeAccessSecurity><PolicyItem><PermissionSet
      class="NamedPermissionSet"
      version="1"
      Description="Permission set for custom test WebParts"><IPermission
          class="AspNetHostingPermission"
          version="1"
          Level="Minimal"
        /><IPermission
          class="SecurityPermission"
          version="1"
          Flags="Execution"
        /><IPermission
          class="Microsoft.SharePoint.Security.SharePointPermission,
            Microsoft.SharePoint.Security, version=11.0.0.0,
            Culture=neutral, PublicKeyToken=71e9bce111e9429c"
          version="1"
          ObjectModel="True"
         /><IPermission
          class="System.Net.WebPermission, System,
            version=1.0.5000.0, Culture=neutral,
            PublicKeyToken=b77a5c561934e089" version="1"><ConnectAccess><URI uri="https?://.*" /></ConnectAccess></IPermission><IPermission
          class="System.Security.Permissions.SecurityPermission,
            mscorlib, version=1.0.5000.0, Culture=neutral,
            PublicKeyToken=b77a5c561934e089"
          version="1"
          Flags="ControlThread, UnmanagedCode"
        /><IPermission
          class="System.Security.Permissions.EnvironmentPermission,
            mscorlib, version=1.0.5000.0, Culture=neutral,
            PublicKeyToken=b77a5c561934e089"
          version="1"
          Read="UserName"
        /></PermissionSet><Assemblies><Assembly PublicKeyBlob=PublicKeyBlob /></Assemblies></PolicyItem></CodeAccessSecurity>

thanks

gaurav

How to display static image using ITEM STYLE XSLT when there is no items in content query webpart?

$
0
0

Hello,

I need to display static image in Content Query web part using ITEM STYLE XSLT where mode="itemstyle" , when there is no items which is getting display from list ?

Your help will be appreciated.

Thanks and Regards,

Dipti


Dipti Chhatrapati

Cascading dropdown - multiple people picker value

$
0
0

So I have a source list with two columns (TITLE - contains the name of the group. ex. Group A; Members - Multi value people picker.)

Now in my NewForm.aspx, I will lookup to the source list and when I select a Title, it will show me the corresponding Members.

Group: Group A

Members: UserA; UserB


----------------------- Sharepoint Newbie

Event receveir does not fire

$
0
0

Hi;

I Create a event receveir on a custom list (REFCLIENTS) but it does not fire when I add a new item into the list :  it isnoteven nothing happensan exception ?

My code is :

using System;
using System.Security.Permissions;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Security;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint.Workflow;
namespace EventReceiver.EventReceiverList
{
    /// <summary>
    /// Liste des événements d'élément
    /// </summary>
    public class EventReceiverList : SPItemEventReceiver
    {

       public override void ItemAdded(SPItemEventProperties properties)
       {
           try
           {
               base.ItemAdded(properties);
               SPWeb spCurrentSite = properties.OpenWeb();
               String curListName = properties.ListTitle;
               if (curListName == "REFCLIENTS")
               {
                   SPListItem curItem = properties.ListItem;
                   String curItemSITE = properties.AfterProperties["SITE"].ToString();
                   properties.AfterProperties["SiteUrl"] = spCurrentSite.Url + "/" + curItemSITE;
                   SPWeb newSite = spCurrentSite.Webs.Add(curItemSITE, curItemSITE, curItemSITE, Convert.ToUInt16(1033), "{2C6577A6-EFB5-4C7F-ADEC-8FF385DAAC06}#ModeleSiteCourrier", false, false);
                   newSite.Navigation.UseShared = true;
                   newSite.Close();
               }
           }
           catch (Exception ex)
           {

           properties.Status = SPEventReceiverStatus.CancelWithError;
           properties.ErrorMessage = ex.Message.ToString();
           properties.Cancel = true;

           }

     }
   }
}
<?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"><Receivers ListTemplateId="100"><Receiver><Name>EventReceiverListItemAdded</Name><Type>ItemAdded</Type><Assembly>$SharePoint.Project.AssemblyFullName$</Assembly><Class>EventReceiver.EventReceiverList.EventReceiverList</Class><SequenceNumber>10000</SequenceNumber></Receiver></Receivers></Elements>

Any idea ?

Regards

i have a SharePoint list with below fields

$
0
0

Hi All,

i have a SharePoint list with below fields,


LocationAccount NumberDescription
Delhi1D1
Hyderabad2D2



Note:Location is lookup column

Now i have created a visual webpart,  in that webpart i have two dropdowns i.e location and account number

if i have selected location in first dropdown based on the location account number will be populated in second dropdown.

Can any one suggest, how to do this.

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>