Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

Can I use " Map method " to populate "field name" and "price" on Form? Form data source table?

(0) ShareShare
ReportReport
Posted on by 208
I have developed a map added fields as :
//
 
Added Modified field method as:
(on map the field price and name is populated when item is selected ,as I have tested it on table browser)
 
//
and then in form data source table I have given reference of my /Map/ fields to the table fields.(Field EDT's are same for table and map fields).
as:
//
On form, fields name and price is not populating when item is selected.
Can I perform this functionality through map? 
 
 
 
  • Martin Dráb Profile Picture
    Martin Dráb 230,900 Most Valuable Professional on at
    Can I use " Map method " to populate "field name" and "price" on Form? Form data source table?
    I'm saying that you should use the debugger to find out whether your code gets called or not. When you find it's not, you have the answer to your question why "On form, fields name and price is not populating when item is selected". Next time, use the debugger before asking in the forum. You'll either solve the problem by yourself, or you'll have more information to share in the forum.
     
    Then you can follow my design.
     
    Imagine a table map as a custom class with methods. The system doesn't know anything about your map and method there; it's up to you to call them.
     
    You could call modifiedMethod() of your map, but I wouldn't use modifiedMethod(). I would design a method for the particular purpose, e.g. onItemChanged().
  • JJDunaid Profile Picture
    JJDunaid 208 on at
    Can I use " Map method " to populate "field name" and "price" on Form? Form data source table?
     Sir Martin Dráb ? 
  • JJDunaid Profile Picture
    JJDunaid 208 on at
    Can I use " Map method " to populate "field name" and "price" on Form? Form data source table?
    Hi Martin Dráb â€‹â€‹â€‹â€‹â€‹â€‹â€‹,
    So, in your reply you are saying that I have to override my table "Modified field" method and call my maps 'Modified field' method in my table "Modified field" method?
    basically I want to implement methods from maps to table is it possible?! and its just for information and learning purpose .
     
     
  • Martin Dráb Profile Picture
    Martin Dráb 230,900 Most Valuable Professional on at
    Can I use " Map method " to populate "field name" and "price" on Form? Form data source table?
    First of all, is modifiedField() method of the map called at all? I wouldn't expect that.
     
    I think that you should override modifiedField() method of your table and call a method of your map from there (this.ItemInfoMap::someMethod()).
     
    By the way, referring to field IDs is often tricky in maps. If you can avoid it, you can make your life easier. For example, you can check the field ID in modifiedField() of your table and have a method like onItemChange() in the map.
  • JJDunaid Profile Picture
    JJDunaid 208 on at
    Can I use " Map method " to populate "field name" and "price" on Form? Form data source table?
    Martin Dráb and GirishS Sir any suggestion from your sides?
     

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,074 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,900 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans