- I have 2 lookups to two different objects: licence Type and Licence class Definition on Case Object.
- Licence Type is a lookup on Licence Class Definition Object.
- I want to filter Licence Class Definition Field on Case object based on Licence Type Value on Licence Class Definition Object.
Is there a way to retrieve results for Licence class field on Case based on Licence Type field on Case.
List<Case> caseList = [SELECT Id,Subject,LMT_LicenceType__c,(SELECT ID FROM LMT_Licence_Class_Definition_ForCase__r.LMT_LicenceClassDefinition__r) FROM LMT_LicenceType__c FROM Case WHERE Id = :caseId ];
Getting below errors:
Expecting ']' but was: 'FROM'
Unexpected token 'WHERE'.
Unexpected token ':'.
Extra ';', at ']'.
Variable does not exist: Id
Expression cannot be a statement.
- We have a component to capture specific fields on case object from case fields. So we have a requirement to add new Field Licence Class Definition.
- As discussed previously, Licence Type is a look up on Licence Class. So, even on this custom component, we want to make Licence Class field dependant on Licence Type.
- I tried couple of ways by creating Licence Class as a lookup to Licence Type itself and filtering Licence Class Values from that field but my query didn’t go well.
- Now, I want to know how to query specific licence Classes based on Licence Type value selected by User. It should be that dynamic in showing results to users.
We have that component on Case Object