Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

SharePoint Designer

  Asked By: Justin    Date: Dec 17    Category: Sharepoint    Views: 1899

Can anyone please advise me how to hide the "Delete Item" (in between
"Attach File" and "Spelling" options) in the SharePoint Form toolbar found
in the Edit Form through Sharepoint designer? This is pretty urgent.

Share: 

 

10 Answers Found

 
Answer #1    Answered By: Trupti Patil     Answered On: Dec 17

You could create a custom permission level that doesn't include Delete
privileges; that would probably be the most airtight solution.

Otherwise, if you're really just worried about that link not being there on
that specific edit  form, you could write a quick little bit of JavaScript to
hide it on the page.

 
Answer #2    Answered By: Marlena Noble     Answered On: Dec 17

Simply remove the person's DeleteItem permission and the prompt will go
away.

 
Answer #3    Answered By: Juan Davis     Answered On: Dec 17

I cannot remove the delete  Item permission because there is a workflow
attached to that list through which I delete an item  and this fails if I
take off the delete permission.

 
Answer #4    Answered By: Jason Anderson     Answered On: Dec 17

Then your only real choice would be to use Java script to remove the link
from the page. Just be aware that users will still be able to delete  items.
All they need to do is switch to the datasheet view and they can delete
individual rows. To really keep anyone from deleting the item  other than
the workflow you would need to implement an Event receiver that would check
to see whether the deletion was started by a user or the workflow and cancel
the event if its not the workflow.

 
Answer #5    Answered By: Uttam Vanjare     Answered On: Dec 17

...and that JavaScript would be something like this:

var aList=document.getElementsByTagName("a");
for(i=0;i<aList.length;i++) {
if(aList[i].innerHTML=="Delete Item") {
aList[i].parentElement.parentElement.style.display="none";
}
}

 
Answer #6    Answered By: Jack Carroll     Answered On: Dec 17

Or, jQuery:

$("a[title=Delete Item]").closest("tr").hide();

 
Answer #7    Answered By: Chandrabhan Agarkar     Answered On: Dec 17

Just edit  the page and add one more content editor webpart then within
the CEWP add the following script...


var aList=document.getElementsByTagName("a");
for(i=0;i<aList.length;i++) {
if(aList[i].innerHTML=="Delete Item") {
aList[i].parentElement.parentElement.style.display="none";
}
}


 
Answer #8    Answered By: Lonnie Cohen     Answered On: Dec 17

Can you or anyone please post that javascript to achieve that?

 
Answer #9    Answered By: Ruchir Satam     Answered On: Dec 17

I've a site deployed on a developed machine. The site was developed under
`WSS 3.0` which contains custom `List`, `Features`, `Templates`, `Styles`
etc.

What I've to do is to create a deployment package (setup) which I can give
away to my client. I know about `stsadm` but I don't have the access of the
production machine.

Is there a way I can package all the dependencies in a single file
(installation file) and run on the server which will include all the
dependencies (including site content)?

I've tried to experiment this with [SharePoint Content Deployment
Wizard][1]. It all went well when `Export` the site but always fail to
`Import` with the following message:

[2/2/2010 3:43:25 PM]: Start Time: 2/2/2010 3:43:25 PM.
[2/2/2010 3:43:25 PM]: Progress: Initializing Import.
[2/2/2010 3:43:42 PM]: FatalError: Could not find WebTemplate #75805
with LCID 1033.
at
Microsoft.SharePoint.Deployment.ImportRequirementsManager.VerifyWebTemplate(SPRe\
quirementObject
reqObj)
at
Microsoft.SharePoint.Deployment.ImportRequirementsManager.Validate(SPRequirement\
Object
reqObj)
at
Microsoft.SharePoint.Deployment.ImportRequirementsManager.DeserializeAndValidate\
()
at Microsoft.SharePoint.Deployment.SPImport.VerifyRequirements()
at Microsoft.SharePoint.Deployment.SPImport.Run()
[2/2/2010 3:43:48 PM]: Progress: Import Completed.
[2/2/2010 3:43:48 PM]: Finish Time: 2/2/2010 3:43:48 PM.
[2/2/2010 3:43:48 PM]: Completed with 0 warnings.
[2/2/2010 3:43:48 PM]: Completed with 1 errors.
[2/2/2010 3:44:51 PM]: Start Time: 2/2/2010 3:44:51 PM.
[2/2/2010 3:44:51 PM]: Progress: Initializing Import.
[2/2/2010 3:45:08 PM]: FatalError: Could not find WebTemplate #75805
with LCID 1033.
at
Microsoft.SharePoint.Deployment.ImportRequirementsManager.VerifyWebTemplate(SPRe\
quirementObject
reqObj)
at
Microsoft.SharePoint.Deployment.ImportRequirementsManager.Validate(SPRequirement\
Object
reqObj)
at
Microsoft.SharePoint.Deployment.ImportRequirementsManager.DeserializeAndValidate\
()
at Microsoft.SharePoint.Deployment.SPImport.VerifyRequirements()
at Microsoft.SharePoint.Deployment.SPImport.Run()
[2/2/2010 3:45:14 PM]: Progress: Import Completed.
[2/2/2010 3:45:14 PM]: Finish Time: 2/2/2010 3:45:14 PM.
[2/2/2010 3:45:14 PM]: Completed with 0 warnings.
[2/2/2010 3:45:14 PM]: Completed with 1 errors.
[2/2/2010 3:56:17 PM]: Start Time: 2/2/2010 3:56:17 PM.
[2/2/2010 3:56:17 PM]: Progress: Initializing Import.
[2/2/2010 3:56:34 PM]: FatalError: Could not find WebTemplate #75805
with LCID 1033.
at
Microsoft.SharePoint.Deployment.ImportRequirementsManager.VerifyWebTemplate(SPRe\
quirementObject
reqObj)
at
Microsoft.SharePoint.Deployment.ImportRequirementsManager.Validate(SPRequirement\
Object
reqObj)
at
Microsoft.SharePoint.Deployment.ImportRequirementsManager.DeserializeAndValidate\
()
at Microsoft.SharePoint.Deployment.SPImport.VerifyRequirements()
at Microsoft.SharePoint.Deployment.SPImport.Run()
[2/2/2010 3:56:39 PM]: Progress: Import Completed.
[2/2/2010 3:56:39 PM]: Finish Time: 2/2/2010 3:56:39 PM.
[2/2/2010 3:56:39 PM]: Completed with 0 warnings.
[2/2/2010 3:56:39 PM]: Completed with 1 errors.

I actually couldn't find a good reference on how to use it. But, this
software doesn't something I'm looking for which can create a simple
deployment package (after that you don't need to do anything). I might not
be correct but after two days of googling I think there is no such utility
(freeware) that can create a simple package of a site and install on other
farm without even need to configure anything before you run the installation
package.

You people might have an advise  which can help me to look/think outside the
box and get to the solution quickly instead adding more days working on the
problem.

 
Answer #10    Answered By: Suresh Chindarkar     Answered On: Dec 17

If you have created custom Lists, Features, Templates, and Styles then you
will need to package all of that up in a WSP and install that solution on
the destination farm before you can do anything else. After doing that you
should be able to save the original site as a template, copy the site
template file  to the new farm, install it using STSADM, and then create a
new site collection using the template.



Unfortunately, I assume you've done a lot of this in SPD. Artifacts built
in SPD really aren't transportable from one farm to another in most cases.
Its not the way the tool is designed to be used.

 
Didn't find what you were looking for? Find more on SharePoint Designer Or get search suggestion and latest updates.




Tagged: