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

Dropdown selected index change was not working on sharepoint2010 layout pages

$
0
0

Hello All,

I have created drop down control in share point 2010 custom master pages. In Site/Site collection when page load is happening, dropdown is getting filled with SharePoint list data and working as expected. However when i go to _layout pages (for e.g. _layouts/viewlsts.aspx) and then click on dropdown control all the dropdown value disappears. Could anybody please guide me through this issue and any idea what causing this problem?

Thanks for your prompt response on this.


Regards Anil.R


20+ Lookup field stopped working

$
0
0

We are using SharePoint Foundation 2010.  The SharePoint functionality that changes a regular dropdown to a lookup when there are 20+ values was working on our production site until very recently and then inexplicably stopped.


a)    If a dropdown contains less than 20 values, SharePoint generates this element using a  <select … /> element with <option />.  See below.

<select name=Name_Client title=Name_Client class=abc-xyz id=Name_Client>
       <option value=0 selected>(None)</option>
       <option value=140>DropDown 1</option>
       <option value=141>DropDown 2</option>
       <option value=142>DropDown 3</option>
       <option value=143>DropDown 4</option>
       <option value=144>DropDown 5</option>
       <option value=145>DropDown 6</option>
       <option value=146>DropDown 7</option>
       <option value=147>DropDown 8</option>
       <option value=148>DropDown 9</option>
</select>

b)    If a dropdown contains more than 20 values, SharePoint automatically generates this element using an <input … /> element. See below:

<input name=”lookup-name” title=”Client class=ms-lookuptypeintextbox” id=”lookup-id” style="DISPLAY: none" onkeydown="CoreInvoke('HandleKey')" onkeypress="CoreInvoke('HandleChar')" onchange="CoreInvoke('HandleChange')" onfocusout="CoreInvoke('HandleLoseFocus')" type=”text” value=”(None)” choices="(None)|0|LOOKUP 1|140|LOOKUP 2|141|LOOKUP 3|142|LOOKUP 4|143|LOOKUP 5|144|LOOKUP 6|145|LOOKUP 7|146|LOOKUP 8|147|LOOKUP 9|148|LOOKUP 10|149|LOOKUP 11|150|LOOKUP 12|151|LOOKUP 13|152|LOOKUP 14|153|LOOKUP 15|154|LOOKUP 16|155|LOOKUP 17|156|LOOKUP 18|157|LOOKUP 19|158|LOOKUP 20|159|LOOKUP 21|160|LOOKUP 22|161|LOOKUP 23|162|LOOKUP 24|163|LOOKUP 25|164" match="" optHid="SPClient_Hidden" opt="_Select">

However, for some elusive reason, this suddenly stopped working in our production environment - which, in turn, broke other functionality contingent upon this behavior.  There were no new changes made to the production environment since the time when it was last working and now.  Also, the behavior is still working perfectly in our development environment. 

We have even scoured line by line comparing production and dev to see if there is anything that is different that could be causing this but have found nothing.  The only differences were the IDs used which is as expected.  We’re thinking it must be something environmental as we haven’t been able to find anything within the code or even the size of the SharePoint sites that would explain the sudden change in default behavior.

Has anybody else run into this issue in the past?  I wasn't able to find any reference to this specific issue searching with google and in multiple forums.

Thanks.


How To Save form Details into Document Library

$
0
0

Hi All,

I have created form as a visual webpart in SharePoint site, this list having details of the document library details, like name of the doc, location, Employee and uploaded document.

Now i want to save this details into custom document library.

Any Help?

Thanks in Advance!

Archive ListItem with Version History

$
0
0

Hi All,

There is a requirement to move list item from Source list to Archive list along with Version History. I am looking for code samples or recommendation to take it forward. If we have use SPExport and SPImport, how reliable is it? Any limitation or consideration for this implementation.

Is there any alternate option available to implement this functionality?

Any suggestion or recommendation here?

Regards,

Immanuel

Issue while applying validation to SharePoint Date Time Control

$
0
0

Hi,

I have a SharePoint date time control to display message to user if he selects future date.

For this i had applied compare validator as below.

<asp:CompareValidator ID="cmpToDate" runat="server" Operator="LessThan" Type="Date" ControlToValidate="dtToDate$dtToDateDate" ValueToCompare='<%= DateTime.Today %>' ErrorMessage="To Date should not be greater than current date"></asp:CompareValidator>   

But I am getting the error as below.Please let me know if i am making any mistake here.

Regards,

Sudheer


Thanks & Regards, Sudheer

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)
         }
       }

When loading user control getting Error

$
0
0

Hi,
We have created user controls(.ascx)
When I click on Submit button in my page, I have to get dropdownlist values and I have to bind data to the gridview.

Some times we are getting below below error

"An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below."
 Again we refresh the page it's loding the page and displaying data in gridview.

See the attached screen shot.

Thanks in advance....

 

change NewForm2 behaviour

$
0
0

Hello. I am wondering if this is possible...

On SP lists, when you click "Add new item" it calls NewForm2 to to show a dialog. I am wondering if I can add code to the NewForm.aspx so when the user clicks OK or Cancel the parent window runs some javascript.

