on 2016 Feb 29 3:01 PM
Hello experts,
we need your help again. We create a new tab which contains additional information according collaboration on master agreement master data and specific contract documents. We solved the generation of entries via scripting. Everything works fine so far. Nevertheless it is required that nobody with read/write access can change the system-generated rows.
In that case I try to find the ID for extension collection for toolbar customization but I just find the external ID's for system toolbars. We want to hide or block these buttons (see screenshot as well):
1. Add
2. Import
3. Reorder List
4. Delete Selected
Is there any possibility via toolbar customization according to find the correct ID's or is scripting the only solution for it?
Thanks in advance,
Heiko
Request clarification before answering.
Hi Heiko,
For this requirement your only option is via script.
Bogdan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Heiko,
The scripting context will not help in this case.
You'll need to add some code in 'whatever' script is generating the records in the collection.
After you add all your records to the collection you'll need to make use of IapiDocumentLockManager like so:
lockField(session, doc, "extension_collection_name")
This will lock the collection itself and only that (not the records, and not the fields within the records). In plain words it will remove all the buttons you highlighted.
Let me know if this works.
Bogdan
Hello Bogdan,
we used this code (document lifecycle).
######
// Lock Collection
// 2016-03-02
// ver 1.0
// collections
final String COLL_NAME = "ZCLM_TAB_COL_IND";
public void lockExtensionCollection(IBeanIfc bean, String collectionName) {
colln=bean.getExtensionCollection(collectionName);
IapiDocumentLockManager.lockField(session, bean, collectionName);
}
lockExtensionCollection(doc, COLL_NAME);
######
All in all it works fine. Thanks for your input.
Best,
Heiko
Hi Heiko,
Glad to hear that. Could you also confirm if this solved your other question (the trash icon on each record), or you still need help with it?
PS: you could remove colln=bean.getExtensionCollection(collectionName); it doesn't look to be used
Regards,
Bogdan
----------------------------------
SAP Sourcing scripts - editing and source control maintenance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.