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 =
(OAAttachmentsAMImpl)am.findApplicationModule("oracle_apps_fnd_server_OAAttachmentsAM");
OAViewObjectImpl attachVO =
(OAViewObjectImpl)attachmentAM.findViewObject("Attach_0_FndAttachedDocumentsDomExtensionVO");
int count = attachVO.getFetchedRowCount();
if (count <= 0) {
throw new OAException("Please attach supporting documents.",
OAException.ERROR);
}
}
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 =
(OAAttachmentsAMImpl)am.findApplicationModule("oracle_apps_fnd_server_OAAttachmentsAM");
OAViewObjectImpl attachVO =
(OAViewObjectImpl)attachmentAM.findViewObject("Attach_0_FndAttachedDocumentsDomExtensionVO");
int count = attachVO.getFetchedRowCount();
if (count <= 0) {
throw new OAException("Please attach supporting documents.",
OAException.ERROR);
}
}
Hi, Can you please suggest where i need to insert this code
ReplyDeleteOAViewObjectImpl attachVO =
ReplyDelete(OAViewObjectImpl)attachmentAM.findViewObject("Attach_0_FndAttachedDocumentsDomExtensionVO");
This is returning null when callin in co
String [] vos = attachmentAM.getViewObjectNames();
ReplyDeletefor(int i=0; i<vos.length; i++){
debug_msg(pageContext, "Vo Name: " + vos[i]);
}
add this code to see the names of the view objects in the Attachment AM.
canlı sex hattı
ReplyDeletejigolo arayan bayanlar
heets
5WPW
hatay
ReplyDeleteığdır
iskenderun
ısparta
istanbul
JYNS