Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieving custom fields of SalesOrders #657

Open
Camielluijpen opened this issue Aug 28, 2024 · 5 comments · May be fixed by #656
Open

Retrieving custom fields of SalesOrders #657

Camielluijpen opened this issue Aug 28, 2024 · 5 comments · May be fixed by #656
Labels

Comments

@Camielluijpen
Copy link

I need to retrieve the CustomFields of a SalesOrder. We do use Exact Online Premium and I know the fields are added to the SalesOrder. I see the CustomFields property on many models, like SalesOrderLines and Contact, but not on the SalesOrder.

When I customize the SalesOrder class and add it as a fillable, I do get the corresponding URL:
image

However, that's how far as I can get. Can't find a way to then retrieve the custom fields of the SalesOrder. I've also tried to use the CustomField/CustomFields endpoint, but the UUID needed for the 'linkId' filter I get from the URL in the screenshot above is nowhere to be found in the SalesOrder, so that doesn't seem to work.

I'm using the REST SalesOrders/SalesOrder endpoint. If you look at the Exact Online REST documentation, the CustomField property is also there on the SalesOrder endpoint:
https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=SalesOrderSalesOrders
image

Please let me know if there are any more questions or if I'm missing something.

@remkobrenters
Copy link
Collaborator

The field was added a bit ago by Exact Online and it will be added in the next update (https://github.com/picqer/exact-php-client/pull/656/files#diff-dba0bc035533d6ca8ee3274e0a86b5700494c9973dfc293979295e8748447b47R106).

The linkId and bcName name you get in this field are the ones you need to get the customfields for this resource. What do you mean with "is nowhere to be found in the SalesOrder, so that doesn't seem to work."?

@Camielluijpen
Copy link
Author

Camielluijpen commented Aug 29, 2024

Hey Remko,

Thanks, good to hear that it's already handled!

The linkId and bcName name you get in this field are the ones you need to get the customfields for this resource. What do you mean with "is nowhere to be found in the SalesOrder, so that doesn't seem to work."?

With this I meant that I expected the linkId to be the same as the SalesOrder guid, since I believe it's meant to be used to retrieve the CustomFields of that same SalesOrder, but the linkId is different than the SalesOrder guid. But since I have no experience yet with CustomFields, I might just be entirely wrong.

@remkobrenters
Copy link
Collaborator

But did you verify the data returned when you used the provided linkId and bcName does not belong to the sales order?

@Camielluijpen
Copy link
Author

Hey Remko,

I've been able to make it work, thanks though! Do you have an indication of when the release of this update will be?

@remkobrenters
Copy link
Collaborator

Cool. Regarding the update. Not sure but Stephan is often very fast. Maybe he is busy or on vacation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants