Restricting posting to G/L account to a range of dim. values

djswimdjswim Member Posts: 277
This is something that my brother and I have both done before, but neither of us can remember how the (*&% we did it:

Let's say my Dim. Values for DEPT are:

10
20
30
40
50

How do I restrict postings to an account to just 10,30, and 50 (or any combination)? This isn't dependent on any other dimension's value.

Thanks in advance!
"OMG ALL MY DATA IS GONE"
"Show All..."
"Oh..."

Comments

  • Alex_ChowAlex_Chow Member Posts: 5,063
    I think you can only restrict conflicting dimensions. i.e. Department 10 cannot be associated with Project 20.
  • ara3nara3n Member Posts: 9,256
    It could be a modification.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • djswimdjswim Member Posts: 277
    :(

    That's what I was afraid of... what's really scary is I may have written it myself though looking back I don't know how I would have done that... :)

    Anyone else have any ideas?
    "OMG ALL MY DATA IS GONE"
    "Show All..."
    "Oh..."
  • ara3nara3n Member Posts: 9,256
    Well when I write code, I write so that when the next developer comes to read wouldn't have problems understanding the code. That next developer could also be me.


    One thing that is guaranteed in NAV is that somebody else will read your code. Business requirements change every day. Clients upgrade.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • djswimdjswim Member Posts: 277
    Oh, I document everything I do really well, problem is, if I'm not working with that client anymore or was working with a VAR, I can't exactly go back to the client/VAR and ask to get development rights to their DB so I can see my code :)

    And I can't take all my objects with me, that would violate my employment agreement(s) :wink:
    "OMG ALL MY DATA IS GONE"
    "Show All..."
    "Oh..."
  • ara3nara3n Member Posts: 9,256
    Easy solution is find one good employer and stick with them. :mrgreen:

    I've been with my company for 7 years now, and I haven't found anything that is better.

    I could go solo but it comes with risks.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Alex_ChowAlex_Chow Member Posts: 5,063
    djswim wrote:
    :(

    That's what I was afraid of... what's really scary is I may have written it myself though looking back I don't know how I would have done that... :)

    Anyone else have any ideas?

    Dig your brain a little deeper and find that modification.

    You can modify codeunit 408 to accomplish your goals. However, the dimension restrictions would need to be a separate table since Default Dimension table only has will not allow you to ahve more than 1 dimension. :(
  • djswimdjswim Member Posts: 277
    I'm not such a good developer that I would modify that codeunit except to put one line in at it's initiation to call another codeunit that I made from scratch. In general I stay away from anything regarding the posting routines. I'm really good at testing and everything, but they still scare me a little (read: to death)... I can almost always find another way :)

    Edited to add: Post 100! Woot! \:D/
    "OMG ALL MY DATA IS GONE"
    "Show All..."
    "Oh..."
  • ara3nara3n Member Posts: 9,256
    :) Congrats. Last week I was rewriting a mod one of our developer did for average costing and it was not fun, but it works now.

    I think if you spend enough time with posting routines, you'll learn that certain are easy and other ones are hard, and you try to steer clients away from the hard/ high risk ones.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.