I’m trying to return the form id of the inserted record and not getting any response. My server code saves correctly and I have the following function:
$id = $action->get_id();
echo "<data><action type='inserted' sid='".$id."' tid='".$id."' /></data>";
On the client side, I have:
When I click form.save() button, it saves but I get no xml response for me to see record id.
Appreciate if you can please assist.
I’m not quite sure why you are otputing your custom XML instead of the default one ( connector will generate xml response automatically )
Anyway, if you wish to have your custom response, you need to add
die(); //must be added
if process is not stopped, connector will block and ignore all “echo” generated response.
Thanks for your response. The reason is that when I do a form.save(), I’m trying to find a way to retrieve the record id for new inserted record and set it equal to a variable to perform other functions per the following unanswered post of mine:
For some reason the below didn’t work, is there a better way to get the record Id per the above posted link?
Poking around, I think I got it sorted with this code:
per docs.dhtmlx.com/doku.php?id=tuto … savingform
If there’s anything else further to consider, please let me know.