App ID: 41F831D7-1082-9EE4-FF6C-0E7ED3481C00
I’ve been playing around with the Deep Save function and its great, it does exactly what it says it does and very easily (although my method is probably less than optimal). In my application I have a page which is the profile of a company, it has all their approvals, registered company details etc and all of these come off the root (parent) which is the registered company. The rest are child relations to the registered company.
At present, when I click save, it takes all the details entered into the profile page and creates new objects for them whether there is any content in the field or not. In the example below, the coHo table is the parent, and the VAT table is the child.
If the companies coHo details are filled in but it is not VAT registered, and said VAT properties are blank, deep save creates an object ID and OwnerID in the VAT object but the properties are blank also. But i cant find a suitable logic option to check if the the vatNo is empty, and if so then dont create the object and the relation to the coHo table because there is nothing to relate to. Ive tried logic test and rebuilding it to try if/else options but its not working. maybe i need to try the transaction API’s or event handlers.
Does anyone have any tips they wouldnt mind sharing? My app is relatively simple, it will be a database of companies and their approvals for our internal use through a UI built in Backendless also.