cancel
Showing results for 
Search instead for 
Did you mean: 

changing contract status to executed via script

tom_seminckx
Employee
Employee
0 Kudos

Hi Experts,

We are trying to change to status of all contracts in an agreement to executed using a script on the moment of saving the agreement. Therefore we did the following:

agreementHome = doc.getIBeanHomeIfc();

listOfContracts = doc.getContractDocuments();

for (iter = 0; iter < listOfContracts.size(); iter++)

{

// get the contract

currentContract = listOfContracts.get(iter);

// get the CTR homebean

contractHome = currentContract.getIBeanHomeIfc();

contractHome.upgradeToEdit(currentContract);

contractHome.changePhase(doc.getObjectReference(), "Executed");

contractHome.save(currentContract);

}

The script is not giving any errors, but it is also not changing the status. Any ideas?

Best regards,

Tom

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Tom,

try to call changePhase for the contract itself...:

...

contractHome.changePhase(currentContract, "Executed");

...

Hope this helps.

regards,

Mario

tom_seminckx
Employee
Employee
0 Kudos

Thanks Mario,

Stupid mistake I made

regards,

Tom

Answers (0)