web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Validate default dimension using advance rule structure

(0) ShareShare
ReportReport
Posted on by 683

I need to validate the financial dimensions on sales order with the advance rules structure setup.  The validation would be done before invoice or delivery note. I have checked the DimensionValidation::validateDefaultDimension method but it only validates the dimension attribute values. I also had a look on DimensionValidation::validateByTreeForCombination method but this method is used with combination id and i think this requires the main account as well. I am wondering whether it is possible to validate it using default dimension or not? 

*This post is locked for comments

I have the same question (0)
  • lally Profile Picture
    8 on at
    RE: Validate default dimension using advance rule structure

    At what level you want to validate and what are all dimensions you want to validate .. Please explain with an example to understand your query.

  • zeeshan.shaikh Profile Picture
    683 on at
    RE: Validate default dimension using advance rule structure

    I need to validate at the time of confirmation. All the financial dimensions such as costCenter, division, department etc except main account.

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: Validate default dimension using advance rule structure

    Hello Ali Zeeshan Shaikh,

    At which point in time do you want to have the financial dimensions checked?

    Checking default dimensions that get inherited e.g. from customer record that trigger a warning/error message when creating the sales order might not make much sense, as you might get a lot of messages if e.g. default dimension values are not correctly setup at the customer record level resulting in much frustration for those people that setup new sales orders. A good point for checking might possibly be when sales orders get confirmed but I believe - as lally said - that you should provide some more information about your business process and what and when you want to have financial dimensions checked.

    Best regards,

    Ludwig

  • zeeshan.shaikh Profile Picture
    683 on at
    RE: Validate default dimension using advance rule structure

    Dear Ludwig,

    Yes as i already told above, I need to validate at the time of confirmation. All the financial dimensions such as costCenter, division, department etc except main account needs to be validated with advance rule structure.

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: Validate default dimension using advance rule structure

    Good morning Ali Zeeshan Shaikh,

    I see. Probably your best chance is getting into contact with a developer who can help you with the implementation in your environment. It should not bee too difficult as the code is already there and checked at a later point. All the best,

    Ludwig

  • April Olson Profile Picture
    on at
    RE: Validate default dimension using advance rule structure

    Hello,

    I inquired with our engineers on this and they have some comments to lead you in the right direction:

    You are unable to validate a default dimension (one without a main account) against the account structure/rules as we generally need a main account to determine the account structure. 

    We do not have the ability to validate default dimensions against rule structures directly. Since they are defaults they could be valid at different times and therefore we only validate when the ledger dimension is created and transaction is posted against the whole combination. 

    If one obtains a main account and creates a ledger dimension from it (i.e. using DimensionDefaultingService::createLedgerDimension). Then, this ledger dimension can be supplied to the other API that he found (validateByTreeForCombination) and that will validate against the current structures/rules associated to the ledger.

  • zeeshan.shaikh Profile Picture
    683 on at
    RE: Validate default dimension using advance rule structure

    Hello April Olson,

    Thank you,

    I also had the same understanding as we don't have main account until we don't have any financial impact of it.

    But still I am looking if we can use the advance rules structure setup to validate the dimensions where we don't have main account.

  • Krishnendu Profile Picture
    230 on at
    RE: Validate default dimension using advance rule structure

    Hi 
    April Olson 

    I am able to validate the ledger dimensions against the account structure validation using LedgerDimensionValidationHelper::validateByTree(passing the ledger dimension recid) but when I am trying to validate the ledger dimension against the advance rules structure also 

    LedgerDimensionValidationHelper::validateByTreeForCombination(DimensionStorage::findById(LedgerDimensionFacade::serviceCreateLedgerDimension)

    It doesnt validate everytime it gives the validation have passed.

    Kindly suggest.

    I am in 7.3 version currently 

  • Krishnendu Profile Picture
    230 on at
    RE: Validate default dimension using advance rule structure

    Sorry my bad ,LedgerDimensionValidationHelper::validateByTreeForCombination(DimensionStorage::findById(LedgerDimensionFacade::serviceCreateLedgerDimension)

    works fine thanks april

  • Suggested answer
    April Olson Profile Picture
    on at
    RE: Validate default dimension using advance rule structure

    Hello,

    You cannot validate the dimensions with the account structure on the sales order because we do not know the main account. The main account is what we use for all validation with account structures.

    Thanks,

    April

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans