• Praveen Kimar
  • 10 Points
  • Member since 2012

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
  • 22



I have an issue in VF page.


My issue is, i have created a VF page and assigned to a public site as the site template. It worked fine till yesterday, I haven't done any changes but now i am getting " Illegal group reference" exception. can anyone help me on this. So that i will be able to correct my mistake if i did any. I could not able to find what the reason is.


Please suggest me how can i resolve this ?



Praveen K.






We have added the Service Cloud Console app. But it is not showing any sidebar components in the left navigation part like "Recent Items" and "Custom Links".

These components should be displayed across the application ( on all the tabs ).


Please help me on this.


Its urgent...


Thanks in Advance.



Praveen K.







i have a formula field to calculate my contact's age based on DOB. I would like know, will Salesforce auto update the age field yearly to change the age?


Meaning that, the moment i create a contact with DOB = 1 Dec 1980 and my formula field will calculate the age as 33 (2013 - 1980). When reach 2014, is there a way to auto update the age to 34 (2014-1980) and subsequenctly to 35,36,37.. without editing the contact?



<apex:page standardStylesheets="true" tabStyle="Customer_Details__c" sidebar="false" showHeader="true" Controller="merchantService">
    <apex:form >
        <apex:pageMessages />
        <apex:pageBlock >
            <apex:pageBlockSection columns="1">
                <apex:pageBlockSection title="Customer Details" Collapsible="False">
                    <apex:inputField value="{!cusDet.First_Name__c}" required="true"/>
                    <apex:inputField value="{!cusDet.Last_Name__c}"/>
                    <apex:inputField value="{!cusDet.Email_ID__c}"/>    
                    <apex:inputField value="{!cusDet.Contact_No__c}"/>   
                <apex:pageBlockSection title="Product Details" collapsible="false" columns="3">
                    <apex:inputField style="width : 225px" value="{!proDet.Name}" required="true"/>
                    <apex:inputField style="width : 300px" value="{!proDet.Unit_Price__c}"/>
                    <apex:inputField style="width : 375px" Value="{!proDet.Quantity__c}"/>
                <apex:pageBlockSection >
                    <apex:commandButton style="float:right;" value="Add Row"/>
                    <apex:commandButton style="float:left;" value="Delete Row"/>
              <apex:commandButton value="Save" action="{!save}"/>
              <apex:commandButton value="Generate Receipt"/>
              <input class="btn" type="reset" value="Reset"/>


public class merchantService
   public Customer_Details__c cusDet{ get; set;}
   public Product_Detail__c proDet{get; set;} 
    public merchantService()
    cusDet = new Customer_Details__c();
    proDet = new Product_Detail__c();
    public PageReference save() 
        //try {
             insert cusDet;
             proDet.Customer_Name__c = cusDet.First_Name__c;
             upsert proDet;
             ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.INFO,'Save Successful.');
        //    } 
       // catch(System.DMLException e) 
       //    {
       //     ApexPages.addMessages(e);
        //    return null;
         //   }
            // After Save, navigate to the default view page:
            //return (new ApexPages.StandardController(pinfo)).view();
            return null;
}Here ,
First_Name__c is not unique.
Email_ID__c is unique.
Whenever I'm changing just the email id (First name unchanged) it gives the below error. But if I change the name too then it works fine.
Please suggest .
23:43:37:131 EXCEPTION_THROWN [4]|System.DmlException: Insert failed. First exception on row 0 with id 0019000000H6g5WAAR; first error: INVALID_FIELD_FOR_INSERT_UPDATE, cannot specify Id in an insert call: [Id]

Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger ItemizationAfterTrigger caused an unexpected exception, contact your administrator: ItemizationAfterTrigger: execution of AfterUpdate caused by: System.DmlException: Update failed. First exception on row 0 with id a0vS0000002vAnqIAE; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, You do not have sufficient Amount for reimbursement.: []: Class.ItemizationClass.UpdateApprovedandPending: line 41, column 1

I am getting the above the error.I have trigger on the object to update the value of the status to approved but if the amount is negative i have a negative so any suggestions on how to handle this would appreciated.

Error: Compile Error: Invalid initial expression type for field Opportunity.Primary_Industry_Percent__c, expecting: Decimal


