cancel
Showing results for 
Search instead for 
Did you mean: 

Contract document phase change through Scripting

former_member207877
Active Participant
0 Kudos

Hello CLM Guru's,

Happy New Year!

Have you come across this challenging scenario where contract document phase needs to be changed automatically via Scripting.

Any suggestions are most welcome.

Thanks & Regards,

Raj

Accepted Solutions (1)

Accepted Solutions (1)

former_member89217
Contributor
0 Kudos

typically this is something that would be done in the postscript of a Workflow approval.  here is an example code snippet of that case:

if(getApprovalStatus() != DENIED)

{

    ContractDocumentIBeanIfc cDoc = (ContractDocumentIBeanIfc)doc;

    ContractDocumentIBeanHomeIfc home = (ContractDocumentIBeanHomeIfc)IBeanHomeLocator.lookup(session, ContractDocumentIBeanHomeIfc.sHOME_NAME);

    home.upgradeToEdit(cDoc);

    home.changePhase(cDoc, "Revision");       

}

note in this case this is hard coded to the phase named Revision.  You would need to determine a means to set the appropriate phase.

former_member207877
Active Participant
0 Kudos

Hi Gary,

Let me put it in this way.

For example we have Contract document phases Initiated, Draft and Executed

Whenever a user generates or uploads a contract document then by default it will be set to phase 'Initiated' but here I need the contract document to set to phase 'Draft' automatically upon creation.

Here we cannot use workflow since some approvals are needed for phase change instead we need an instant change of phase from 'Initiated' to 'Draft' upon creating contract document.

Thanks & Regards,

Raj

former_member207877
Active Participant
0 Kudos

Hello All,

Anyone has done the above or is it possible to change the phase of CD with script(without workflow).

Thanks & Regards,

Raj

former_member207877
Active Participant
0 Kudos

It can be done through toolbar and explicitly called script.

Thanks

Former Member
0 Kudos

Hi RajShekhar,

Even I have similar requirement, In my case, I wanted the Contract Document Phase to be Blank initially, then user has to manually select appropriate phase depends on the document uploading but if user is forgot to the value from the dropdown (Initiated, Draft, Executed) it should not allow blank value while submitting/uploading the document.

I would request you to provide your inputs to achieve this requirement.

Thanking in advance.

Regards,

Ashoka Ganji

Answers (0)