Iām uploading a bunch of documents to SuiteCRM via the v8 API. It works nicely except when I introduce the additional complexity of handling revisions That is, what Iām trying to do is attach a new DocumentRevision to an existing Document.
The new revision DOES get created and I can see it correctly from the UI, the only problem is that when I try to download it, it fails because no file has been saved server-side
Looking at the code, this happens because while the Document class extends File, DocumentRevision does not, so SuiteCRM doesnāt look for an uploaded file when it saves the DocumentRevision bean.
My question is: is there another method to attach new revisions to an existing Document using the v8 API? Or is it a bug that DocumentRevision DOESNāTextend File?
The v8 API is quite new and itās perfectly possible that you are the first person trying to add Revisions through it⦠so yes, it could be a bug or even a missing bit of code.
The next version (7.10.10) will contain API developments, and there is some new documentation being prepared for it.
I don0t know if it helps, but you can see a preview here:
Iāve checked the hotfix branch but DocumentRevision is still just a SugarBean there, and the code that saves uploaded files has no modification⦠Iāll experiment with my installation then, thanks
Never mind, I think you can write direct to DocumentRevisions module now. I am going to give a try and I will report back. I know this thread is old, but it is the only relevant one related to Document Revisions and the API.
If any of the people on this thread would be willing to improve the existing Documentation on the API, we would be very grateful. The Docs are too outdated, wrong and incomplete, as you probably know and have suffered from it.
Our Docs site is wiki-style, it is editable by the Community, so any improvements you can make will be valuable.
Thanks, pgr. I do plan to do this. I have spent the last month migrating to SuiteCRM, and I really want to work on the documentation and provide the migration/admin tools I used for the benefit of the SuiteCRM community. I also have more free time now that the migration is almost complete.