• Guru Ram
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 0
    Replies
1.Implement trigger in store__c custom object , trigger will only execute when Default Address is true
  1. Create 2 fields in  Place__c  custom object, City and Country.
  2. Fetch Stock__c custom object City and country with help of Store__c id, Stock__c and Store__c Relation ship (One to Many)
  3. Update Palce__c address field City and Country
public class  FileController {        
    public Document doc {get;set;}  
    public PageReference getFile() {        
        String fileId = System.currentPageReference().getParameters().get('id');        
            if(fileId != null) {            
                doc = [SELECT Id, Name, Description, ContentType, Type, Url, BodyLength, Body               
                       FROM Document WHERE Id = :fileId];   
            }       return null;                
    }                        
}
public class MyCases {
    public list<Case> acc{get;set;}
    public String defaultLanguage{get;set;}
  public String selectedLanguage {get;set;}
    public MyOpenCases() {
        acc=new list<case>();
        onLoad();
                   
          defaultLanguage=userinfo.getLanguage();
                selectedLanguage  = defaultLanguage;
         }
    
    public void onLoad(){  //This function get called automatically on on load
 
        acc=[SELECT CaseNumber,Status,CreatedDate,ClosedDate FROM Case WHERE status='open' AND Limit 200 ];
 
 
    } 
}
how to resizing the dynamic visualforce page 
public class EC_CaseDetailController {
public String currentRecordId {get;set;}
public String parameterValue {get;set;}
public Case ca{get;set;} 
    public EC_CaseDetailController(ApexPages.StandardController controller) {
        currentRecordId  = ApexPages.CurrentPage().getparameters().get('id');
        ca = [select Casenumber,
              PRX_Entity__c,
              PRX_Type_of_request__c,
              Status, 
              CreatedDate,
              ClosedDate,
              PRX_Number_of_requests__c,
              PRX_Partner_Customer_name__c,
              ContactEmail,
              PRX_Name__c,
              PRX_Free_text_field__c,
              PRX_Mobile_number__c from Case where id =: currentRecordId ];
        parameterValue = ApexPages.CurrentPage().getparameters().get('nameParam');
    }