Skip to main content

Notifications

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

How to add view filed to form datasource?

Posted on by 723
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?
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,240 Super User 2024 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
    Martin Dráb 230,149 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
    Shooowtek 723 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
    Martin Dráb 230,149 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans