Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2638

Set the status of the Master Agreement

$
0
0

Hi Guys,

 

i have a problem in which i have to reopen the Closed Master Agreement:

 

I have created a Toolbar Script  which helped me to activate the Master Agreement but  the Status of the Master Agreement was still "Closed".

 

Guys could any one help me a way through in which i can update the Status of the Master Agreement in the ToolBar Script Itself.

 

Code used is below:

 

MA_DOCUMENT_NUMBER="EXPLICIT MA NUMBER which we have re open"


ContractIBeanHomeIfc contractHome = (ContractIBeanHomeIfc) IBeanHomeLocator.lookup(session, ContractIBeanHomeIfc.sHOME_NAME);

 

ContractIBeanIfc contract = (ContractIBeanIfc) contractHome.findByUniqueDocName(MA_DOCUMENT_NUMBER);

 

if (contract.isClosed())

{

contractHome.upgradeToEdit(contract);

 

contract.setIsInactive(Boolean.valueOf(false));

 

contract.getFieldMetadata("CLOSED_AT").set(contract, null);

 

contract.getFieldMetadata("CLOSED_BY_USER").set(contract, null);

 

contractHome.save(contract);

 

}

 

Regards

Tarun rawat

dural.rawat@gmail.com


Viewing all articles
Browse latest Browse all 2638

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>