You need to sign in to do that
Don't have an account?
vijayabhaskarareddy
Error: Compile Error: line 15:42 no viable alternative at character '‘' at line 15 column 42
can anyone help me on this task .
public with sharing class TrainingCasefilter {
public id accRecId;
private integer totalRecs = 0;
private integer OffsetSize = 0;
private integer LimitSize= 10;
public TrainingCasefilter(ApexPages.StandardController controller) {
accRecId = [select id from account where id = :ApexPages.currentPage().getParameters().get('id')].id;
totalRecs = [select count() from case where accountID= :accRecId];
}
List<case> trainingCases;
public List<case> getTrainingCases() {
if(accRecId != null) {
trainingCases= [SELECT Id, Contact.name, recordtype.id, casenumber, subject, priority, createddate, status, createdbyid
FROM Case
WHERE RecordType.Name ='Training' AND account.id=:accRecId LIMIT :LimitSize OFFSET :OffsetSize];
}
return trainingCases;
}
public void FirstPage()
{
OffsetSize = 0;
}
public void previous()
{
OffsetSize = OffsetSize – LimitSize;
}public void next()
{
OffsetSize = OffsetSize + LimitSize;
}public void LastPage()
{
OffsetSize = totalrecs – math.mod(totalRecs,LimitSize);
}
public boolean getprev()
{
if(OffsetSize == 0)
return true;
else
return false;
}
public boolean getnxt()
{
if((OffsetSize + LimitSize) > totalRecs)
return true;
else
return false;
}
}
public with sharing class TrainingCasefilter {
public id accRecId;
private integer totalRecs = 0;
private integer OffsetSize = 0;
private integer LimitSize= 10;
public TrainingCasefilter(ApexPages.StandardController controller) {
accRecId = [select id from account where id = :ApexPages.currentPage().getParameters().get('id')].id;
totalRecs = [select count() from case where accountID= :accRecId];
}
List<case> trainingCases;
public List<case> getTrainingCases() {
if(accRecId != null) {
trainingCases= [SELECT Id, Contact.name, recordtype.id, casenumber, subject, priority, createddate, status, createdbyid
FROM Case
WHERE RecordType.Name ='Training' AND account.id=:accRecId LIMIT :LimitSize OFFSET :OffsetSize];
}
return trainingCases;
}
public void FirstPage()
{
OffsetSize = 0;
}
public void previous()
{
OffsetSize = OffsetSize – LimitSize;
}public void next()
{
OffsetSize = OffsetSize + LimitSize;
}public void LastPage()
{
OffsetSize = totalrecs – math.mod(totalRecs,LimitSize);
}
public boolean getprev()
{
if(OffsetSize == 0)
return true;
else
return false;
}
public boolean getnxt()
{
if((OffsetSize + LimitSize) > totalRecs)
return true;
else
return false;
}
}
Not sure what is the exact issue causing the error., but I modified your code bit and able to save successfully. Please find below modified code:
Let me know if that works for you.
Best Regards,
BALAJI
All Answers
Not sure what is the exact issue causing the error., but I modified your code bit and able to save successfully. Please find below modified code:
Let me know if that works for you.
Best Regards,
BALAJI
Could u please let me know my mistake
Both seems to be same but different characters.