Sage / SData-2.0

Contains documents pertaining to the SData 2.0 developments
33 stars 10 forks source link

Sage 50 Sdata Customer #59

Closed davidhendrickmb closed 7 years ago

davidhendrickmb commented 8 years ago

Hi there, I'm creating a customer via Sdata and I'm setting the "currency" value on the customer, however it doesn't seem to be setting in Sage 50. Is there something else I need to set, or is this being overwritten from the country of the customer? Thanks, David

davidhendrickmb commented 8 years ago

The same also happens for the tax codes when I try to set them. Thanks, David

darroncockram commented 8 years ago

Looks like both the currency and the taxCode properties are read only on the tradingAccount resource kind in the Sdata feeds (although not flagged as such in the schema). I'll raise it with the Accounts team.

davidhendrickmb commented 8 years ago

Thanks Darron. What does this generally mean, hotfix for S50 or new version etc? Is there anything I can do to work around this? At least it seems editable in S50 once created.

On 19 Jul 2016 19:33, "Darron Cockram" notifications@github.com wrote:

Looks like both the currency and the tax code is read only in the Sdata feeds (although not flagged as such in the schema). I'll raise it with the Accounts team.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Sage/SData-2.0/issues/59#issuecomment-233724720, or mute the thread https://github.com/notifications/unsubscribe-auth/ARad7GovFKuR-6Taprqt3GFgjRiKf83cks5qXRhhgaJpZM4JP6z6 .

darroncockram commented 8 years ago

What does this generally mean, hotfix for S50 or new version etc?

That would very much depend on the Accounts team and if/how/when they decide to address the issue (I have absolutely no sway over this I'm afraid). The Sdata adapter is version agnostic though, so I can say that any fix would be automatically backwards compatible.

Is there anything I can do to work around this? At least it seems editable in S50 once created.

Unfortunately the only workarounds would be to edit the record in the main Accounts application after creating it via Sdata, or use SDO (the product specific SDK) to create the record.

davidhendrickmb commented 8 years ago

Hi Darron, Thanks again. I know it's a bit off topic, but is there an SDK for S50 that doesn't require a developer licence? I'm familiar with the Sage CRM COM object and using that, wondering if there is an equivalent? Thanks, David

darroncockram commented 8 years ago

The Sdata feeds are the only way to interact with the Sage 50 Accounts data without a developer license I'm afraid. Sdata offers a decoupled but fairly basic level of integration whereas the product specific SDK's offer a tightly coupled integration but a very deep level of functionality.

davidhendrickmb commented 8 years ago

Hi Darron, Is there an issue with setting the date on the invoice? I'm setting it, but it seems to be overwritten and always becomes the current date? Thanks, David

davidhendrickmb commented 8 years ago

Hi Darron, If you could also tell me if it's possible to set the currency rate on the invoice I would appreciate it. I've tried operatingCompanyCurrencyExchangeRate, but that doesn't seem right as that would be the company level. Thanks, David

davidhendrickmb commented 8 years ago

Sorry about all the messages, if you could tell me if it's possible to set the customer order number and order taken by also that would be great. image

darroncockram commented 8 years ago

Is there an issue with setting the date on the invoice? I'm setting it, but it seems to be overwritten and always becomes the current date?

I believe that is expected behaviour for the Accounts adapter and the date of the invoice will always be set to the current date for any new invoices.

darroncockram commented 8 years ago

If you could also tell me if it's possible to set the currency rate on the invoice I would appreciate it. I've tried operatingCompanyCurrencyExchangeRate, but that doesn't seem right as that would be the company level.

If I recall correctly it is supposed to inherit the currency settings from the associated tradingAcccount (customer)

davidhendrickmb commented 8 years ago

Hi Darron, Is there any way to update the date, even afterwards? This is quite important for us for reconciling when we realise revenue. Is it possible to update the customer currency before creating the invoice? Thanks, David

darroncockram commented 8 years ago

Unfortunately the currency property of the tradingAccount is read only and the salesInvoice resource kind does not support PUT requests in the Accounts adapter so you can't update an invoice after it's been created via Sdata. The only current options would be to set the currency in the main application after creating via Sdarta or use SDO to interact with Accounts instead.

davidhendrickmb commented 8 years ago

Hi Darron, OK thanks. That leaves us in a bad situation as I would basically have to scrap everything I've done without being able to update these. I was hoping to use direct ODBC connection to change these columns only (as I know direct DB is never recommended). Appreciate this is off topic. I've managed to do select statements no problem e.g. SELECT * FROM SALES_LEDGER WHERE NAME = 'xxx' When I try to do an update such as UPDATE SALES_LEDGER SET NAME = 'xxx' WHERE ACCOUNT_REF = 'xxx' I get an error saying: ERROR [42000] Syntax error: Invalid key word specification

Is it possible to update using the ODBC connection? Or is there any other route in? Am wondering how the SDK does it so I could replicate as I don't think the cost of the SDK would be a runner. Thanks, David

darroncockram commented 8 years ago

The ODBC driver for Accounts is read only so you couldn't use that to perform updates I'm afraid. The only ways to write to the Accounts data are via Sdata, which is free but limited in terms of the functionality it provides, or SDO (the Accounts-specific SDK) which is charged for but provides access to change pretty much all aspects of the Accounts data.