custom Action
custom Action
In the Editor AJAX client-to-server data request, the default Actions are Create, Edit, and Remove.
Is there a built-in method or option to include additional custom actions? Bad example... but if I needed an Action named "Edit2"?
If not, I know that I can intercept the request object and modify it on my own, and then return a response in the expected/appropriate format. I just wanted to see if DT/DTE had a built-in way to do it
ajax: function (method, url, data, dte_success, error) {
// reformat data
JSONstring = app.dteFormatRequest(data);
...
}
This question has an accepted answers - jump to answer
Answers
Does this thread answer your question?
Kevin
Sort of....
I was looking for a way to change the Action during an Edit, like: Create, Edit, Delete, and AddWalkIn...
My scenario is abnormal... I "massage" the data in the Editor AJAX function so that I can parse it on the SQL side, and I have to make the request in a special way... It's a long story I won't bore you with --- we have an overly-complicated custom framework with a complicated way to make a call.
Anyway, I flatten the data.... This is the best thing I could come up with (pseudo-code below):
The only thing that stands out is the else if in line 23 will probably never be executed because of the first if in line 8. Maybe move it after the if/else if block you have and make it a standalone if statement (assuming you are doing the same object build as lines 12-18.
Kevin