Frappe HTTP API "Delete" Not Working

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+un…@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.

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 <as...@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+un…@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.




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+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/28F0B5C7-067C-4FAB-AB58-5392CA2E91DC%40gmail.com.

For more options, visit https://groups.google.com/d/optout.

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 <as...@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+un…@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.




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+un…@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.

For more options, visit https://groups.google.com/d/optout.

Please post this on the developer forum


On 12-Aug-2014, at 10:34 am, Ashraful Alam <as...@gmail.com> wrote:

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 <as...@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+un…@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.





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+un…@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.

For more options, visit https://groups.google.com/d/optout.




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+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/B677C148-75EF-4D65-9C03-C1A1484C879C%40gmail.com.

For more options, visit https://groups.google.com/d/optout.

Sorry for posting this problem here. i wasn't check. i am posting this on developer forum now .. :)

On Tuesday, August 12, 2014 1:03:11 PM UTC+6, Rushabh Mehta wrote:
Please post this on the developer forum


On 12-Aug-2014, at 10:34 am, Ashraful Alam <as...@gmail.com> wrote:

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 <as...@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+un…@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.





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+un…@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.

For more options, visit https://groups.google.com/d/optout.




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+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/a02ed804-08e0-4ddb-a184-48ff5568384d%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.