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 ? Commented 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
    Commented Jul 9, 2014 at 8:17
  • Did you solve this task? I am too hanged up with same scenario. Commented Dec 21, 2014 at 17:00
  • Hi @RajendraPatel..i am answering my question. The below worked for me.
    – snehakem
    Commented Dec 22, 2014 at 6:30

1 Answer 1

5
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' Commented Nov 26, 2020 at 11:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .