You need to sign in to do that
Don't have an account?
Apex Code Error When running anonymous block: Unexpected token '<'.
When I run the below code I get the error I listetd in the title:
Unexpected token '<'.
I believe it is my syntax but I can't see a debug log that directs me to a line in my code that is listing the issue.
Below is the code I am trying to run.
List<CCMI__Milestone_Project__c> CCMIProject =
[SELECT
CCMI__Opportunity__c,
Id
FROM CCMI__Milestone_Project__c WHERE id = a6X3D000000OVfGUAW
];
List<CCMI__Milestone_Task__c> CCMITask =
[SELECT
CCMI__Milestone_Project__c,
Id,
Name
FROM CCMI__Milestone_Task__c WHERE Project__c = a6X3D000000OVfGUAW
];
List<CCMI__Milestone_Task__c> TempTask =
[SELECT
CCMI__Milestone_Project__c,
Id,
Name
FROM CCMI__Milestone_Task__c WHERE Project__c = a6X3D000000OVerUAG
];
List<Department_To_Task__c> DeptTask =
[SELECT
Id,
Milestone_Task__c,
Name
FROM Department_To_Task__c
];
List<Opportunity> Oppo =
[SELECT
Id
FROM Opportunity WHERE id = 0063D00000AudqdQAB
];
List<OpportunityTeamMember> OppoTeam =
[SELECT
Id,
Name,
OpportunityId,
TeamMemberRole
FROM OpportunityTeamMember WHERE OpportunityId = 0063D00000AudqdQAB
];
List<CCMI__Milestone_Assignment2__c> Assign =
[SELECT CCMI__Assignee_Name__c,CCMI__Milestone_Task__c
FROM CCMI__Milestone_Assignment2__c
];
for(CCMI__Milestone_Task__c TT:TempTask){
for (CCMI__Milestone_Task__c CT:CCMITask){
for(Department_To_Task__c DT:DeptTask){
for(OpportunityTeamMember OT:OppoTeam){
if(TT.Name == CT.Name && OT.TeamMemberRole == DT.Name )
{
Assignment sign = new sign (
Assign.CCMI__Assignee_Name__c = OT.Name;
Assign.CCMI__Milestone_Task__c = CT.Id;
System.debug('** True **');
)
insert sign;
}
}
}
}
}
update Assign;
E.g.
All Answers
E.g.