Haha this may sound very ridiculous but will it possible to refresh document in API...
This is because the API (AFAIK processed by worker) and the web front end (by web process) can open the same document.
If this happens, on the Web, it's fairly simple to resolve -> just clear cache and reload.
But on API, this can be troublesome :|. How do I avoid this, or resolve this for API so that at least it catch this error, refresh and try again ?
Thanks a lot!!!
–
Note:
If you are posting an issue,
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
On 05-Aug-2014, at 12:31 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:
Haha this may sound very ridiculous but will it possible to refresh document in API...
This is because the API (AFAIK processed by worker) and the web front end (by web process) can open the same document.
If this happens, on the Web, it's fairly simple to resolve -> just clear cache and reload.
But on API, this can be troublesome :|. How do I avoid this, or resolve this for API so that at least it catch this error, refresh and try again ?
If you try to update a document that does not have the latest timestamp, it will give you an exception. You just need to catch it
Thanks a lot!!!
–
Note:
If you are posting an issue,
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
Yeah, i caught the exception but how to refresh the document to access it ?
Any pointer to what server code can do that ?
On Tuesday, August 5, 2014 4:18:24 PM UTC+8, rushabh wrote:
On 05-Aug-2014, at 12:31 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:
Haha this may sound very ridiculous but will it possible to refresh document in API...
This is because the API (AFAIK processed by worker) and the web front end (by web process) can open the same document.
If this happens, on the Web, it's fairly simple to resolve -> just clear cache and reload.
But on API, this can be troublesome :|. How do I avoid this, or resolve this for API so that at least it catch this error, refresh and try again ?
If you try to update a document that does not have the latest timestamp, it will give you an exception. You just need to catch it
Thanks a lot!!!
–
Note:
If you are posting an issue,
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
On Tue, Aug 5, 2014 at 2:07 PM, Nguyen Do Le Bao <na...@gmail.com> wrote:
Yeah, i caught the exception but how to refresh the document to access it ?
Any pointer to what server code can do that ?
On Tuesday, August 5, 2014 4:18:24 PM UTC+8, rushabh wrote:
On 05-Aug-2014, at 12:31 pm, Nguyen Do Le Bao <na…@gmail.com> wrote:
Haha this may sound very ridiculous but will it possible to refresh document in API…
This is because the API (AFAIK processed by worker) and the web front end (by web process) can open the same document.
If this happens, on the Web, it's fairly simple to resolve -> just clear cache and reload.
But on API, this can be troublesome :|. How do I avoid this, or resolve this for API so that at least it catch this error, refresh and try again ?
If you try to update a document that does not have the latest timestamp, it will give you an exception. You just need to catch it
Thanks a lot!!!
–
Note:
If you are posting an issue,
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
On 05-Aug-2014, at 2:07 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:
Yeah, i caught the exception but how to refresh the document to access it ?
Any pointer to what server code can do that ?
GET /api/resource/[DocType]/[Name]
On Tuesday, August 5, 2014 4:18:24 PM UTC+8, rushabh wrote:
On 05-Aug-2014, at 12:31 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:
Haha this may sound very ridiculous but will it possible to refresh document in API...
This is because the API (AFAIK processed by worker) and the web front end (by web process) can open the same document.
If this happens, on the Web, it's fairly simple to resolve -> just clear cache and reload.
But on API, this can be troublesome :|. How do I avoid this, or resolve this for API so that at least it catch this error, refresh and try again ?
If you try to update a document that does not have the latest timestamp, it will give you an exception. You just need to catch it
Thanks a lot!!!
–
Note:
If you are posting an issue,
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
Figured out what's wrong in the code. In server, gotta call frappe.get_doc(Doctype, DocName) to refresh it
Thank you!
On Tuesday, August 5, 2014 4:40:08 PM UTC+8, Anand Doshi wrote:
Get the document again via API.
-Anand.
On Tue, Aug 5, 2014 at 2:07 PM, Nguyen Do Le Bao <na...@gmail.com> wrote:
Yeah, i caught the exception but how to refresh the document to access it ?
Any pointer to what server code can do that ?
On Tuesday, August 5, 2014 4:18:24 PM UTC+8, rushabh wrote:
On 05-Aug-2014, at 12:31 pm, Nguyen Do Le Bao <na…@gmail.com> wrote:
Haha this may sound very ridiculous but will it possible to refresh document in API…
This is because the API (AFAIK processed by worker) and the web front end (by web process) can open the same document.
If this happens, on the Web, it’s fairly simple to resolve -> just clear cache and reload.
But on API, this can be troublesome :|. How do I avoid this, or resolve this for API so that at least it catch this error, refresh and try again ?
If you try to update a document that does not have the latest timestamp, it will give you an exception. You just need to catch it
Thanks a lot!!!
–
Note:
If you are posting an issue,
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.