Tuesday, December 12, 2017

OAF Attachment : Make an attachment mandatory

at times you want to make an EBS OAF attachment mandatory for user. We cannot use queries to retrieve if attachment is added by the user or not because attachments are not yet committed to database.

In such scenario you do a mandatory (required) check for attachment table, link and inline attachment using the below code:

    private void validateAttachment(OAApplicationModule am) {
        OAAttachmentsAMImpl attachmentAM =
        OAViewObjectImpl attachVO =
        int count = attachVO.getFetchedRowCount();
        if (count <= 0) {
            throw new OAException("Please attach supporting documents.",

1 comment:

  1. Hi, Can you please suggest where i need to insert this code