Coder Social home page Coder Social logo

Comments (8)

JesperSchulz avatar JesperSchulz commented on July 23, 2024 1

Unfortunately you cannot extend dynamic table relations yet. It is on our backlog, but hasn't been been picked up yet. I will add a +1 request from you :-)

from alappextensions.

gnaaktgeboren avatar gnaaktgeboren commented on July 23, 2024

Please add a +1 request for me to.

from alappextensions.

JannikBausager avatar JannikBausager commented on July 23, 2024

Please describe scenario for this - the user can set the default Dimensions within Business Central - in which scenarios is it needed to set this from an Extension.

from alappextensions.

janhofmann24 avatar janhofmann24 commented on July 23, 2024

Our ISV solution is in the automotive retail space. Therefor we are dealing with Vehciles.
When selling something to a Customer (A Sparepart or a Service), it is often required to select for which specific Vehicle that Sale is done. You select the Vehicle in the Document Header.

So we have the additional Vehicle Master Entity and would like to be able to derive Dimensions from the selection based on the standard Default Dimension Concept.

from alappextensions.

JannikBausager avatar JannikBausager commented on July 23, 2024

Initially you mention you want to insert a default dimension, however for the scenario you mention that you want to "derive" e.g. get the default dimension, can't you get the default dimension in this scenario?

from alappextensions.

janhofmann24 avatar janhofmann24 commented on July 23, 2024

Maybe my wording is a bit confusing. Let me explain the scenario again:

We have a Vehicle Table, a Vehicle Card and a Vehicle List.
On the Vehicle Card and Vehicle List Pages I want to add the same Dimension related functions like on e.g. Customer Card (Dimensions) and List (Dimensions-Single, Dimensions-Multiple) in order to be able to assign a Default Dimension to the Vehicle.

When I now use one of the Vehicles in a Sales Order, I want the Dimension Set ID not only be derived from the Default Dimensions of Customer, Salesperson/Purchaser, Campaign, Responsibility Center and Customer Template, but additionally from the Vehicle.

But due to the Table Relation of the Table ID field in the Default Dimension Table, it is not possible to register/insert any records not foreseen by the NAV Standard.
The same problem also exists in the Default Dimension Priority Table.

In general it would be great if we could extend conditional Table Relations as @JesperSchulz suggested.

from alappextensions.

JannikBausager avatar JannikBausager commented on July 23, 2024

Thank you - got it, we will investigate possible solutions to this.

from alappextensions.

StanPesotskiy avatar StanPesotskiy commented on July 23, 2024

Here is the solution we came up with:
The table relation is blanked and replaced by the code in trigger "No.".OnValidate() that verifies if the record with primary key equal to "No." in the table set in "Table ID" field.
The removed table relation had been handling the renaming of the related tables. This is now implemented by the call of function COD408.RenameDefaultDim() in the trigger OnRename() of all related tables.

Extensibility:
"Table ID" in table 352 is verified against the list of table IDs returned by COD408.DefaultDimObjectNoList().
This function collects all tables that match the following conditions:

  • have fields related to global dimensions
  • do not have "Dimension Set ID" field
  • their primary key include one field

If the extension table satisfies these conditions, its ID will be accepted by table 352 automatically.
If the table does not get to the list it can still be added by subscription to the event COD408.OnAfterSetupObjectNoList() and modifying the buffer table.

from alappextensions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.