on 09-28-2011 2:00 PM
Hi,
I have created new collection and i see some butttons like :
- Add
- Deleted Item
- Import
- Reorder
I would like to hide only Add button and others buttons stay avaialble for user.
How we can do it?
Thanks for your support.
Kind Regards,
Anacia
Bump.
I'm having this same issue.
I want to remove the 'delete' button from a collection, but still keep the 'add' button. A toolbar customization removes the buttons from all collections, and locking the entire collection removes all the buttons.
This functionality is required for example if there is a savings extension collection with members. We would like users to able to add savings lines, but not delete them. If they have the ability to delete, there is the possibility they could delete a line, the re-add a line with the same name and it would be hard to notice and track.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vikram,
I created new script wth class User Defined Object (Class id = (9999101) and event traget as Loaded.
It is not working : when i edit the Object, Add button of concerned collection still not readonly.
I think loaded event is not the correct event to set Add button as readonly.
We need to make Add button of collection as read only when i clik on the Edit button of object., and i don't why which class and Tragt i have to use in my scripting.
Any other proposal? any other idea?
Thanks & Regards,
Anacia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Many Thanks Vikram for your reply.
my object classe is : user Defined Object ( classe id = 9999101)
my collection name : SoftwareMeasurement
Accorfing to your scripting , here the scripting adapted to my requirement:
colln=doc.getExtensionCollection("SoftwareMeasurement");
collnSize=colln.size();
if(collnSize>0){
for(int i=0;i<collnSize;i++){
member=colln.get(i);
IapiDocumentLockManager.lockField(session,member,"Add");
}
You mentionn in your mail Scripting Context = Document Lifecycle.
1- what is the Class = Object or collection?
2- What is the target of this scripting ?
Tansk & Regards,
Adil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This is possible by writing a script.
We had a similar requirement wherein Add, Delete Selected, Import and Reorder buttons were available below the custom collection and they needed to be hidden. In your case, you can just lock the Add button while keeping the others Active.
here are the details of that example:
Scripting Context: Document Lifecycle
External ID:SAPINT_MasterAgreementLock
colln=doc.getExtensionCollection("xxx");
//locks the collection to prevent the addition of new elements
IapiDocumentLockManager.lockField(session,doc,"FieldRequester");
//Locks the individual members of the collection.
collnSize=colln.size();
if(collnSize>0){
for(int i=0;i<collnSize;i++){
member=colln.get(i);
IapiDocumentLockManager.lockField(session,member,"Add");
}
}
Hope this helps,
Vikram Shukla
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I am new to SAP Sourcing and have a similar requirement. I need to hide an "Add" button (shown below) on a condition which I already know how to check for.
The only problem I am having is hiding the Add button. I hope to use the same method as you have shown but I do not know what the Extension Collection ID is. Is there a way to find this out?
Thank for your help,
Troy Nemeth
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.