Skip to main content
Microsoft Dynamics AX forum
Unanswered

Display RetailVariantId from InventDimCombination X++

editSubscribe (0) ShareShare
ReportReport
Posted on by 339
I am trying to add new display method in inventDim table 
to display retailvariantid that in table InventDimCombination 
by select InventDimCombination 
where InventDimCombination .InventDimId == inventDim.InventDimId
 
but it Doesn't return anything , but also While using in active method on form (on hand list ) it works correctly but the problem that I need to move for every record to display it right 
 
How can I display variantid on this form ?
Attachments
  • Menna Allah Ahmed Profile Picture
    Menna Allah Ahmed 339 on at
    Display RetailVariantId from InventDimCombination X++
    Hi Martin , 
     
    I still can't find a solution to this problem , all requirments that I need to add (VariantId) from ( InventDimCombination ) table in (OnhandList) form , So If you can help me where should I add display method or how can I add this field 
  • Martin Dráb Profile Picture
    Martin Dráb 223,025 Super User on at
    Display RetailVariantId from InventDimCombination X++
    The phrase "to take something into account" means that you're aware of a fact and you consider it when doing something.
  • Menna Allah Ahmed Profile Picture
    Menna Allah Ahmed 339 on at
    Display RetailVariantId from InventDimCombination X++
    Which account did you mean ?
  • Martin Dráb Profile Picture
    Martin Dráb 223,025 Super User on at
    Display RetailVariantId from InventDimCombination X++
    You have two choices:
     
    Either you'll accept that your design is wrong, because it doesn't take into account the fact that the form doesn't show lines for individual InventDimIds, but it groups records together. Then you can look at suggestions in my previous reply.
     
    Or you insist on your current design and we can close this requirement as "impossible to implement".
  • Menna Allah Ahmed Profile Picture
    Menna Allah Ahmed 339 on at
    Display RetailVariantId from InventDimCombination X++
    my business problem to get variantId from dimensions and ItemId in this form OnHandList , I got that InventSum table have dimensions and ItemId but How Can I connect between dimensions on InventSum and InventDimCombination table 
    That's what I am asking about 
  • Martin Dráb Profile Picture
    Martin Dráb 223,025 Super User on at
    Display RetailVariantId from InventDimCombination X++
    That's exactly because of the grouping I mentioned.
     
    For example, if you display the warehouse dimensions only, the data will be grouped by InventLocationId and no other field in InventDim table will have any value. InventDimId will never have a value.
     
    You need to think about your business requirements (harder than just "I want to display RetailVariantId"). You need to decide whether there is a meaningful way to determine a single RetailVariantId for a group of different InventDim records, or the whole requirement doesn't really make sense when you think about it. I suspect it's the latter, but it really depends on what business problem users want to address. Showing RetailVariantId is not a business requirement, it's a particular technical design. It's quite possible that we must reject this design, while there is still a valid business requirement that just must to be dealt with in a different way. But we can't do it without first learning what the business problem is.
  • Menna Allah Ahmed Profile Picture
    Menna Allah Ahmed 339 on at
    Display RetailVariantId from InventDimCombination X++
    Yes I am working on InventOnhandItem form I need to display retailVariantId on it also I tried to put this display method on inventSum but InventDimID always null , How can I fix this ?
  • Martin Dráb Profile Picture
    Martin Dráb 223,025 Super User on at
    Display RetailVariantId from InventDimCombination X++
    Putting a display method on InventDim is wrong, because you have no ItemId there. And as you've accepted, the fact that your code ignores ItemId is a bug.
     
    What we need to do is analyzing your requirements and designing a different solution.
     
    Please tell us which form you're talking about and what you want achieve there. You mentioned an on hand list; don't forget that the usual form for on-hand quantity (such as InventOnhandItem) summarize values based on selected dimensions. If you're working with these forms, you must take this into account.
  • Menna Allah Ahmed Profile Picture
    Menna Allah Ahmed 339 on at
    Display RetailVariantId from InventDimCombination X++
    Okay Martin , That's why I am asking here , how can I get itemID ?
  • Martin Dráb Profile Picture
    Martin Dráb 223,025 Super User on at
    Display RetailVariantId from InventDimCombination X++
    That's my point.

Helpful resources

Quick Links

New Blog Features Released!

Check out the new community blog features for viewers and authors…

Demystifying Copilot with Sundar Raghavan

Sundar explains how Copilot for Service is meant to function separately...

Business Process Guidance Badges and New…

The Microsoft Success by Design is the framework for implementing Dynamics 365…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,281 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 223,025 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,140

Featured topics

Product updates

Dynamics 365 release plans