How to check the count of number of rejected PO's

Hello,

When any Purchase order is rejected multiple times because of any reasons, how to count the number of rejections that we did in the workflow?

is there a way that we can generate report i have rejected 3 times or 4 times? from activity log?

pls suggest.

basically we call that as a “Turn Back”.

Or Activity log report can be generated doc type wise? for example purchase order activity log report?

Or Activity log report based on the workflow state change for example - New → Waiting for Approval , Watiting for approval → rejected, rejected → review and so on

thanks

@prasad_naik there is no such thing , you have to add a new field and add the script to count how many document has been rejected through a workflow .

hello sir ,

what field to add and please share me the example of client script

prasad

I have added below field called “Turn Back” (Int).

RIght now we are writing manually 1, 2, 3 etc .

Please suggest how to do it using cleint script

image

thanks

@bahaou , @prasad_naik I think it is possible to get the no of rejected times through activity log using script… Never tried, but i think it is possible.

Can u pls give any script ref for this, i can try on this.

@prasad_naik sorry for the delayed reply. I don’t have any ref script for this as i thought this way you can achive what you want. but some information on this to get your result.
Table name: tabVersion
Field name for filter : ref_doctype
values in this field: data

If you add a custom field, that will be limited to that table only. but if you spend some time in this logic you can use it for any transaction and any type of checking.

thanks @ErpnextRaja : will check on this. thanks