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

Notifications

Announcements

No record found.

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
    237,789 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
    237,789 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 663 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 540 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 348 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans