You need to sign in to do that
Don't have an account?
Raju Sen 21
I want to update case and prevent case status updation on update of Task. Task has 5 recordtypes which are FC, Repo, ST, Auction and Legal Assessment and these record types have different statuses for completion of Task which are Resolved, Repo, Located, Proceed and Complete respectively.
So whenever I complete a task, case statuses changes to Intermediate Review, Intermediate Review, Intermediate Review, Intermediate Review and Final Review respectively (depending on the Completion status of Task of that particular Task recordType).
Here is the requirement I am facing difficulty with: If a Case has a Status of ‘Legal Assessment’ and an incomplete Task of 'Legal Assessment', then completion of another incomplete Task will not override the Case Status
Can anyone help me with a logic here?
Apex Trigger to Update Case Status on Update of Task Status
I want to update case and prevent case status updation on update of Task. Task has 5 recordtypes which are FC, Repo, ST, Auction and Legal Assessment and these record types have different statuses for completion of Task which are Resolved, Repo, Located, Proceed and Complete respectively.
So whenever I complete a task, case statuses changes to Intermediate Review, Intermediate Review, Intermediate Review, Intermediate Review and Final Review respectively (depending on the Completion status of Task of that particular Task recordType).
Here is the requirement I am facing difficulty with: If a Case has a Status of ‘Legal Assessment’ and an incomplete Task of 'Legal Assessment', then completion of another incomplete Task will not override the Case Status
Can anyone help me with a logic here?
when you are updating Case status, you need to check the current case status (Legal Assesment) and then query all tasks related to that case with status Legal Assesment, if you get more then one record then do not proceed with Case status update.