Contact email address on Purchase Order.

Can anyone tell me where the contact email address is held on a purchase order? I need to add it to the Purchase Order print. The only relevant tables I can identify are VendPurchOrderJour, VendPurchOrderTrans and VendPurchOrderPurchlink.

The required Email is in ContactPerson, but I cant see how this is linked to the report.

Hi,

It gets copied from Vendor master. See here - \Data Dictionary\Tables\PurchTable\Methods\initFromVendTable

Best wishes,

The contact email will be there in PurchTable - see General Tab → Contact Information in Purchase order.

If you want this in your report - write a display method in the header of the PurchPurchaseOrder Report

in the display method - PurchTable::find(vendPurchOrderJour.PurchId).Email

It is not written to the purchase order, the contact is there if defined and you need to go to the contact record selected to get the email.

Thanks for your full answer. I have the correct email on the report now…

you can do this in many way. PO form :

General Tab> Contact Information mail id is there…

you have to create same contact information field in Vendinvoicejour Table.

One initfrompurchtable method is there there you write the code like this

this.mailid = Purchtable.MailId;

while doing the Invoice the class(PurchformLetter_Invoice)will call this method and it will assign the purch table value(Mail Id) to Vend Invoice jour Table.

In Report

Directly drag and drop your field in report,

Because report will take the value from VendInvoiceJour Table.

Example,

Purchace order “001” you have mailid called “xyz@mail.com” you are invoicing now.

After Invoicing the xyz@mail.com will be there in VendInvoiceJour Table,

So you will have the track there.

if u r changing the mailid “xyz@mail.com” to “abc@mail.com” after invoicing for same PO"001"

Again Invoice Same PO

For First Invoice ID you will have xyz@mail.com

Second Invoice you will have abc@mail.com