I know NewForm2 must have some kind of "is done" function because it refreshes the window after the user clicks OK. So I'm wondering if inside the NewForm.aspx dialog I can modify that "is done" function.


Context.Request.UrlReferrer issue with sharepoint 2010 Login Page

$
0
0

Hi,

I am using sharepoint 2010 and my database is fbadb(membership role database) for username and password.

I have created a login page which runs properly with code

status = SPClaimsUtility.AuthenticateFormsUser(Context.Request.UrlReferrer,UserName.Text,Password.Text);

if (!status)

{

UserName.Text = "";

Password.Text = "";

}

else

{

Response.Redirect("~/_layouts/XYZ/TEST.aspx");

}

but i want to call this login page from another page with passing Username and Password as querystring Values.

at that time UrlReferrer is coming “null”(May be due to this is not the start up page of the project?????).

How can i solve it or is there any other way through that i can log in.

Thanks.

service unavailable http error 503 Application pool Stopped for the Web Appliaction

$
0
0

i am getting service unavailable http error 503 while opening a site in Sharepoint

When i checked IIS, i found out that Application pool Stopped for the Web Application.

So, i started it and then again launched the site...yet it still shows the same error and the pool is automatically stopped.

Please help..

Create List Item using SharePoint 2010 Workflow

$
0
0

Hello everyone.

I found in youtube video using SP Employee Onboarding Web Part, idea is quite simple and powerful. But this web part available only in SP 2013, and I use 2010. So I wanted to develop my own version.

Questions is:

I have 2 lists Employee OnBoards (list contains data about new employee) and Employee OnBoards Tasks (list contains approval task). Where field Employee Name from Employee OnBoards list is lookup field in Employee OnBoards Tasks list.

I need emplement next:

When new Item created in Employee OnBoards list, it should copy Employee Name value to the Name field of the Employee OnBoards Tasks list.

I hope I explained understandable.

Thanks.

Sharepoint 2010 Reports and Dash Boards

$
0
0

Sharepoint 2010 : Can any one suggest Top 5 Great SharePoint Reporting tool ? example Dundas or may something else.

I need to build reports using sharepoint list and also sql sever

Appreciate any help.


Kannalo

ASP Drop down list issues while trying to connect to SQL

$
0
0

I'm using SharePoint 2010 and SQL 2012. On the aspx page that I designed in SharePoint Designer, I'm trying to setup a drop down list and connect it to SQL table. During wizard setup, I can see all the values and everything working (very simple small table, 2 columns with ID and description, less than 20 rows). When I try to preview the page in the browser, I get "This control does not allow connection strings with the following keywords: ‘Integrated Security’, ‘Trusted_Connection’” message.

I found the link that addressed the issue and tried the solution number 1 - see link below

http://www.randomizzzer.com/2011/02/how-to-troubleshoot-error-message-this-control-does-not-allow-connection-strings-with-the-following-keywords-%E2%80%98integrated-security%E2%80%99-%E2%80%98trusted_connection%E2%80%99/

However now I'm getting an error "Type 'System.Web.UI.WebControls.SqlDataSource' does not have a public property named 'AllowIntegratedSecurity'" - in design mode and error "Cannot create an object of type
'System.Boolean' from its string representation '”True”' for the
'AllowIntegratedSecurity' property.
" in a browser.  But that is what the link above suggests to do and my code is pretty much identical to the one listed in that link

<asp:SqlDataSource AllowIntegratedSecurity=”True” runat="server" ID="SqlJob" and so on...</asp:SqlDataSource>

The suggestion number 2 from that article won't work for us, as the company will not want to globally allow Integrated Security. Am I missing something? Are there other steps that I need to take to address it or any other solution?

The management doesn't want to hardcode the drop-down list in any way and opposed to use it as SharePoint list. Any ideas would be appreciated.


Alla Sanders




get listitems loop through all lists in site collection

$
0
0

With the GetListItems query such as below, how can I loop through all lists in my site collection?

<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction>
       <Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems">
          <Parameters>
             <Parameter Name="listName">
                <DefaultValue></DefaultValue>
             </Parameter>
             <Parameter Name="rowLimit">
                <DefaultValue>1000</DefaultValue>
             </Parameter>
   <Parameter Name="queryOptions" Type="xml">    
    <DefaultValue>
     <QueryOptions>
      <ViewAttributes Scope="Recursive" />
     </QueryOptions>
    </DefaultValue>
   </Parameter>
          </Parameters>
        </Method>
        <ElementPath IgnoreNamespaces="True">*</ElementPath>
</Query>

thanks!

Custom Master Page changes wont apply to few page layouts

$
0
0

Dear All

I'm having issue applying custom branding to SharePoint 2010 sites.. Branding works overall fine but it doesn't apply to few pages.

For example if I click on Enterprise and Metadata Keyword Settings in Document library the changes are not applied. I notice it's a page called metadatacolsettings.aspx in layouts and I see it references application.master.. Similarly I see couple of other pages out of sync and all of them have application.master as Master Page..

