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, ...
Unanswered

How to add view filed to form datasource?

(0) ShareShare
ReportReport
Posted on by 843
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)
  • Martin Dráb Profile Picture
    237,722 Most Valuable Professional on at
    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?
  • Shooowtek Profile Picture
    843 on at
    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
    237,722 Most Valuable Professional on at
    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.
  • André Arnaud de Calavon Profile Picture
    300,777 Super User 2025 Season 2 on at
    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).

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 687 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 403 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans