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 :
Small and medium business | Business Central, N...
Suggested Answer

Updating a line after a change to dimensions

(1) ShareShare
ReportReport
Posted on by 375
Hey Everyone:
 
I've got one heck of an arcane question.  I've figured out how to make this work on a reference system but it does not survive contact with a customer-facing system.
 
I have a routine that when a dimension code in one dimension is set, it sets two other dimensions to certain values.  In this example, let's say when group is set to 2001, group type should become CEO and territory should become 04.  
 
Here's my journal entry as it starts:
 
I select 2001 and it correctly sets the group type, but not the territory code (which is not one of the default global shortcut dimensions - group type is):
(Incidentally, at this point in the screenshots, the entry has the correct dimension set id for the combination of dimension sets that I want; the UI hasn't redrawn the territory code.)
 
Now....  When I click off that row and back on, it refreshes to show that my change did indeed take effect:
 
I do not need instruction on how to set dimensions using dimension set id, I have that figured out.
 
But what I am asking for help is on the update to the row.  I have an event subscription on the page's OnAfterValidateShortcutDimCode which calls the journal line's ShowShortcutDimCode() event.  That works on my reference system quite well, but totally fails on my customer system.
 
Does anyone have any thoughts of how I can refresh these fields without extending the journal entry page?  (I'm trying to avoid that for other reasons.)
 
Thank you in advance!
-J
 
I have the same question (0)
  • Suggested answer
    OussamaSabbouh Profile Picture
    5,061 on at
    Updating a line after a change to dimensions
    Hello,
     
    First we cannot see screenshots, they are broken.
     
    Your dimension updates work, only the UI refresh doesn’t.
    From an event subscriber, you cannot force-refresh non-shortcut dimension fields.
    Only the page (CurrPage) can repaint them, so they update only when you leave/return to the line.
     
    No way around this without extending the page.
     
    Regards,
    Oussama Sabbouh
  • James McCullough Profile Picture
    375 on at
    Updating a line after a change to dimensions
    Bah.  Thank you.  I was afraid that might be the case, because the "secondary" dimensions are being presented as page variables.  What I don't get is why it works on my reference system?  Unless...  Well, I have dimension set id exposed as a field on my reference system; that might be it.
     
    As to the missing screenshots - thank you.  I thought they might just be taking time to actually load, but I guess they didn't work.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,377

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,696 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,512 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans