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, ...
Suggested Answer

Extending LogisticsPostalAddress form

(1) ShareShare
ReportReport
Posted on by 329
I want to add the following functionality:
 
When I am looking at the detailpage of a customer and I click on 'add address' a sidepanel opens to insert the address.
 
This sidepanel contains the 'LogisticsPostalAddress' form. I want to simply, on the opening of the form, copy the customers' name into the name field of the new address.
 
For this I tried to extend the init, run and initializeViewOpenMode functions, but to non avail.
 
Example:
public void init()
    {
        next init();
        CustTable custTable;
        select custTable where custTable.AccountNum == this.custAccount;
        Details_Description.Text(custTable.name());
    }
 
I can see in a breakpoint that custTable.name() returns the correct value, but the field stays empty in each extension. 
I do notice that all the functions are called before I can visually see the form, so maybe that is the problem?
 
Could someone advice how to correctly implement this functionality?
I have the same question (0)
  • Martin Dráb Profile Picture
    238,734 Most Valuable Professional on at
    Moved from D365 general forum to the Finance forum, because its seems to be about F&O and not about D365 in general. Please let me know if you disagree.
  • Suggested answer
    Martin Dráb Profile Picture
    238,734 Most Valuable Professional on at
    Details_Description control is bound to a data source field, therefore you should assign the value there: logisticsLocation.Description = custTable.name().
     
    It's too early to do it in init() - initValue() method of LogisticsLocation data source is likely the right one.
     
    Also, it's wrong to assume that every address is related to a customer.
  • Mohit Rampal Profile Picture
    12,565 Moderator on at
    Hi, there is custAccount parm method and custAccount variable in LogisticsPostalAddress form. You can try using custAccount variable. You can either use OnInitValue event handler for InventLocation datasource or create extension class of form datasource.
     
    LogisticsLocation.Description = custAccount;

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 311

#3
Diego Mancassola Profile Picture

Diego Mancassola 271

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans