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

Workflow status based on TaskItemid and Task List Guid

$
0
0

HI,

I have a tasklistitemId and the task list Guid.

Is it possible to find the workflow status based on that?

I have tried for "ModerationStatus" columns, which is always returning null. I am using a visual webpart and C#.

How to achieve it?


custom timer job not applicable ignoring job definition

$
0
0
We have created custom timer job in share point 2010.but we are getting error

job definition "Job defination name", id ed6b4720-67c3-4bbc-aa46-e98a2aa67202 not applicable, ignoring

We are unable to find out error for the same in share point log.

Its webapplication level timer job . and farm architecture is 2 WFE and 1 application server.

how to get (welcome) search page layout on publishing site

$
0
0

hi friends

i am working with publishing site

i need to use (welcome page) search page layout but it is missing in 

how to get it

New-SPWebApplicationExtension : An item with the same key has already been added.

$
0
0

Hi All,

I am facing the following error while creating extended web application. I am having webapplication called http://sp2010dev1:1995.

I am executing below command to create extended web application.

PS C:\Users\spdev> Get-SPWebApplication -Identity http://sp2010dev1:1995 | New-SPWebApplicationExtension -Name 'Extended Web App1' -Zone "Default" -URL 'http://sp2010dev1:3995'  -AuthenticationProvider $ap

This command shows me following error.

New-SPWebApplicationExtension : An item with the same key has already been added.

I am not sure what causing this issue.

Thanks in Advance.




Document Library - custom Edit Form - reference Master Page

$
0
0

Hi,

