I am using API While adding Invoice how can i add product to invoice so that when i am checking details it will select one of the product from the dropdown? Or Provide me a way by which i will be able to add product while adding invoice. so that on details it will show me complete details. i.e. product, rate, quantity, vat, total. Currently i am able to add all the data except product?
If you want to do this by ProductDescription you'll have to GetProducts then loop through the array that's returned then use ProductID
I went back and looked at my code for this and to populate the 'Product' field I set the ProductID member (which I accessed by looping through the array returned by GetProducts and searching by ProductName) - which was as I originally thought. And this definitely works. If you look at the docs (KashFlow API - Manual - Classes - InvoiceLine) it says you use the ID of a SubProduct - I think this might be misleading, though I've not actually tested that...
Is their any API of kashflow or you have created your own code for doing so. Can you provide me some suggestions. Any help is appriciated.
It's certainly wise to create a library of functions in whichever language you're using (I'm writing in php). It avoids a lot of tedious repetition. Regarding my post above, the on line API docs are correct - you do use GetSubProducts in order to populate ProductID in each InvoiceLine. I hadn't done that. Instead, I had hard coded my sub product ids by going to https://securedwebapp.com/SalesTypes.asp, clicking on a sales type which has products (or SubProducts in API speak), and then when you select one of those products you get the id from the url (https://securedwebapp.com/ManageProductList.asp?prodid=xxxxx). The whole naming convention is still a little confusing though. Products in the web interface are SubProducts in the API. And Sales Types in the web interface appear to correspond directly with either (the API) Product or NominalCode (which do have slightly different properties, the first being more product and stock focused and the second more accounting and sales focused - but there appears to be a one-to-one correspondence between them.)