SalesOrderDelivery References are different than PurchaseOrderDelivery References
I have been working with the SalesOrderDeliveries and PurchaseOrderDeliveries feeds in Sage 50 Accounts and noticed that the two reference numbers in each feed work differently.
For example, the PurchaseOrderDeliveries Reference field maps to the GRN number in the Sage 50 UI:
"reference": "2", "reference2": null,
Here is the corresponding link I received from the atom/xml feed to PurchaseOrderDeliveryLines: http://localhost:5493/sdata/accounts50/GCRM/-/PurchaseOrderDeliveryLines?where=reference eq '2'
However in the SalesOrderDeliveries Reference field maps to the Sales Order number instead of the GDN number in the Sage 50 UI:
"reference": "29", "reference2": "BRI001",
Here is the corresponding link I received from the atom/xml feed to PurchaseOrderDeliveryLines: http://localhost:5493/sdata/accounts50/GCRM/-/SalesOrderDeliveryLines?where=reference eq '1'
Notice how the link reference values are completely different for SalesOrderDeliveries. This poses a problem when using JSON and trying to link to the SalesOrderDeliveryLines using the reference.
I believe that both "reference" fields for these feeds should map to their GRN or GDN values as it would allow linking to SalesOrderDeliveryLines much easier using JSON. Is my understanding here correct? If so, is there anyway to get this fixed?
Sorry, I'm not quite clear on what the problem is. Are you saying that the incorrect information is returned if you navigate the link to the purchaseOrderDeliverLines/salesOderDeliverLines relationship or is it just that the internal mappings are inconsistent? If it's the former could you provide further detail on what is incorrect please as from a brief test here I am seeing the correct information when following the links to the purchaseOrderDeliverLines and salesOderDeliverLines. If it's the latter I can raise it with the Accounts team but can make no promises as to if it would be addressed I'm afraid as it's possible that they may not consider it to be a bug. Whilst it may be inconsistent it's not necessarily incorrect for Accounts to use different mappings as that is really an implementation detail. and there is no mandate or specification of which properties should be mapped to which fields in the GCRM schema. The standard and supported way of navigating relationships would be via the links or via a query on a property URL (http://sage.github.io/SData-2.0/pages/core/0608/) whereas relying on specific property mappings would be application/implementation specific and not covered by the Sdata standard or the GCRM contract. Depending on your use case a possible alternative might be to use the include parameter (http://sage.github.io/SData-2.0/pages/core/0605/) to return the lines as part of the original request.
Hope that helps.
Thanks for the response Darron. It is the latter as I am using JSON and the links are not returned in this format. I would assume that SalesOrderDeliveries and PurchaseOrderDeliveries would function in the same manner.
I guess the real issue is that in SalesOrderDeliveries feeds the GDN is not returned. This number is shown within the UI however. Like the PurchaseOrderDeliveries table returning the GRN number via the reference field, I would think SalesOrderDeliveries would do the same with GDN. That would be a better way to state the issue at hand (although the linking problem remains to be an issue in our use case).
I hope that clears up the problem, if not please let me know and I will try to clear it up further.
I've raised the inconsistency issue with the Accounts team but as I say I can make no promises about if or when it would be looked at I'm afraid.
Okay, thanks for your help and looking into this for me.