• gopi biswal
  • NEWBIE
  • 40 Points
  • Member since 2014

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies
I'm opening a VF page in mobile via site. but the image and all the fields in this page are not in a right proportion(not aligned properly).The same if I open in my PC it's working fine. So plz any advice or solution... Thanks in advance...
I have one Apex Class. I want to access that Apex Class variable from other controller classes. If I'll change the value from any controller, then that same value should be available  to all controller. 
Am haviing two vf pages, each page has assigned to separate record type, i created one custom button to navigate record edit page, here am getting error coz of for loop, guys please help me, where i went wrong.
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")} 
if({!Invoice__c.RecordTypeId} =='01250000000V8nG'){ 

alert("hi"); 

var refString = '/apex/ShowAllTimecards2?RecordType={!Invoice__c.RecordTypeId}&id={!Invoice__c.Id}'; 
window.location.href=refString; 
} 

else { 

var refString1 = '/apex/Semiinvoice?RecordType={!Invoice__c.RecordTypeId}&id={!Invoice__c.Id}'; 
window.location.href=refString1; 
}
Hi,

I am getting the below exception in my apex trigger. Can anyone suggest me how to resolve this issue?

FATAL_ERROR|System.LimitException: Query of LOB fields caused heap usage to exceed limit.

Thanks,
Vijay
Hi All,

I have a Custom object called Branch__c, which has Region__c and Country__c picklist fields.

Branch__c is a Lookup on Lead object.

Lead also have Region__c and Country__c picklist fields,

So, I want to update the Branch__c Lookup field on Lead, If the Branch Region__c and Country__c fields matches with Lead Region__c and Country__c.
If Branch Region__c is null. update the Lead Region__c with Bangalore.

For this I wrote a Trigger below.

It is saving without errors, but it will not update the Lookup field on Lead.
 
trigger UpdateBranch on Lead (before insert, before update) {
    Set<Id> ids = trigger.newmap.keySet();
    Lead ld;
    
    for (Lead lT:Trigger.new){
        ld = lT;
    }
    
    try{
        List<Branch__c> brList = [Select Id, Name, Country__c, Region__c, Email_ID__c from Branch__c where Id IN : ids];        
        Branch__c b = new Branch__c();
        for (Branch__c br : brList){
            if (brList .size() > 0 && ld.Country == br.Country__c && b.Region__c != Null){
                    ld.Branch_NAME__c = br.Id;
                    ld.Region__c = br.Region__c;
            }
            else{
                ld.Branch_NAME__c = null;
                ld.Region__c = 'Bangalore';
            }
        }
        }catch(Exception e){
         ld.addError('unable to find the Branch Name  ' + e.getMessage());
        }

}

Thanks in advance................
I have one Apex Class. I want to access that Apex Class variable from other controller classes. If I'll change the value from any controller, then that same value should be available  to all controller.