on 05-04-2015 7:36 AM
Hi all,
I use the following code to change the contract document template(1805) in script of the phase.
template.getIBeanHomeIfc().upgradeToEdit(template);
template.getIBeanHomeIfc().changePhase(template, "Approved");
template.getIBeanHomeIfc().save(template);
template.getIBeanHomeIfc().downgradeToView(template);
But NumberFormatException is thrown.
I use the phase object ID as a parameter or the use of 1/2/3/4 as parameter are thrown NoSuchElementException.
template.getIBeanHomeIfc().changePhase(template, "-2147483545");
I want to get current_phase or other_phase value during the contract document template(1805) before change(Pre Phase Change). But the change did not enter this code.
I don't know what to make of this function successfully use parameters. I do not know where you can view the four phase of the contract document template corresponding to the digital.
Anyone can help me? Thank you very much.
Regards,
Jacky Cheng
Hello Cheng,
Its better to handle all the phase change related codes in toolbar scripts.
Use below code in contract document template toolbar script
import com.sap.eso.api.contractgen.phase.PhaseIBeanHomeIfc;
import com.sap.eso.api.contractgen.TemplateContractIBeanHomeIfc;
sRETIRED= "Retired";
phaseHome = IBeanHomeLocator.lookup(session, PhaseIBeanHomeIfc.sHOME_NAME);
retiredPhase = phaseHome.findUniqueByDisplayName(sRETIRED);
cdTempHome = IBeanHomeLocator.lookup(session, TemplateContractIBeanHomeIfc.sHOME_NAME);
cdTempHome.upgradeToEdit(doc);
doc.setPhaseObjRef(retiredPhase.getLocalizedObjectReference());
cdTempHome.save(doc);
cdTempHome.downgradeToView(doc);
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.