Any ideas why this could be happening.. Please let me know

Thanks


How migrate list data from one web application to another web application?

$
0
0

Am having a list with bulk data.  I want to move the data to one list to another list in diff web application.

Any suggestions would be appriciated.

Sharepoint 2010 custom collect signature workflow assign to person column

$
0
0

I have created a custom list with some columns and upon saving the new item triggers a workflow to create a document in the document library.

Have changed the template of the document library to fit according to the list associations and binding the values so that it pulls all the values from the list item into word doc that gets generated.

Now that word doc has to go for an approval workflow where I need to use the "collect signature" workflow. It seems to work fine, triggers an email, sends out the signature task and everything, but the only problem I'm facing is it doesn't allow me to set assignee to a library column.

Doc library has the column as a person name and that name should be the "assigned to" in the collect signature workflow. So the email should go to that person in the column and he should get into the document review it, sign it and approve it.

So far I've been able to do it manually assigning the task to a person, but wanted to know if there is way to do it automatically through the lookup or something like that.

Don't know if this task is possible from the OOTB collect signature workflow.

Any suggestions would be appreciated.

Thanks,

DC


Dhawal Chheda



Huge SharePoint_Config Database/Timer Job History Overflow

$
0
0

Hello All,

I know there are quite a few sites about this issue, but none of them seem to work for me so I was hoping for some help.

Just for reference, this is in my dev environment on a VM running:

  • SP2010
  • SQL Server 2008 R2
  • Windows Server 2008 R2

It is the same old story of SharePoint's "Delete Job History" timer job not running and therefor the “TimerJobHistory” database table growing massive. For the last couple of months my drive keeps running out of space and putting a halt to my work. So I went to the Net looking for a solution. I found a few that looked promising, but either caused more problems or simply did not work. Now that I have my environment back up and running I was hoping for some help in solving this.

Does anyone know how to purge the “TimerJobHistory” table so my SharePoint_Config database will not keep filling up my space? From there is there anyway to prevent this from happening again? The “Delete Job History” will not run currently even though I have adjusted the days to keep history and increased the duration that the job should run.

So far here is what I tried and the results:

http://sharepoint.it-professional.co.uk/?p=228– Runs for a while and seems promising, but keeps growing the log and database file until out of space, then crashes. I have to spend a lot of time freeing up space, detaching, and reattaching the config database. At this point I have removed everything from that drive that I can so no more space can be freed.

Shrinking files – This is only a temporary fix and I heard that it is a bad idea to do this more than once every now and again anyway. I am sure my database is already fragmented terribly (which also if anyone can point me to a working solution for defragging in SQL Server 2008 R2 I would greatly appreciate it.)

There are a number of other sites that make recommendations that seem to be… well… less than what would be considered a “good practice” so I avoided those.

For the time being I have done what I had hoped not to and turned the SharePoint Timer service off to prevent the database from filling up again. If I turn it back on the log fill will be full in a matter of seconds which will move me back to no space and in a bad position.

This seems to be happening to all the devs here, but I got a bit too brave and tried to find a solution… I learn a lot from my mistakes though!

If any other information is needed, please let me know.

Any help would be GREATLY appreciated.

Thanks,

J.

Can I use Visual Studio 2008 project/item templates in 2013?

$
0
0

Can I import Visual Studio 2008 Templates I created directly into Visual Studio 2013 and use or must I upgrade to 2010 first, then to 2012, then to 2013?

Adding a subterm into a term via powershell

$
0
0

Hi,

Not sure if this would be the best place of this post, but here goes.

I have a script that will add a termstore item if it doesn't exist in the termstore. But I'm wondering how would I create a subterm within one that actually exists?

For example I want to be able to create a "subterm 2" in TestTerm2.

#Connect to Central Admin
$taxonomySite = get-SPSite http://site.com

#Connect to Term Store in the Managed Metadata Service Application
$taxonomySession = Get-SPTaxonomySession -site $taxonomySite
$termStore = $taxonomySession.TermStores["STORE"]

#Connect to the Group and Term Set
$termStoreGroup = $termStore.Groups["GROUP"]

#TermSet Create
#$termStoreGroup.CreateTermSet("sets")

$termSet = $termStoreGroup.TermSets["SETS"]

#############################################################

#############################################################
function Add-TermStoreItem
{
DO{
$resp = Read-Host "Enter Name"
$Name = $resp
$lookup = $termset.terms | where-object {$_.name -eq $resp}
If ($lookup -eq $Null) {$term = $termSet.CreateTerm($resp, 1033)
                        Write-Host "The term" $resp "was added to the termstore" -foreground green
                        $termStore.CommitAll()}
Else {Write-host $resp "Already exists in the termstore please try again" -foreground red}
}While ($lookup -ne $Null)
$taxonomySite.Dispose()
}
#############################################################

#############################################################

Add-TermStoreItem
Any help would be amazing!

If this is helpful please mark it so. Also if this solved your problem mark as answer.

Viewing all 11571 articles
Browse latest View live


Latest Images

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