save attament to new window

67 views
Skip to first unread message

gengohub id

unread,
Aug 3, 2022, 12:45:31 AM8/3/22
to iDempiere
I have an attachment from Window A, for example, then when I make a
payment I reflect the column from Window A, then in payment I need the
attachment data from window A which will automatically enter the
payment window, please provide a solution
image.png

Jesús Castillo

unread,
Aug 3, 2022, 10:49:03 AM8/3/22
to idem...@googlegroups.com
Hi, Let me know,

Window A has the same table of payments (C_Payment)? 

If your answer is yes, That is automatic.

If your answer is no, You must create a validation, event, or a custom behavior, for copying attachment record from table A to c_payment table, is same record attachemnt,  but different ad_tabel_id and record_id
 
Atte: Jesus Castillo.

Mailtrack Remitente notificado con
Mailtrack
08/03/22, 10:45:19 AM

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/CACYg8M4ONtzVLmtqF_7rOt_aCE-wy7txx-JOtasF7btXMyOXig%40mail.gmail.com.

gengohub id

unread,
Aug 3, 2022, 9:59:46 PM8/3/22
to iDempiere

different, but there is a link between the two tables, but I have tried, but the problem is the save method in the AttachmentFileSystem class,
public boolean save(MAttachment attach,MStorageProvider prov) {
String attachmentPathRoot = getAttachmentPathRoot(prov);
if (attach.m_items == null || attach.m_items.size() == 0) {
attach.setBinaryData(null);
return true;
}
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

even though I took from the binarydata field, which is in the AD_Attachment table  

Jesús Castillo

unread,
Aug 4, 2022, 1:03:57 PM8/4/22
to idem...@googlegroups.com
Hi,

You have a Window A with table A, and Window B with table B

Well, you have 2 options.

1-. In Window B, create a tab, with data table A
2-. Create an event for creating a new attachment record for table B, and record_id of B.
 
Atte: Jesus Castillo.

Mailtrack Remitente notificado con
Mailtrack
08/04/22, 01:01:07 PM

gengohub id

unread,
Aug 15, 2022, 5:14:46 AM8/15/22
to iDempiere
Reply all
Reply to author
Forward
0 new messages