I have a Visual Studio solution (SharePoint 2010) in which I have created a custom EditForm for a Content Type (I set the Content Type's EditFormUrl in a Feature Receiver). The custom form has been constructed using the following blog's directions: http://community.bamboosolutions.com/blogs/sharepoint-2010/archive/2011/05/12/sharepoint-2010-cookbook-how-to-create-a-customized-list-edit-form-for-development-in-visual-studio-2010.aspx).

Now, the new form is being set on the Content Type, but it fails to load with the following error message:

System.Web.HttpException: The file '/_layouts/<a name>/~masterurl/default.master' does not exist.

The Master Page I want to use, is a custom Master Page and sits in every Site Collection's Master Page Gallery.

How do I point to this Master Page in my custom form? I guess it's a little tricky since the form's aspx sits in the Layouts directory...?

Thanks for any help!

Flilter webpart to read the data from XML template

$
0
0

Hi

Is there any out of the box webpart to read data from xml file for filtering in sharepoint 2010.

The filter dialog look like following functionality and allow to select only one value.

  .Paretn1

     chiild1

     child2

 .Parent2

     child1

     child2

 

Thanks

Edit list items when click on lookup column of some other list SharePoint 2010 using SharePoint designer 2010

$
0
0

hello,

I am adding an xslt list view web part of list 'A' in Custom Edit form of same list. There is a lookup column in my list and the lookup is some other list with in the site.

When I click on the item of lookup column, then current list items should be editable in the dataform web part of the same page.

How do I achieve this using SharePoint Designer 2010.

Please let me know If you need some more clarification on the issue.

Thanks in Advance,

Regards,

MBKSP.

Order by most recent date not working in CAML Query

$
0
0

Hi,

I am trying to pull items from an announcements list and I would like the results sorted by most recent first, but it is coming back as least recent first. Can someone tell me what is wrong with the query? I even tried "Modified" and I get the same result. Thanks.

         SPList oList  = SPContext.Current.Site.OpenWeb("ts/hse").Lists["near misses"];
         
 
           SPQuery spQuery = new SPQuery();
           spQuery.Query = "<Query><OrderBy><FieldRef Name='Created' Type='DateTime' IncludeTimeValue='TRUE'  Ascending='False' /></OrderBy></Query>";
           spQuery.RowLimit = 3;

           SPListItemCollection spListItemCollection = oList.GetItems(spQuery);


Sherazad


Wrong ScriptLink entry using feature activation causing every page in Sharpeoint 2010 site to throw error

$
0
0

Hi,

My requirement was to depoly a javascript file to the style library in a Site collection. To associate this js file to the custom ribbon action which would be using the javascript functions, I added the following code to the feature activated method:

Now, I am getting an error which ever site page i am trying to open on my browser: 

"/_layouts/http://webapp:port/sites/mysite/style library/InitiateworlflowFiles/CustomRibbonActionforWorkflows.js is not a valid virtual path"

I am not able to update the scriptPath, tried deactivating the feature and uninstalling it, nothing seems to work. I am able to open the site in SPDesigner, but not able to see the ScriptLinks hardcoded there. Tried to attach a different master page, but the issue is persisting. Not ale to make sure where the ScriptLink reference is coming from.

Any guidance on how an already added ScriptLink can be edited/removed will be much appreciated.

Thanks

Grigory

Authentication issue when trying to display a list using the SP web services.

$
0
0

Hi all,

I'm getting a access denied error in my console application when I try to run my program which uses the lists.asmx to pull out information from one of our SP lists. Would appreciate any help.

Our SharePoint is using claims with NT authentication and my code for authentication is:

                connect.lists.Lists mySPList = new connect.lists.Lists();
                NetworkCredential credentials = new NetworkCredential("ID", "Password", "Domain");
                mySPList.PreAuthenticate = true;
                mySPList.UseDefaultCredentials = false;
                mySPList.Credentials = credentials;

Create new web application using Power Shell Command.

$
0
0

Hello All,

I needs to create a new web application with Windows authentication as well as Forms based authentication. How can I apply both authentication provider using power shell script.

What I did is

- Create a Web application using Windows authentication.

- Create ASp.net membership provider.

- Assign this provider to web aplication.

When I am assigning newly created Asp.net membership provider, It removes windows authentication.

I wants to keeps this both provider for my web application.

How can I do that.

Thanks in Advance

Save Conflict error while after updating an attachment inside an item of a list or a document library

$
0
0

Hi All, 

I am facing this weird issue where i get this error "Save Conflict

        Your changes conflict with those made concurrently by another user. If you want your changes to be applied, click Back in your Web browser, refresh the page, and resubmit your changes"

This error comes only when i try to save the item after the attachment has been updated.
I've tried it replicating it in other sites as well, but still the same error comes up for attachments  and there are no event receivers attached to the library.
Any kind of help or any pointers will be greatly appreciated.

Metadata problem in iPhone

$
0
0
  1. When content authors are editing a metadata in mobility application in browser stack, input fields that are attached to managed metadata control is not editable only i can pick by metadata picker. I need to make the managed metadata control editable in iPhone. Thanks in advance

Reinstalling job

$
0
0

Hi,

We have developped a timer job for an existing Sharepoint site.

So far, so good: the first update does add the job properly. Then comes the problem.

I programatically delete the added job with a powershell script :

$job=Get-SPTimerJob | where { $_.title -like "*nettoyage des récépissés*" } |select id, name, title

if ($job.Count -gt 1)
{
    Write-Host ("`nToo many jobs found ! Total :" + $job.Count)
}
elseIf([string]::IsNullOrEmpty($job.id))
{
    Write-Host "`nNo job found !"
}
else
{

Write-Host "`nJob Suppression`n" -ForegroundColor Yellow
        $fullJobObj=Get-SPTimerJob -id $job.id
        
        $fullJobObj.Delete()
        IISRESET
        net stop "SharePoint 2010 Timer"
        Start-Sleep -s 3
        net start "SharePoint 2010 Timer"

}

Then, I want the job to reappear when I update again the solution.

The script being used for the update if the following (it is the same I use the first time):

Write-Host "`nUpdating WSP solution`n" -ForegroundColor Green
$path = Get-Location
$fullpath = $path.ToString() + "\WSP\xx.yy.wsp"
Update-SPSolution -identity xx.yy.wsp -LiteralPath $fullpath -GACDeployment -Force

Write-Host "`nRebooting Sharepoint`n" -ForegroundColor Yellow

IISRESET

net stop "SharePoint 2010 Timer"
Start-Sleep -s 3
net start "SharePoint 2010 Timer"

Updating the second time does not create the job (EDIT: it cannot be found by any means, nor title nor GUID). I do not use "stsadm -o execadmsvcjobs"after the Sharepoint reboot as I understand it only forces jobs to run immediately.

Now you may ask why I do the delete in the first place ? The reason is: on our dev server, things run nicely. On the test server however, updating the Sharepoint site does not create the jobat all. Being unable to reproduce this bug on our dev server, we simulate the bug by installing WSP / deleting the new job.

Did I miss something ?



How to display confirmation message in SPItemEventReceivers

$
0
0

Is there a way to display confirmation message in ItemAdding event?
I would like to display confirmation message and based on user input proceed with the other steps.

public override void ItemAdding(SPItemEventProperties properties)
{
  // Display confirmation message
  if(OKClicked)
  {
 // Do something
  }
  else
  {
  // Cancel Operation
  }
}

Thanks in advance,

dhijit


WorkFlow get triggered even if we set trigger for item update with SPEmailEventReceiver and workflow attached to same Library

$
0
0

Hi All,

           I have a situation, SPEmailEventReceiver and WorkFlow is attached to same library, WorkFlow is configured to run after item is updated, but soon as the email is received in library the workflow is getting triggered, We have a action to create folder with subject and date and put the attachment with the date folder in SPEmailEventReceiver e.g: once a mail is received in library the SPEmailEventReceiver will create a folder with Subject and then Folder with Date and then put the attachment in the date folder so hierarchy will be subject folder/Date folder/attachment

I have tried to alter the SquenceNumber attribute in Feature Element file to 1 and make the Synchronization as synchronous but no luck.



Failed to load event receiver(System.IO.FileNotFound Exception) while deploying solution.Could not load dllname.dll

$
0
0

Hi,

We have developed a solution where in it contains a webapplication scoped feature which gets activated automatically on

deployment(Activatebydefault=true).When we are deploying through visual studio2010,its deploying perfectly fine without any issues .

If we try to deploy it using Add-SPSolution and Install-SPSolution,we are seeing the error message Failed to Load event receiver

<<FeatureName>> and File Not found exception in the Manage Farm solutions of Central admin.

 So  attached the process to OWS_Timer.exe in VS2010 and debugged the Feature activated event receiver code and everything executed fine

and enabled the assembly binding and viewed the logs using FusionLogViewer Visual studio tools.

Its showing the message as "GAC lookup was unsucessful",However the dll is still existing in GAC as MSIL.All the Build settings of the Project

was set to "AnyCPU" as the Target platform

Kindly help me in this regard

Thanks everyone

Upload Attachmnt Issue

$
0
0
Hi All,

I am facing an issue with uploading file, When I try to upload attachment from server with the below code the attachment uploaded successfully, but when I try to upload outside the server, it is throwing the exception "Can't find the path".

                string strFileName = txtPath.Text;                
                FileStream stream = new FileStream(txtPath.Text, FileMode.Open, FileAccess.Read); // Exception thrown here
                byte[] byteArray = new byte[stream.Length];
                stream.Read(byteArray, 0, Convert.ToInt32(stream.Length));
                stream.Close();
                requestItem.Attachments.Add(strFileName, byteArray);
    
Please help me on this issue.

Regards,
Kumar.

how to set one fixed folder to save rich content of rich text field in sharepoint list

$
0
0

hi friends

i have rich test filed in SharePoint list

if user wants add picture to rich text filed from insert option it is asking to save file in existing document libraries it is showing all libraries. 

what i need is how can we fix one particular document library to save all this file from rich text filed.

"approve it" is not working in sharepoint publishing page

$
0
0

hi friends

i am working with publishing workflow 

when user clicking on "Approve it" link in status bar it is not working 

what will be the problem

Viewing all 11571 articles
Browse latest View live


Latest Images

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