Setting Up Leave Approver

Dear Umair,
I am attaching an image for the coorections you specified.
The Thing what i want is whenever the employee applies for leave it should first be acknowledged to team leader after approved by team leader it should forward to HOD and similarly to HR manager.


If team leader Rejects the application it should directly go to rejected status and similarly for HOD and HR manager. if anyone Rejects it it should head to Rejected State.

When I am trying to save the workflow its providing me an error saying "cannot cancel before submitting see transition 3".
Please Revert back.!

I have seen the example provided for creating custom workflow and accordingly i have created mine.
Is there a problem with my workflow?
if Yes, please point out the solution for the same.
I want to achieve the task as described above.

@Ujjawal
See if after approval and before approval the state remains same then what is the use of that state.

See the below screenshot:

Regards
Ruchin Sharma

@Ujjawal

you set doc status 2 for Rejected State. But when Team Leader or HOD going to reject it will show you an error. You can’t Cancel Document before submitting it.

So, better way you can step back at that time means if Team Leader Reject it set Next field to Previous one e.g Applied

Hi Ruchin
Thank you for your swift reply.
I didnt get you properly.
But answer to your question is after approval the application must head to its superior i.e after team leader to HOD and after that to HR manager. And if HR manager approves it later the application gets an approval or get rejected as the HR manager approves.
The workflow is team leader approves application heads to HOD and after that to HR manager.!

Hi there,
In that case the application status will always be Open or applied.
It wont change. Above all whenever team leader will approve it, it will submitted on his case. So what could be the possibility.?
Any possibility we can achieve this?

@Ujjawal

you can add extra State for that Rejected By Team Leader or Rejected By HOD .
So, when Team leader rejects, next State will be Rejected By Team Leader

set docstatus to 0 for above state.

Hi There,
I have done the following changes which you can also see in screenshot I am attaching with this.
For rejected by team leader or by rejected by hod the doc status changes to submitted.
and further moves to rejected state and there the doc status changes to 2.
So my question is will this work?
is there any flaw with the current workflow?
Following is the screenshot.

How can i set respective permission for the roles.
The thing is i created dummy employee and accordingly provided them role for it.
But no One i.e. team lead, HOD, HR manager is able to submit the leave application?
Please Provide help regarding how and what permissions i have to set individually!

@Ujjawal

Please check you are Leave Application doctype permissions.
And give permission of submitting to Team Leader, HOD, HR manager.

Hi There,
I ll share you the permissions and role permissions too.
Let me know what changes i have to make.
The First image is about the permissions in the Doctype.

The second image is about the role permissions.

Please See the images.
I am sorry for attaching these many images all together.

Hi,
Check “Apply User Permission”(i.e tick inside “Apply User Permission” check box).

How can i set access control for an employee.
so that he/she is not able to see other employee records and also cannot apply leave application for other employee.
Help Needed.
Can u also please explain what is apply user permission and if owner
Thanks in advance

Hi,

If Owner- The rule will only apply in case the user is the owner.
Apply User Permissions: This switch decides whether User Permissions should be applied for the role on selected Document Stages.
-If enabled, a user with that role will be able to access only
specific Documents for that Document Type. Such specific Document access
is defined in the list of User Permissions. Additionally, User
Permissions defined for other Document Types also get applied if they
are related to the current Document Type through Link Fields.

Hi there, @shraddha
i am unable to amend leave application once it is submitted. How can i achieve that?
The thing is Once the leave is approved if in case it must be canceled i am unable to do so.
Can u let me know what issues i might be having.
Whether role permission setting or user role setting.

@Ujjawal
check whether you have cancel permission on leave or not?

Regards
Ruchin Sharma

Yes I have!

@Ujjawal
Please share the screenshot of user rights as well as the error you are receiving at the time of cancel.

Apart from that please share the custom script (if you have any) for Leave Application.

Regards
Ruchin Sharma

Hi there @ruchin78
Its done now.
The problem was with the user i was logged in with.
He didnt had the rights to make amendments.
Thanks a ton.
Can u also please look into another issue i have been facing?