-
Notifications
You must be signed in to change notification settings - Fork 202
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
Save() function doesn't handle update function #653
Comments
If I understand you correctly this is how Exact Online works. On creation it saves new entities and from that point on you have to update them through their own endpoints (and not through an update of the parent record). See for example https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=PurchasePurchaseInvoices and than the fields for POST and PUT. You see that the invoice lines are not there for the PUT request. |
i am trying to save bankAccounts in account model ,its doesnt get save |
Bank accounts cannot be saved as collection (look here https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=CRMAccounts) and filter it by POST. You will see there are no bank accounts. They need to be added separately after creating the account. |
Correct. The models are generated based on the Exact Online API documentation. It shows the definition of the entire model that is available and does not specify the differences between the different states (for example the ID is also not available as long as it is not created etc). You should use the Exact Online API documentation to pinpoint what is available and allowed for POST, PUT etc. |
shouldnt we remove it ,i can submit the pr then |
Not really as it is representing the model and it's properties (value, type and description). It helps when using the fields. To make sure your fields work the way you want the Exact Online API documentation should be used. As they constantly change things there one of the community members (@DannyvdSluijs ) created a awesome solution that parses the Exact Online API documentation and generates a PR for all changes in these properties. An example of these changes can be seen here #635 So manually removing or changing the property definitions is not a viable solution. |
ah i see ,that's cool |
I am not sure I understand what you try to do with findId() in relation to the contact name. For searching using for example filter() please keep in mind that Exact Online uses oData so your filters (and other arguments) need to use the oData structure and notation. |
Thanks for the gentle ping, here is once again a PR based on the latests documentation, #656 |
I am using save function for updating relationship and saving new relationship but it doesn't update rather insert new relationship always
Similarly it doesn't save bank account collection with account model.
The text was updated successfully, but these errors were encountered: