cancel
Showing results for 
Search instead for 
Did you mean: 

Pending request deletion

Former Member
0 Kudos

Hi All,

I need to delete all pending requests of a deleted user. I want to run a batch job to delete all pending requests of all deleted users (Status = "Active").

Can anyone tell me the query I need to write to fetch the pending requests of a user.

Thanks,

Dhiman Paul.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Krishna,

Yes, I have almost solve the problem. With the operation value 2, request is showing Failed state and getting removed automatically from manager's To-Do list. Any idea why it is showing Failed not Declined?

When I am running the task integrated with Leaver process then request keep showing to user's list with pending state but getting removed from manager's to-do list.

Is it something like system is not updating the record for inactive user?

Thanks,

Dhiman Paul.

Former Member
0 Kudos

Hi Dhiman,

For your first query, usually any operation is not allowed on INACTIVE entries. I assume this might be the reason.

For your second query, I suggest you to do remove the pending requests before the record is made INACTIVE.

Maintain a custom attribute. say Z_MARK_INACTIVE. And from UI task , if you want to make a user inactive, then first set the flag on Z_MARK_INACTIVE.

Then for the user who has Z_MARK_INACTIVE flag TRUE, get the mskey. Using mskey of the user perform the decline operation using  uIS_SetApproval.

After the pending requests are declined set the  MX_INACTIVE flag to TRUE.

This should work. All  the best !!

Thanks,

Krishna.

Former Member
0 Kudos

Hi Dhiman,

I believe you can achieve this. Use the internal function, uIS_SetApproval. it accepts a parameter operation where you can set it as 2 (declined) with and input "In-Active user" for the parameter Reason.

Get more information about this from help menu of Management console --> Help --> Search "Internal functions".

Thanks,

Krishna.

Former Member
0 Kudos

Hi Chris,

We have to delete all pending requests of deleted users.

I have planed to write a job with a generic pass where we have to provide query which should return MSKEY of Pending request of deleted/deactivated users. In destination, I am passing the MSKEY to a javascript which is setting approval to auto declined.

Is this a correct approach?

Is there any standard JavaScript function already available which is setting auto approval as declined?

Thanks,

Dhiman Paul.

Former Member
0 Kudos

Its not a good idea to delete things directly.

You can use javascript to set the approval value on an object.  You can also set the value as denied on pending objects using a pass.

You might run into issues if the user is inactive though.  Operations happen differently when they relate to an inactive user.

Peter

Former Member
0 Kudos

Hi All,

Actually I want to write a Job/event task which can delete pending requests of deleted user.

Any one suggest me the best approach to impletemt this?

Thanks,

Dhiman Paul.

ChrisPS
Contributor
0 Kudos

Hello Dhiman,

                     there is no standard job for this as deleting pending values could lead to inconsistancies e.g. associated provisionings for example. What is the scenario here that it is required to remove the pending values ?

Thanks,

Chris