cancel
Showing results for 
Search instead for 
Did you mean: 

Collection Id in Script to hide button

Former Member
0 Kudos

Hi All,

I am trying to hide Upload Document Button on Contract Documents Tab,

I am using below script:

myColl= doc.getCollectionMetadata("<COLELCTION ID>").get(doc);

IapiDocumentLockManager.lockField(session,doc,"<COLLECTION ID>");

for (int i = myColl.size() - 1; i >= 0; --i)

{

myColl_member = myColl.get(i);

IapiDocumentLockManager.lockField(session, myColl_member, "<COLLECTION FIELD ID");

// The above line is repeated for every collection field

}

I replaced <COLLECTION ID> with contracts.contractdocument.collection.toolbar

and <COLLECTION FIELD ID> with upload_document

But when I run the script it throws null pointer exception at line 1.

That is its getting Collection as null.

Can anybody help me with what should be correct <Collection ID> for Contract Documents Tab?

Thanks,

Saloni

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Saloni,

You would have to use Toolbar Customization. It is not possible to hide buttons via scripting.

Regards,

Vikram

Former Member
0 Kudos

Hi Vikram,

I need to unhide/show the buttons after the master agreement is saved.

For this I think there is no other option then scripting.

please let me know incase you know better solution.

Thanks,

Saloni

0 Kudos

Hi Saloni,

As I had previously mentioned, it is not possible to conditionally hide/unhide a button on the UI, even with scripting.

Regards,

Vikram

Former Member
0 Kudos

Hi Vikram,

Is it possible to validate button click event? On Create Master Agreement, When user clicks Upload Document Button on Contract Documents Tab, is it possible to throw exception there? As hiding isnt possible.

How can we identify that the button is clicked?

Thanks,

Saloni

former_member182305
Active Participant
0 Kudos

Hello Vikram. I created an collections field and i want to hide the buttons of that specific collection field.

Is It possible using the toolbar customization.???

Thanks..

Regards..