Alan, Not a bad approach. In this case the MODIFY RECORD commands appear in an otherwise generic EDIT RECORD method so there are numerous forms involved - and they are constructed such that there are multiple ways the record may be caused to be saved. Theoretically they should all funnel back to the SAVE_RECORD wrapper. But they don't.
On Fri, Jun 30, 2017 at 3:58 PM, Alan Chan via 4D_Tech <4d_tech@lists.4d.com > wrote: > MODIFY RECORD won't save record until you click "Save button". The same > Save_Record Wrapper in Save Button should work without 2nd call. Do I miss > something? > > In fact, this is exactly what we are doing and our app is also evolved > from v3. > > Our wrapper is something like followings > > if(new record or modified record) > > start transaction and new err call > validate all fields locally > if(no error) > log user \\this is what you do to log user > end if > if(no error) > save record > end if > > if(no error) \\no error in trigger > validate transaction > else > cancel transaction > end if > end transaction and end err call > > end if > > Alan Chan > > 4D iNug Technical <4d_tech@lists.4d.com> writes: > >The best solution I've come up with is to split out setting the > >Create/Modify action to a separate method. Since this can't run in the > >trigger it can run in the SAVE_RECORD wrapper and when MODIFY RECORD is > >used I can call it immediately after. Results in a 'double save' but > that's > >no biggie. > > ********************************************************************** > 4D Internet Users Group (4D iNUG) > FAQ: http://lists.4d.com/faqnug.html > Archive: http://lists.4d.com/archives.html > Options: http://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ********************************************************************** -- Kirk Brooks San Francisco, CA ======================= *The only thing necessary for the triumph of evil is for good men to do nothing.* *- Edmund Burke* ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************