Hi folks,
I have a need to ensure that collection letter field in dialog for create customer collection letter , show only 1 enum value out of all enum values for collectionlettercode.
Further analyzing i realized that the values are coming from public object Dialog() method of custcollectionlettercreate class & did change the following text in my extended class.
dialogCustCollectionLetterCode = dialogRunbase.addFieldValue(enumStr(CustCollectionLetterCode), collectionLetterCode, "@SYS13960") in orginal class to
dialogCustCollectionLetterCode = dialogRunbase.addFieldValue(enumstr(CustCollectionLetterCode::All)), collectionLetterCode, "@SYS13960"); in my extension class.
I tried customizing this class as per my need using COC, so i created class & enter the following code , but getting the following errors at red line
1. Not all path return value in dialog &
2. ")" expected
[ExtensionOf(classstr(CustCollectionLetterCreate))]
final class Myclass_CustCollectionLetterCreate_Extension
{
public Object dialog()
{
next dialog();
dialogCustCollectionLetterCode = dialogRunbase.addFieldValue(enumstr(CustCollectionLetterCode::All)), collectionLetterCode, "@SYS13960");
}
}
I understand that this method has to return object , however I cannot simply put a return code in my extension, please suggest how to do COC to address my requirement.