web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Customer Delivery Postal Address

(0) ShareShare
ReportReport
Posted on by 518

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

I have the same question (0)
  • udaY-ch Profile Picture
    5,175 on at

    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

  • André Arnaud de Calavon Profile Picture
    305,069 Super User 2026 Season 1 on at

    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.

  • Siddhant Singh Profile Picture
    518 on at

    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.

    Thanks and regards

    Siddhant Singh

  • udaY-ch Profile Picture
    5,175 on at

    Hi

    Try this,

    custTable = CustTable::find(tmpPSAProjInvoiceHeader.CustAccountNum);

    tmpPSAProjInvoiceHeader.CustAddress = Dirparty::GetpostalAddressbytype(custTable.party, LogisticsLocationRoleType::Delivery);

    Uday

  • Siddhant Singh Profile Picture
    518 on at

    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.

    Thanks and regards

    Siddhant Singh

  • udaY-ch Profile Picture
    5,175 on at

    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)

    Uday

  • Siddhant Singh Profile Picture
    518 on at

    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

    Siddhant Singh

  • udaY-ch Profile Picture
    5,175 on at

    Hi,

    Where do you want to see the updated customer delivery address?

    Uday

  • Siddhant Singh Profile Picture
    518 on at

    Hi Uday,

    After Updating customer address, it should be shown on the report of new invoice that get posted.

    Thanks and regards

    Siddhant Singh

  • Suggested answer
    udaY-ch Profile Picture
    5,175 on at

    Hi Sid

    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);        
        }    
    }

    Uday

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 758

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 655 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 496

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans