Skip to Content
0

Fetch Values of Organizational Unit using Script

Jan 19, 2017 at 10:34 PM

17

avatar image

Hello Experts,

I am new to CLM. I am working on a requirement where the system should read the values present in the Organization Unit. If it finds certain values, the system should if an extension field (boolean is true). If it matches with one of the values from the organization unit and the boolean field is false, the system should throw a warning message. I have written the code below, however, i get an error message stating getDisplayName(); cant be found. I am stuck and unable to proceed further. Please help me

orgBeanHome = IBeanHomeLocator.lookup(session, com.sap.odp.api.doccommon.masterdata.purchasing.BusinessUnitIBeanHomeIfc.sHOME_NAME);

OrgUnitRef = orgBeanHome.getOrganizationalUnitRef(); OrgUnitHome = IBeanHomeLocator.lookup(session,OrgUnitRef );

OrgUnit = OrgUnitHome.find(OrgUnitRef);

if(OrgUnit.getDisplayName().equals("ABC") @or orgUnit.getDisplayName().equals("XYZ") {

if(!hasValue(doc.getExtensionField("ma_approval").get()))

{ throw new ApplicationException(session, "Approve the MA");

}

}

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers