If the queue does not contains parent Object as supported Object but doesnot contains childObject as supported Object user can set Queue as approver for a approval process created on child Object. But same does not works with API.
Steps for replication
- Create a parent object 'ParentObj__c'.
- Create a child Object'ChildObj__c' with Parent as 'ParentObj__c'.
- Create a queue 'TestQueue' and add 'ParentObj__c' to its list of supported Objects.
- Create a approval process on 'childobj__c' using UI. ApprocalProcess -> Approval Process Jump Start Wizard -> Select Approver -> automatically assign to queue. -> Select TestQueue from Lookup -> Save
- Approval process is created successfully
- When the same approval process 'childobj__c.a1.approvalProcess' is create using Metadata API, Approval process is not created. The user gets the below error :- ' Approval step Step_1 references Test_Queue, which doesn't exist as a queue .'