Thursday 3 May 2018

Making Attachment Link Mandatory


Need to make the Attachment Link Bean mandatory. Use the below line of code in Process Form Request .

OAMessageAttachmentLinkBean oamessageattachmentlinkbean = (OAMessageAttachmentLinkBean)oawebbean.findChildRecursive("");

String attachVal = (String)oamessageattachmentlinkbean.getAttributeValue(oapagecontext.getRenderingContext(),TEXT_ATTR);

if("None".equals(attachVal))
{
throw new OAException(“Attachment mandatory”,OAException.ERROR);
}

1 comment:

  1. Hi, how can we do the same functionality in 12.2.10 ?? It seems value is not being stored and getAttributeValue doesnt work

    ReplyDelete