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

Community site session details

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

How to add view filed to form datasource?

(0) ShareShare
ReportReport
Posted on by 815
Hello,
 
The business requirement is this: I need to add some fields from SalesLine and from CustTAble, resulting from a sales order, to InventOnHandItem forms.
These fields must be sortable and filterable, so display fields are not an option.
 
 
So I created a view with salesLine as the main data source and put it as an additional data source in the InventOnHandItem form and insert InventDim as join source:
//
 
I then created a relationship with my view in the InventDim table:
//
 
After adding fields from salesLine, only the value on the first record is visible. The rest are empty.
In addition, the rest of the records are duplicated. My guess is that this is the fault of a bad relationship between the table and the view.

Could someone suggest what relationship settings would be correct for my problem?
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    297,205 Super User 2025 Season 2 on at
    How to add view filed to form datasource?
    Hi Shooowtek,
     
    I do concur with Martin about a wrong technical approach. What is the reason for this requirement? You talked about a business requirement, but this only mentioned a technical approach (need to add fields) and not what the client needs to achieve. Why does the client need these fields? If it is for tracking purposes, the client can start from the serial numbers form and then go to the related inventory transactions to find the sales order and customer (party).
  • Martin Dráb Profile Picture
    235,800 Most Valuable Professional on at
    How to add view filed to form datasource?
    Okay, let's say you look for quantity of item A in warehouse W. There are InventSum records related to to twenty sales order lines from five customers, but they're all summarized together, because we're looking at quantity in the warehouse W regardless of serial numbers.
     
    What customer name do you want to show in such a case?
     
    I believe the answer is: there is nothing to show. The requirement doesn't make sense.
  • Shooowtek Profile Picture
    815 on at
    How to add view filed to form datasource?
    Hello Matin,
     
    In this client, there is a modification that, when creating an InventDim entry resulting from a sales order, inserts the value of SalesLine.InventTransId in InventDim.InventSerialId.

    And on this principle, I would like to add, for example, a customer name for a record whose InventSerialId exists SalesLine.InventTransId.

    I can easily do this with a field of display type. But the key customer requirement is the ability to filter and sort.
    I am looking for a solution to my problem. Is it possible to do this?
  • Martin Dráb Profile Picture
    235,800 Most Valuable Professional on at
    How to add view filed to form datasource?
    The on-hand quantity form shows inventory quantities aggregated by inventory dimension. Your attempted solution ignores the aggregation and also the fact that on-hand quantity doesn't have to be related to sales orders. Also, the Delayed link doesn't meet your requirements.
     
    You'll need to completely rethink your approach.
     
    An important question is: why exactly don't you use inventory dimensions? Aren't they there for this purpose?

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

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

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 665 User Group Leader

#2
Martin Dráb Profile Picture

Martin Dráb 595 Most Valuable Professional

#3
Yng Lih Profile Picture

Yng Lih 558

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans