You need to sign in to do that
Don't have an account?
developer_force
expecting a right parentheses, found 'SELECT'
HI,
need help in this
List<QueryObjectPrimaryRefField__c > listTest = new List<QueryObjectPrimaryRefField__c>(SELECT QueryObjectField__c fromQueryObjectName__c where QueryObjectPrimaryRefField__c = :ApexPages.currentPage().getParameters().get('id'));
the error says "expecting a right parentheses, found 'SELECT' at line 34 column 88"
I think its not possible to do all of that in one step.
Try this:
Id testId = ApexPages.currentPage().getParameters().get('id');
List<QueryObjectPrimaryRefField__c > listTest = [SELECT QueryObjectField__c from QueryObjectName__c where QueryObjectPrimaryRefField__c = :testId];
changed it but even its showing the same error
try this:
Id testId = ApexPages.currentPage().getParameters().get('id');
List<QueryObjectPrimaryRefField__c > listTest = new List<QueryObjectPrimaryRefField__c >();
listTest = [SELECT QueryObjectField__c from QueryObjectName__c where QueryObjectPrimaryRefField__c = :testId];