I realize this is more a user group, but hoping we have a few developers in the group.Ā
Has anyone used API’s to insert date into NAV/BC?Ā I’m trying to run a sync tool and a date field continues to error.Ā Ā It tells me thatĀ Ā NULL, 1/1/1753 and 0D {string} is not accepted or valid.Ā Ā Running thin on ideas on this one.
**If i remove the field from the API fields then the process works fine.
Any ideas?
Thanks Steve
—————————— Steve Florko IT Director DC International Carrollton TX ——————————
I have a series ofĀ postsĀ on this but it seems you have the basic. Here’s my tip:Ā When trying to load data, first try to read the data and see how the OdAta/API presents the field.Ā It’s not always obvious — especially if you are used to SQL! I did this forĀ Sales Prices (page 7002) and saw that when the date is blank on the screen, it shows up in the API/ODATA as “0001-01-01” So, if you want no starting or ending date, I’d try that. Let me know – I didn’t have time to test it but this is my general approach.
Here’s what the output looked like: [{“@odata.etag”:”W/”JzQ0O1c5Ni9HcUJqMjduMG5vS1NsSTUrd3VNSHJOL3o0WHJuTGpxMitqZVhpb1k9MTswMDsn””,”Item_No”:”1896-S”,”Sales_Type”:”All Customers”,”Sales_Code”:””,”Starting_Date”:”0001-01-01″,”Currency_Code”:””,”Variant_Code”:””,”Unit_of_Measure_Code”:”PCS”,”Minimum_Quantity”:0,”SalesTypeFilter”:”None”,”SalesCodeFilterCtrl”:””,”ItemNoFilterCtrl”:”1896-S”,”StartingDateFilter”:””,”CurrencyCodeFilterCtrl”:””,”FilterDescription”:” Item 1896-S”,”Unit_Price”:15,”Ending_Date”:”0001-01-01″,”Price_Includes_VAT”:false,”Allow_Line_Disc”:true,”Allow_Invoice_Disc”:true,”VAT_Bus_Posting_Gr_Price”:””}]
Good luck Adam
—————————— Adam Jacobson President Red Three Consulting, Inc. Bronx NY —————————— ——————————————-
Thank you for the response.Ā I did figure out late last night that 1/1/1753 is the shown default in DCRM however in BC it was looking for 1/1/0001.Ā Ā Ā
Appreciate your reply.
—————————— Steve Florko IT Director DC International Carrollton TX —————————— ——————————————-
Please note:
This action will also remove this member from your connections and send a report to the site admin.
Please allow a few minutes for this process to complete.
Report
You have already reported this .
Welcome to our new site!
Here you will find a wealth of information created for peopleĀ that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!