Opportunity Opp= new Opportunity(Name='Sample',

Primary_Industry__c='Consumer Goods',

I am getting this error while writing test class for a trigger on opportunity for trigger events like after insert , befre insert , after update.before update


Please help me.......


System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, OpportunityOneTrigger: execution of AfterInsert.


Class.TestAutoLaunchApprovalTrg.myUnitTest: line 80, column 1


private class TestAutoLaunchApprovalTrg {
    static testMethod void myUnitTest() {
        list<RecordType> rectype = [select Id,name from RecordType where SobjectType='Opportunity'];
        map<string,Id> mprecname = new map<string,Id>();
        for(RecordType rec:rectype){
        decimal MgmtQuarterlyFees = 20000;   
        decimal Expected = 1000;        
        Account acc = [select Id,name from Account limit 1];
        User uUnderwriter = [select Id from User where UserRole.Name = 'Global Coverage Underwriter' and IsActive = true limit 1];
//Inserting Opportunity 
        Opportunity opp = new Opportunity(); 
        opp.RecordTypeId = mprecname.get('META Documentation');
        opp.MEA_vs_Global__c = 'Global';
        opp.MGEC_Anticipated_Funding_Date__c = system.today();
        opp.Customer_Reply_Deadline__c = system.today();
        opp.Country__c = 'Algeria';
        opp.Name = 'Test Auto Launch Approval Trg'; 
        opp.AccountId = acc.Id;
        opp.MGEC_Confidence__c = '10%';
        opp.StageName = 'Prospecting';
        opp.MGEC_Vs_Customer__c = 'Both';
        opp.Comments_Next_Steps__c = 'cmts';
        opp.Opportunity_Source__c = 'EFS';
        opp.Risk_Closing_Memo_Attached__c = true;
        opp.Legal_Checklist_attached__c = true;
        opp.Final_Pricing__c = true;
        opp.KYC_Docs_Attached__c = true;
        opp.Tax_Checklist_Attached__c = true;
        opp.IC_Minutes_Attached__c = true;
        opp.Commitment_Fee_closing__c = 30;
        opp.Adjusted_ROE_closing__c = 23;
        opp.Adjusted_ROI_Closing__c = 18;
        opp.EBITDA_Closing__c = 13;
        opp.Spread_bps_closing__c = 12;
        opp.Anchor_Fee_closing__c = 11;
        opp.Loss_Provision_closing__c = 10;
        opp.MGEC_Asset_Class__c = 'Equity';
        opp.Deal_Pole__c = 'MEA';
        opp.MGEC_Deal_Category__c = 'Retro';  
        opp.MGEC_Vertical__c = 'SME';
        opp.Fixed_Floating__c = 'Fixed';
        opp.Lease_Loan__c = 'Loan';
        opp.CurrencyIsoCode = 'USD';
        opp.MGEC_Commitment_Amount__c = MgmtQuarterlyFees;
        opp.Expected_O_S__c = Expected;
        opp.MGEC_MNPI__c = 'Yes';
        opp.MGEC_Confidential__c = 'No';
        opp.CloseDate = system.today();        
        opp.ERM__c = true;
        opp.Program_New_Exist__c = 'New';
        opp.Compliance_Approvers__c = 'Pierre Abinakle';        
        opp.MDC_Representative_META__c = 'MDC Rep';
        opp.GE_Representative_META__c = 'GE Rep';
        opp.Underwriter__c = uUnderwriter.Id; 
        insert opp;
        Opportunity opp1 = opp.clone(false,true);
        opp1.RecordTypeId = mprecname.get('META Term Sheet'); 
        insert opp;
        opp1.RecordTypeId = mprecname.get('META underwriting');
        update opp1;



I have a table with two cells in the same row containing pageBlocks that contain rich text area fields. I have been asked to get the pageBlocks to be the same height, i.e. make the shorter pageBlock the same height as the taller one.

Any suggestions?

I have tried wrapping in outputPanels with styleClasses without success.

FYI I am using pageBlocks for consistent styling. I could get rid of them but would need to figure out how to retain the styling.

<apex:outputField value="{!myObject__c.RTA1__c}"/>

<apex:outputField value="{!myObject__c.RTA2__c}"/>




public class ListPrimitiveDataype
public List<String> fstName{get;set;}
public List<String> lstName{get;set;}

public ListPrimitiveDataype()
fstName= New List<String>();
lstName= New List<String>();

public List<String> getfstName()
List<String> lst = New List<String>();
return lst;





<apex:page controller="ListPrimitiveDataype">
<apex:form >
<apex:pageblockTable value="{!fstName}" var="f">
<apex:column value="{!f.lst}"/>


i have error message here   "  Error: Unknown property 'String.lst'  .....


please help me 

  • October 08, 2012
  • Like
  • 0

Hi All,


We have a after insert trigger on EmailMessage object to Capture "To Email address" (routing address) in Email To Case(We have 10 routing address).

Whenever a Case gets created from Email to Case, in case history it shows like this.


        10/3/2012 11:28 AM       Surander           Changed Owner (Assignment) from  Gallucci to Team1.  

                                                                               Changed Owner (Assignment) from  Surander to Galluci.                          



But Surander is the Automated Case User, Gallucci is the Default owner of a case when assignment rules fail to locate an owner and Team1 is Queue.


But ideally it should not Change the Owner to Gallucci (If assignment rules locates an Owner for Case). 

If i inactive the trigger it is working fine, and Case history shows like this. 


      10/3/2012 11:28 AM        Surander             Changed Owner (Assignment) from  Surander to Team1.                            



I need to write a workflow, when ever case owner is Gallucci, but for each and every Case workflow is firing because of the above issue.


Trigger Code:


trigger ToAddress on EmailMessage (after insert) {    
    List<Case> cases = new List<Case>();
    for (Integer i = 0; i < Trigger.new.size(); i++ )
        EmailMessage newEmail = Trigger.new[i];
        List<Case> c = [SELECT id, Description, caseNumber FROM Case WHERE Id = :newEmail.ParentId];
        if (c.size() > 0 ){            
        c[0].To_Address__c= newEmail.ToAddress;           
             update c;            
       catch(exception e)
          update cases;



Please reply with any coding or configuration that will help in this regard.

Any help is much appreciated.



Susheel Reddy


We are trying to use apex:inputField to edit the field body of Standard Object "Question" in a visualforcepage.

Our problem is that the editor which renders with apex:inputField is visible when we look at the visualforce page inside SFDC.

But, it doesn't render when we call this page inside Salesforce site.

We need apex:inputField since we want to give user the ability to upload image while editing the post.

We have given permissions to all fields. 

Can you please help us with this?

  • July 31, 2012
  • Like
  • 0
When I attempt to save a VF page from the Force.com IDE, I get the above message... Any ideas?

I can't seem to find it in any documentation on this, either for VisualForce or the Force.com IDE. It only seems to happen for certain pages, and I can't figure out what may be causing it.


  • December 01, 2008
  • Like
  • 0
How do I query the Territories that are associated with an Account?  I found another thread that mentioned the AccountShare object, but I don't see how that helps...

  • August 05, 2008
  • Like
  • 0
I need to implement multi language on approx. 17 Visualforce pages, to add support for the Chinese language.
I’m struggling to come up with an elegant way to implement this.  It would be nice to have a repository in Salesforce that would tie to text blobs that could be referenced, and the language conversions could be tied into standard Salesforce translation functionality.  I could build my own repository for this, (Which is what I would do if I was building a normal web page) but I’m concerned about the cost in SOQL calls and running into SOQL limits for text translation.  It would also be challenging to have the “hard coded text” for multi languages stored in the controller or another class.  Chances are I'll need to eventually add French, Spanish, etc.
I'm going to throw this out on ideas, but I was curious if anyone has figured out an elegant way to do this.  (http://ideas.salesforce.com/article/show/10089968/Best_Practices_Ideas_for_Supporting_MultiLanguage_in_Visualforce)
Jon Keener

I am trying ot create a new Long text area field with some default value which should look like:

1. This is line One.
2. This is line Two.

Can anyone tell, how do i set the above text in the default section of the field as the section does not accept new line charachters. I am only able to set the text as:

"1. This is line One. 2. This is line Two."

I also tried using a formula function BR(), <BR>, \n\r, \r. But none of them works. Can anyone helpout with the correct syntax?

Thanks in advance.

When deactivating user in the salesforce.com user interface you are given three checkboxes:

Remove user from account teams

Remove user from sales teams of closed opps

Remove user from sales teams of open opps. (This one is checked by default).

When deactivating user with the API, do any of the above occur?

  • December 06, 2004
  • Like
  • 0