function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NasirNasir 

why we can't use ischanged when i create workflow approval processes

I would like you to set up a new Two stage approval process for me please.

Whenever the USER equals NASIR and the STAGE is changed from
CLOSE WON to REJECTED or CLOSE LOST POST WON an task or email is
triggered to AVINASH to verify and when Gillian has verified it
it will then trigger an email or task to me to APPROVE the change

 

I am using the "When formula evaluates to true" and putting the following condition but this is not getting saved

 

AND(
    ($User.Id  = 00520000000nkR1),
    (ISCHANGED( StageName )), (
    (ISPICKVAL( StageName , Closed Lost(Post Won)), 
    (ISPICKVAL( StageName , Processing Rejection))
)

 

The user id is mine.

 

Please help...or is there any way to code it.

 

Thanks

Imran MohammedImran Mohammed

What i understood from your requirement, the formula should be something like this.

I may be wrong if i misunderstood your question.

 

AND(($User.Id  = 00520000000nkR1),(ISCHANGED( StageName )), OR(ISPICKVAL( StageName , "Closed Lost(Post Won)"),ISPICKVAL( StageName , "Processing Rejection")))

 

Let me know if it works.

NasirNasir

Its giving syntex error.

 

"Error: Function ISCHANGED may not be used in this type of formula"

 

This was also the error which i was facing before.ISCHANGED cannot be used.

 

Please help

Imran MohammedImran Mohammed

I found in the documentation that ISCHANGED could be used only if workflow rule is created with evaluation criteria as "Every time a record is created or edited".

This function could be used only in the following:

  • Assignment rules
  • Validation rules
  • Field updates
  • Workflow rules if the trigger type is set to Every time a record is created or edited.
NasirNasir

Yes imran i also find the same...we can't use that in workflow approval processes.So how should i care for my problem.Have u got some solution?

 

 

Imran MohammedImran Mohammed

Do you want to initiate the approval process on this if the condition you are checking comes true?

NasirNasir

yes Imran.

 

i want this to  work

Whenever the USER equals NASIR  and the STAGE is changed from
CLOSE WON to REJECTED or CLOSE LOST POST WON an task or email is
triggered to AVINASH to verify and when Gillian has verified it
it will then trigger an email or task to me to APPROVE the change.

 

Thanks

Imran MohammedImran Mohammed

You can trigger an email or task with Workflow too.

 

If that does not meet your requirement, then do the following,

I don't know whether you will accept this solution or not.

What you should do is add a custom field to the object. Hide it from Page Layout(As it will be used for background process)

Create a workflow rule with the formula you have now.

Add a Field Update workflow action.(Update the custom field to a particualr value that will initiate the Approval process which will carry the remaining job until Approval)

 

Let me know if you have any questions.

 

 

 

 

NasirNasir

Hi Imran,

 

I got what u r telling.I will just try to implement this and will let u know.Hope this works.

 

Thanks

 

Nasir

Imran MohammedImran Mohammed

Were you able to get this done?

NasirNasir

hi Imran

 

Currently i have been instructed not to look at this case.I will inform u very soon.Well can i have ur email id so i can contact u if i am in need!!

 

Thanks

Nasir