For some reason g_form.save() no longer works on our instance.

jamesjurden
Giga Guru

For some reason g_form.save() no longer works on our instance. Tested all over the place using various test scripts, onChnage client scripts, UI Client Script, etc. No idea why this is?? Nothing in the logs. Its almost like it just returns a 'false' and is ignored. All scripting around the g_form.save() line works fine. Obviously missing something simple here??

We are on Build name: HEAD (Eureka) Build date: 01-15-2016_1507 Build tag: glide-eureka-04-08-2014__patch13-hotfix2-01-07-2016

5 REPLIES 5

paramveer
Mega Guru

g_form.save() will not work if there is any mandatory filed not filled. Check for that.


Hi Paramveer, this is what I had thought also, but it was not the case. I had the UI Action 'Save' hidden on the current form. So, I changed the condition to see the Save button so I could check for mandatory fields, but there were none. The reason I wanted to hide the Save button is to force the user to use the existing Submit button instead. What happned though, is that the g_form.save() started working again when the Save button was visibly on the form. The g_form.save() function seems to require that the Save UI action be visible. This is sort of crazy.   Not sure why this relationship exists, but now I cant hide the Save button any longer. Any ideas on how to hide the Save button without effecting the g_form.save() function? Thanks a lot.


HI James,



g_form.submit()??




Yes, g_form.save() calls Save UI Action.



I believe you might want to use g_form.submit in this case.



Thanks


Srinivas


Mark this answer as helpful/correct if it does so


paramveer
Mega Guru

g_form.save(), will work if and only if UI action is on client side. Means client check-box on UI action should be checked.




Thanks,


Param