7

I have created 4 approval process for an object XYZ__c. In a VF page I want a picklist of all the Approval Process Name of that Object. After selecting one of it I have workflow rules depending on the selected Approval process name.

My existing VF page has a InputField text(Approval_Process__c) right now where I put the approval Process name manually and the Approval Process has the criteria of checking that field name equals its name and triggers accordingly. What I want is instead of entering the approval process name manually a picklist of the approval process name would be great option.

4
  • snehakem, So what are you asking here ? It's good to know what you want to achieve, but it's not clear what your specific question is. What have you already tried or done so far, and what is blocking you ? Jul 9, 2014 at 8:09
  • My existing VF page has a InputField text(Approval_Process__c) right now where i put the approval Process name manually and the Approval Process has the criteria of checking that field name equals its name and triggers accordingly. What i want is instead of entering the approval process name manually a picklist of the approval process name would be great option.
    – snehakem
    Jul 9, 2014 at 8:17
  • Did you solve this task? I am too hanged up with same scenario. Dec 21, 2014 at 17:00
  • Hi @RajendraPatel..i am answering my question. The below worked for me.
    – snehakem
    Dec 22, 2014 at 6:30

1 Answer 1

4
select Id, Name from ProcessDefinition where TableEnumOrId ='XYZ__c'

The above query gave me the list of all approval process name of a specific object XYZ__c

1
  • For the use case it may be good to filter: SELECT Id, DeveloperName, Name FROM ProcessDefinition WHERE Type = 'Approval' AND TableEnumOrId = 'XYZ__c' AND State = 'Active' Nov 26, 2020 at 11:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.