Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested query type detection of Task/Event #54

Closed
pwrightcertinia opened this issue Nov 16, 2022 · 1 comment
Closed

Nested query type detection of Task/Event #54

pwrightcertinia opened this issue Nov 16, 2022 · 1 comment
Labels
bug Something isn't working sample Related to sample tests wontfix This will not be worked on

Comments

@pwrightcertinia
Copy link
Contributor

Reported error and code sample (ActionPlansV4 sample repo):

main/default/classes/ActionPlansTriggerHandlers.cls
Missing: line 330 at 42-73: Unknown field 'IsClosed' on SObject 'Schema.Event'
Map<Id, APTask__c> parentControllingTasks = new Map<Id, APTask__c>([SELECT Id, (SELECT Id, IsClosed FROM Tasks__r) FROM APTask__c WHERE Id IN :parentControllingTaskIDs]);
Set<Id> apTasksNeedingTaskDeletion = new Set<Id>();
for(Id i : openControlledAPTasks.keyset()){
	APTask__c controller = parentControllingTasks.get(openControlledAPTasks.get(i));
	if(controller.Tasks__r.isEmpty() || !controller.Tasks__r[0].IsClosed){
		apTasksNeedingTaskDeletion.add(i);
	}
}

"Tasks__r" comes from the nested query which we probably ignore. The resolved type of the first element is then Event according to the error.

@pwrightcertinia pwrightcertinia added the sample Related to sample tests label Nov 16, 2022
@dtemple-certinia dtemple-certinia added the bug Something isn't working label Dec 9, 2022
@kjonescertinia
Copy link
Contributor

This is resolved by #214.

@kjonescertinia kjonescertinia closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2023
@kjonescertinia kjonescertinia added the wontfix This will not be worked on label Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sample Related to sample tests wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants