Notifications
Announcements
No record found.
Hi All,
I have updated the delivery postal address of a customer and now i am printing in Invoice from Project management > Project Invoice.
But after updating the customer delivery address also, its not reflecting the updated address. Its reflecting the old address only.
Can anyone help how can we reflect the updated customer address.
Thanks and regards
Siddhant Singh
Hi,
The delivery address comes from ProjInvoiceJour table. If you want to see the updated delivery address then ProjInvoiceJour is the table which needs to be updated.
This cannot be updated from the front end and this requires developer help.
Uday
Hi Siddhant,
If your question is about already posted invoices, then you can't change the address used as you have to reproduce the invoice as it was posted. The address reference is kept on the invoice tables.
Does this changed address also have the purpose for invoices? A delivery address is different from an invoice address.
Hi Andre,
I have inserted a new record in LogisticsPostalAddress from Cusromer > Address > Delivery address.
But when i am going to post the new invoice. The new inserted address is not picked up. Also i have set the address to primary.
Below is the code to fetch the customer address in report.
tmpPSAProjInvoiceHeader.CustAddress = LogisticsPostalAddress::findRecId(projInvoiceJour.DeliveryPostalAddress).Address;
My requirement is that it should pick up the new inserted address. How can i achieve it.
Hi
Try this,
custTable = CustTable::find(tmpPSAProjInvoiceHeader.CustAccountNum);
tmpPSAProjInvoiceHeader.CustAddress = Dirparty::GetpostalAddressbytype(custTable.party, LogisticsLocationRoleType::Delivery);
HI Uday,
Do we really need to customize this. As there must me functionality in which new address gets updated when we do any change.
Hi Sid
As said before, standard report derives CustAddress from ProjInvoiceJour table. The table will have the old reference
of the Delivery postal address. For upcoming project invoices, new delivery address will be used automatically when creating the project invoice.
"This customization is required to show the new delivery postal address for the old project invoices which will have old delivery address." If the business is okay to see the new delivery postal address for the upcoming project invoices then fine we don't need this customization at all.
This customization will also help in case of the delivery address change in the future. (Only for project invoice report)
Hi Uday,
Even the new invoices also not showing the updated Address.
Below code show, its selecting firstonly.
public static LogisticsPostalAddress findRecId( RecId _recId, boolean _update = false, utcdatetime _validFrom = DateTimeUtil::minValue(), utcdatetime _validTo = DateTimeUtil::maxValue()) { LogisticsPostalAddress logisticsAddress; if (_recId) { logisticsAddress.selectForUpdate(_update); select firstonly validtimestate(_validFrom, _validTo) logisticsAddress where logisticsAddress.RecId == _recId; } return logisticsAddress; }
Can we get address using primary address.
Thanks and resgards
Where do you want to see the updated customer delivery address?
After Updating customer address, it should be shown on the report of new invoice that get posted.
Guessing the customer address is updated. You need to create event handler to insert the address into CustAddress from customer address of type delivery.
Class PSAProjInvoiceHeaderTmpEventHandler { [DataEventHandlerAttribute(tableStr(PSAProjInvoiceHeaderTmp), DataEventType::Inserting)] public static void PSAProjInvoiceHeaderTmpInsertEvent(Common c, DataEventArgs e) { PSAProjInvoiceHeaderTmp tempTable = c; CustTable custTable = CustTable::find(tempTable.CustAccountNum); tempTable.CustAddress = Dirparty::GetpostalAddressbytype(custTable.party, LogisticsLocationRoleType::Delivery); } }
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 663 Most Valuable Professional
André Arnaud de Cal... 540 Super User 2025 Season 2
Sohaib Cheema 348 User Group Leader