Frappe HTTP API "Delete" Not Working

89 views
Skip to first unread message

Ashraful Alam

unread,
Aug 10, 2014, 3:26:34 AM8/10/14
to erpnext-u...@googlegroups.com
I am working a new project. My Project Process showing here::

1. At first Create a doctype with button
2. click the button there show some row( comes from database ). And every row have a delete button.
2. Add an jquery onclick event for this delete button
3. When click delete button send a ajax HTTP API request for delete this. like : (http://0.0.0.0:8000/api/resource/Visit/V-140805000001)


I am following HTTP API suggestion but it;s not working. How to solve this

Rushabh Mehta

unread,
Aug 11, 2014, 2:03:46 AM8/11/14
to erpnext-u...@googlegroups.com
Can you share your code / repo. Its really hard to figure what you are upto


--
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-fo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/9f8d376b-1316-4264-928e-d0f76d98631a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ashraful Alam

unread,
Aug 12, 2014, 1:04:35 AM8/12/14
to erpnext-u...@googlegroups.com
There is my codes for delete a row by sending HTTP API.



 $('html').on('click', '.deleteSlotRow', function(){
    var DelID = $(this).attr('data-deletevalue');

  $.ajax({
        type:"DELETE",
        url: 'api/resource/Patient Visit/'+DelID,
        statusCode: {
            200: function(data) {
                console.log(data);   
                msgprint(__("Delete Successful"));
            }
        }
  })
 
});


After sending HTTP request it will return "500 INTERNAL SERVER ERROR".





On Monday, August 11, 2014 12:03:46 PM UTC+6, Rushabh Mehta wrote:
Can you share your code / repo. Its really hard to figure what you are upto


On 10-Aug-2014, at 12:56 pm, Ashraful Alam <ashraf...@gmail.com> wrote:

I am working a new project. My Project Process showing here::

1. At first Create a doctype with button
2. click the button there show some row( comes from database ). And every row have a delete button.
2. Add an jquery onclick event for this delete button
3. When click delete button send a ajax HTTP API request for delete this. like : (http://0.0.0.0:8000/api/resource/Visit/V-140805000001)


I am following HTTP API suggestion but it;s not working. How to solve this

--
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+unsub...@googlegroups.com.

Rushabh Mehta

unread,
Aug 12, 2014, 3:03:11 AM8/12/14
to erpnext-u...@googlegroups.com
Please post this on the developer forum


To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-fo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/69d9aba0-874c-4ef6-87e7-e95293830c2c%40googlegroups.com.

Ashraful Alam

unread,
Aug 12, 2014, 3:32:01 AM8/12/14
to erpnext-u...@googlegroups.com
Sorry for posting this problem here. i wasn't check. i am posting this on developer forum now .. :)
Reply all
Reply to author
Forward
0 new messages