Create Dimension Set Entries via Web Services

aadamsaadams Member Posts: 19
edited 2014-04-22 in NAV Three Tier
Hello all,

In NAV 2013 r2, is there a way to create dimension sets via web services? I am importing customers into NAV via C# web service to page 21. Up until now we only needed 2 dimensions so I was able to use the exposed global dimensions 1 and 2. However, now I have been asked to add a third, which means I need to create a dimension set and attach it to the customer card somehow.

I do not have a developers license, so I am trying to expose the dimension set/value related pages and use them to create the dimension set entries, but so far have been unable to. I was expecting to be able to use the "Default Dimensions (540)" page, and add the 3 dimensions/values I needed but have not been able to get that to work.

Can anyone help point me in the correct direction? It seems like this would be a very common requirement for integrating third party systems with NAV, but I have not found any information that would help in any way. Any help is much appreciated.

Comments

  • ara3nara3n Member Posts: 9,256
    I suggest to contact your partner to create a codeunit that accepts dimensions and returns a dimension set ID.
    Publish the CU as webservice. That will be the simplest way to do it.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • aadamsaadams Member Posts: 19
    Thank you ara3n for the reply. I guess we will have to go that route.

    It is a shame that this functionality isn't working in NAV out of the box. Seems like a very basic need that anyone interfacing with NAV would require. Perhaps there is a generic codeunit out there already? Anyone care to share?
  • aadamsaadams Member Posts: 19
    Also, ara3n, with your suggestion of a codeunit returning the dimension set ID, how would I tie that to the customer? I'm using the customer card page 21 and don't see dimension set ID as an available field.
  • ara3nara3n Member Posts: 9,256
    I thought you needed on a transaction. If you need the dimensions, you can publish default dimension page.
    You'll need to add the two additional fields to the page. table id and No.

    You could probably do it with customer license, they usually have page designer on their license. just add the two fields and you can populate them from webservice.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • aadamsaadams Member Posts: 19
    Thanks again ara3n! I was able to get this working using the Default Dimensions page after adding the table ID and No fields.

    In case someone else stumbles across this; I found that when creating a new Default Dimensions record you have to set the "Table_IDSpecified" to true before updating or it will ignore your table ID and create the record with table ID zero.
Sign In or Register to comment.