Skip to main content

Notifications

Announcements

No record found.

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

How to add view filed to form datasource?

(0) ShareShare
ReportReport
Posted on by 725
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,622 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,354 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 725 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,354 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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,354 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans