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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

XMLPort - Purchase invoice with shortcut dimension 3 and 4

(5) ShareShare
ReportReport
Posted on by 32
I have an xmlport for purchase invoices that works well, but we need to add shortcut dimension 3 and 4 to it, but those fields don't exist on the purchase line, only in the dimension set ID. How can I go about handling this? is there a way to look up the dimension set ID given the values of dimensions 1-4, or someway to populate that?
I have the same question (0)
  • Suggested answer
    OussamaSabbouh Profile Picture
    6,340 on at
    Hello,
     
    You can’t write Shortcut Dimensions 3/4 directly on purchase lines. You must build the Dimension Set ID instead. In your XMLport, read the dimension values, then use Codeunit Dimension Management to add/update those dimensions and get a Dimension Set ID, and assign it to the line. BC will reuse an existing set or create a new one automatically.
     
    Regards, 
    Oussama Sabbouh 
  • Suggested answer
    YUN ZHU Profile Picture
    95,729 Super User 2025 Season 2 on at
    Hi, hope the followings can give you some hints
    How to add Shortcut Dimensions on the page in Dynamics 365 Business Central (Shortcut Dimension 3 ~ 8)
    Dynamics 365 Business Central: How to add Dimensions to the page (Other than Global and Shortcut dimensions)
    Dynamics 365 Business Central: Use shortcut dimensions in G/L entries for financial reporting
     
    Thanks.
    ZHU
  • Suggested answer
    Pallavi Phade Profile Picture
    4,122 on at
    Namaste @CU13081445-1
     
     
    Shortcut3, Shortcut 4 Dimension code field does not present in purchase line, headers. You can achieve importing in below steps.
     
     
    1) Add two text fields in Xmlport
    2) when you insert in the table use Procedure ValidateShortcutDimCode() oninsert()trigger of xmlport
     
     
    In your case it will
    ValidateShortcutDimCode(3,shortcut3);
    ValidateShortcutDimCode(4,shortcut4);
     
    3) it will update dimensions, dimension setid automatically
     
    Check in sandbox.
     
     
    Warm Regards
    Pallavi Phade 
    www.linkedin.com/in/pallaviphade131116
     

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 2,238

#2
YUN ZHU Profile Picture

YUN ZHU 773 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 630

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans