Skip to main content
Business Central forum
Answered

Assigne Dimension Value to Sales Invoice API

editSubscribe (0) ShareShare
ReportReport
Posted on by

Hi! 

Does anybody know how we can assigne Dimension Values to Invoices via API '?

Thank you very much for your help

Best regards

Categories:
  • Verified answer
    RE: Assigne Dimension Value to Sales Invoice API

    Hello,

    I happen to have an example of creating a purchase order and assigning dimensions - below. Does that help you?

    Here is an example from the sdandard API PurchaseOrders, using Navigation properties on the API to create both lines and dimensions:

    purchaseOrder resource type - Business Central | Microsoft Docs

    POST api.businesscentral.dynamics.com/.../purchaseOrders

    BODY

    {

    "vendorNumber": "40000",

    "purchaseOrderLines":

    [

    {"itemId" : "3d0b2413-b0fd-ea11-bb48-000d3a2fece2"}

    ]

    ,

    "dimensionSetLines":[{

       "code": "DEPARTMENT",

       "valueCode": "SALES"

    }

    ]

    }

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 20,984 Super User on at
    RE: Assigne Dimension Value to Sales Invoice API

    Please try this

    api.businesscentral.dynamics.com/.../salesInvoiceLines

  • Sleina Profile Picture
    Sleina on at
    RE: Assigne Dimension Value to Sales Invoice API

    Hi Thank you for your fast response! Which Base API would you use for this ? Sales Invoice Lines?

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 20,984 Super User on at
    RE: Assigne Dimension Value to Sales Invoice API

    Hi,

    You can try to pass Shortcut Dim1  and Shortcut Dim2 with the API.

    Thanks.

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Sundar…

Industry experts answer burning questions directly from our amazing Community…

Enabling Copilot Case and Conversation…

Agents can easily recap an ongoing chat, transcribe a voice conversation…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 282,978 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,562 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans