cancel
Showing results for 
Search instead for 
Did you mean: 

CLM Company-Organization Unit in Master Agreement

Ajay_Mathur
Advisor
Advisor
0 Kudos

Hi guys

In a CLM Master Agreement, after I select a company, I am able to select any organizational unit, even if it does not belong to that company. The system does not issue any error message. Is it standard behavior?

Shouldnt the system validate that only the organizational units which are belonging to a particular company be displayed?

Thanks and regards

Ajay

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Gov,

Could you let me know how you can get the script to trigger when someone is searching for the Organization Unit?

What script context can we use?

Thanks & Best Regards,

Reshma

Former Member
0 Kudos

Hi Reshma,

Incase you settled the above issue, kindly let me know how.

Thanks and regards,

Immanuel

former_member182290
Participant
0 Kudos

Hi,

It looks it is standard behaviour.

We have put in script to validate and added a query to query group so that user can search ORG UNIT by company code.

//----


//........................Gets company code

//----


getChildFieldByFieldId(parentFieldId,childFieldId){

value=doc.getExtensionField(parentFieldId).get();

if(hasValue(value)){

parenthome=IBeanHomeLocator.lookup(session,value);

parentbean=parenthome.find(value);

childField=parentbean.getExtensionField(childFieldId).get();

return childField;

}

return null;

}

//

//----


//...................................

//----


validateCompanyCodes(parentfieldId,childFieldId){

flag=false;

maCompanyCode=doc.getExtensionField("SAPCCODE").get();

companyCode=getChildFieldByFieldId(parentfieldId,childFieldId);

if(companyCode==null @or !hasValue(maCompanyCode)){

flag=false;

}else if(maCompanyCode.equals(companyCode)){

flag=true;

}

return flag;

}

purchasingOrgCompanyCodeMatch=validateCompanyCodes("SAPPORG","sapccode");