on 2015 Oct 26 12:27 AM
Dear all,
When I update the master agreement status, it works fine,but the status is blank.
But when i leave it to the outside,it can show the status.
Code is as follows:
ValueListValueIBeanHomeIfc valueListHome = IBeanHomeLocator.lookup(session,doc.getStatusRef()); | ||||
doc.getIBeanHomeIfc().upgradeToEdit(doc); | ||||
ValueListValueIBeanIfc valueList = valueListHome.findUniqueByNameType("Executed Agreement",1); | ||||
doc.setStatusRef(valueList.getLocalizedObjectReference()); | ||||
doc.getIBeanHomeIfc().save(doc); | ||||
doc.getIBeanHomeIfc().downgradeToView(doc); |
I don't know what the reason is,please help me ,thank you very much.
Request clarification before answering.
Hi Jin bin,
Presuming that you are writing Document Life cycle Script of MA.
Try the below code and check if it works for you.
import com.sap.odp.api.doccommon.masterdata.ValueListValueIBeanHomeIfc;
valueListHome = IBeanHomeLocator.lookup(session,ValueListValueIBeanHomeIfc.sHOME_NAME);
valueList = valueListHome.findUniqueByNameType("Executed Agreement",1);
doc.setStatusRef(valueList.getLocalizedObjectReference());
Hope it helps!
Best,
Kushagra A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.