You need to sign in to do that
Don't have an account?
Error: Compile Error: expecting a semi-colon, found '(' at line 55 column 29
I don't understand my compile error, any ideas? see error line below in red (
|
public class ProductRenewalInformationPageController {
public account a {get;set;}
public Boolean editMode {get;set;}
public Boolean editAccess {get;set;}
public Boolean isAdmin {get;set;}
public productRenewalInformationPageController(ApexPages.standardController std){
editMode = false;
if(a == null) a = [
SELECT name, OwnerId, CreatedDate, Product_Domain_Protect__c, Product_EIS_Gold__c, Product_EIS_Platinum__c,
Product_Certification__c, Product_Additional_AM_Services__c,Product_Email_Client_Monitor__c, Product_Professional_Services__c,
Product_EIS_Internal_Use__c, Product_General_Referral__c,Product_EIS_Child__c, Product_Tools_Reseller_API__c, Product_Cert_Referral_Framework__c,
Product_Certification_Referral_Child__c, Product_Tools_Reseller_Framework__c,Product_Inbox_Insight__c, Product_Email_Brand_Monitor__c, Product_Email_Brand_Monitor_Child__c,
Product_Domain_Protect_Child__c, Product_Domain_Secure__c, Product_Domain_Secure_Child__c
FROM account WHERE id = :ApexPages.currentPage().getParameters().get('id')
];
//determine if user can make changes
user u =[select id, profile.name from user where id = :userinfo.getuserid()];
if(u.profile.name == 'Exec Admin' || u.profile.name == 'Finance'){
isAdmin = true;
} else {isAdmin = false;}
if(isAdmin == true){
editAccess = true;
} else {editAccess = false;}
{
// only proceed if the user has edit rights
if(editAccess = true) {
//editMode is used as a view state variable (only Admin and Finance can edit) Initializes as false but once true page rerenders to display inputfields rather than output fields
if(editMode == false) {
editMode = true;
} else {
// this part of the code is where any values that were entered by the use are saved
editMode = false;
update a;
return null;
}
} else {
if(editAccess == false) ApexPages.addMessage (new ApexPages.Message(ApexPages.Severity.ERROR,'You are not authorized to make changes to this page.'));
return null;
}
}
public PageReference save() {
update a;
return (new ApexPages.StandardController(account)).view();
}
}
Several bugs... = instead of ==, mismatched braces... here's my best guess for your code...
I have also same problem,
butt that problem is in Test class.
how can we solve that issue?
Thank you in advance.