I'm doing a data integration and need to set or create the Dimension set id for GJL lines( multiple dimensions up to 7 ), if this possible using the API?.. trying different way but no success yet; anyone advise help or sample? , thank you very much, really appreciated.
I am not sure what it is that you expect from us. You do not provide much information of anything. What version of NAV are we talking about, what have you tried and what is your exact question ? Especially as you NEVER need to create the Dimension Set ID at all, it is done automatically based upon the dimension values you put into a General Journal Line.
Apologies for the missed information, I'm doing a data integration to online Business Central 365 via API ( wsdl or odata)) and I' m a C++ developer, ; ok when adding general journal lines ( i.e wsdl or service workflowGenJournalLines ), dimensionSetId property is a reference to Dimension Set entry table ( right?) Dimension SetEntries ; my question , how I can create Dimension Sets in order to add the right id to the GJL; now per your comment ,if I don't need to create the dimension set id , can you share how to add multiple dimensions to GJL programmatically in order to get the right set id ? via API (wsdl or odata) ?
Thank you very much
You should NEVER do stuff like this unless you fully understand what fields to put data into and what not to.. Just because NAV now is API wsdl enabled it does not mean that anyone should do it...ERP is not just "another integration thingie"..
The Answer to your question is that you probably need to create a webservice with fields from the General Journal Line where the fields ShortCut Dimension 1 to 8 can be filled out. When the Gen. Journal Line then is inserted it will be validated an the Dimension set ID is found.If you don't know what I am talking about., then you are surely going to get other issues with some of the other fields - and then you have to find a NAV developer to help you.
I have to agree with Palle Arentoft on this. Developing for Business Central (or for that matter other ERP applications) is not like developing other applications. It has a complex data model and if just a tiny setting is wrong, then the whole system may malfunction. Everything is bound into debit and credit postings in the G/L entries. On top of that all ERP apps are more or less government regulated, meaning they function in a way that they cannot easily be manipulated or be used by the users for fraud.
But at the same time most of Business Central follows a number of rather simple design patterns, making it easy for developers to find the right "integration points" - at least once you understand the basics. And that doesn't really matter if you are a "native" Dynamics 365 Business Central (AL-C/AL) developer or a C++ developer.
If you take the general journal lines, then they contain a lot of fields. Some of them are required, while others (i.e. dimension set id) are automatically generated. Before trying to do something via C++ and web services, then you should start by doing the same process manually the BC client. Then you can turn on the debugger, and step by step follow the parts you need to "duplicate" in your code and which are handled by BC.
Thankyou Erik for writing this.. It is exactly what I would have written if I had more time yesterday.
Hi Palle and Erik;
Thank you very much for your advise, I'm learning as well on the BC side, so Palle this is a learning curve for me and my question was for that purpose, (?), learning, right?. so no offense, my integration scenario is purely a test enviroment (Sandbox) and came to your forum for the sole purpose of find out something (learn) I could not find in others. Palle luckily I know what your talking about it , but I disagree that I should 'NEVER' try, if I don't try how do I learn ?, anyway and once again appreciate your advise. Erik I do agree : "Business Central follows a number of rather simple design patterns, making it easy for developers to find the right "integration points" ..Gracias
That's good and I understand that. We have just seen it so many times (this forum was started in 1995) - new developers basically unfamiliar with NAV/BC, with a background like yours, being thrown into a new job as a NAV developer. They are often given no real training, but still they are expected to deliver right away. Maybe they are given a number of test assignments and told ask on DUG or Mibuso, if you're in doubt of something. They have to learn as they go and really have no idea about what they are working with. That both makes me sad (on their behalf) and angry that any professional Dynamics partner (or customer) can treat their employees this way.
Where as this can be understood, then what also always surprises me, is how anyone who is familiar with the IT industry, as a developer most likely already uses sites like Stackoverflow.com, can ask what really is a complex question, without including the almost all the details, and still expect an answer. They only spend a few seconds writing their questions, but expect someone else to spend their time guessing and spend a lot more time providing them the the answer.
This is nothing personal and you're not the only one. It's basically most of the questions these days. I guess I'm just a grumpy old man these days too.
Not Erik you'r right..I'll be more detailed if another of future question , apologies for that.