Options

Insert Dimension Set Entry Via Webservice

aadamsaadams Member Posts: 19
edited 2013-09-24 in NAV Three Tier
I have a webservice that imports sales invoices from our order management system into NAV 2013 using pages 43 "Sales Invoice" and 47 "Sales Invoice Subform". I now need to insert a global dimension value on each sales line, but can't seem to get that to work and the only examples I find to insert dimension sets refer to codeunit 408, which cannot be exposed as a webservice because its internal use of a record type object.

I tried to expose the page 480 "Edit Dimension Set Entries" and page 479 "Dimension Set Entries" but I get 404 errors when trying to call the Create method.

Is there a way to do this via webservice?

Comments

  • Options
    BardurKnudsenBardurKnudsen Member, Microsoft Employee Posts: 137
    Put your values into a temp table of type 480: TempDimSetEntry
    Then call:
    NewDimID := DimMgt.GetDimensionSetID(TempDimSetEntry);

    The DimMgt.GetDimensionSetID will automatically add missing entries.
    Bardur Knudsen
    Microsoft - Dynamics NAV
  • Options
    thegunzothegunzo Member Posts: 274
    When inserting into TempDimSetEntry make sure to do TempDimSetEntry.INSERT(TRUE);
    ________________________________
    Gunnar Gestsson
    Microsoft Certified IT Professional
    Dynamics NAV MVP
    http://www.dynamics.is
    http://Objects4NAV.com
  • Options
    aadamsaadams Member Posts: 19
    Thanks for the replies, however I do not have a developer license so am limited to either paying for someone to write a codeunit I can expose as a webservice or exposing a page as webservice, which does not give me access to any custom functions in the page.

    Is there a way to do this without a dev license?
  • Options
    BardurKnudsenBardurKnudsen Member, Microsoft Employee Posts: 137
    Well. To get back to your original question on inserting global dimensions: It should be sufficient just to enter the dimension values in the two global dimension fields. That will automatically update the dimension sets.
    Bardur Knudsen
    Microsoft - Dynamics NAV
Sign In or Register to comment.