Hi Experts,
We are in sourcing 10.0.
We have one business requirement to restrict users to modify any data of MA once the contract document is in Executed state.
I have written code but it's throwing an error before moving the phase to Exceuted phase,
KDOCcollection = doc.getContractDocuments();
if (KDOCcollection.size() != 0)
{
iter = KDOCcollection.iterator();
while (iter.hasNext()) {
oldKDOC = iter.next();
if (KDOCcollection.size() == 1){
if(oldKDOC.getCurrentPhase().getDisplayName(session).equals("Executed")){
throw new ApplicationException("Doucment is in Executed state, you cant amend contract");
}
}}
}
Any leads would be of great help!!
Regards,
Geetika