Hi Raj,
Please try below code
String CLASS_NAME = "Document Validation";
String ERR_MES = "No File Attached";
//check the phase then you can procedd with the code
IBeanFieldMdIfc cont = (IBeanFieldMdIfc)doc.getFieldMetadata("SIGNED_DOC");
//SIGNED_DOC is the technical filed name for attachment
AttachmentIfc attachClObj = (AttachmentIfc)cont.get(doc);
if( attachClObj == null )
{
throwdoc.createApplicationException(null,CLASS_NAME,ERR_MES);
}
Regarrds,
Pallavi