Skip to main content

Hi, all! I am building a Screen Flow that stitches a variable number of mutable Task Groups into a Project. I'd like to make Milestone scheduling an option, so I'm planning on using Data Fetcher (from the App Exchange) to get the Milestones for the selected Task Group from the Active Template via SOQL so I can present them to the user as a picklist with a Collection Choice Set.

Here is my SOQL:

SELECT Id, Name FROM TASKRAY__Project_Task__c

WHERE TASKRAY__trIsMilestone__c = true

AND TASKRAY__Project__r.TASKRAY__trTemplate__c = true

AND TASKRAY__Project__r.TASKRAY__trPrincipalVersion__r.TASKRAY__trDerivedState__c = 'Active'

AND TASKRAY__trTaskGroup__r.TASKRAY__trAddressableID__c = {!clTask_Group_1.selectedChoiceValues}

clTask_Group_1.selectedChoiceValues represents the Choice Lookup (only 1 possible value) where the Task Group is picked. The Value for that Choice Lookup is the Addressable ID of the Task Group.

 

This is working in limited testing, I just wanted to make sure I'm understanding correctly how to use the "TASKRAY__trDerivedState__c" field on the Principal Version object.

1 resposta
  1. 26 de set. de 2024, 18:22

    Hi Kim,

     

    That all looks correct to me. Derived State is how we also identify the Active Version of the Template for our Apex Actions and OOtB Cloning Functions. Similarly, we have a Method for use in custom Apex that resolves the ID of the active Project Template that's wanted to be cloned from the Principal Template's Addressable ID. I think you're on the right track!

0/9000