• SalesforceSC
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 3
    Replies
Our developer console in our Enterprise org has been acting up when you scroll it with the mousewheel the last few weeks, and support refuses to help with the issue becuase we don't pay them enough money I guess. 
When we try to scroll on the dev console using the mousewheel, it will keep fighting you, trying to scroll back the opposite of the direction you were trying to scroll in. This causes the window's scroll position to jerk around and makes it very hard to keep your place in large code files.
Has anyone else faced this issue? It is in Chrome
When an opportunituy is changed to 'Closed Won' we would like to have a new custom object, Location_Status__c, created. I have included my trigger so far. When I save it I dont have any errors and am able to update/create Opportunities without any errors, but the custom object is not created. This code is specific for an Opportunity that is located in Albuquerque NM and hase the StageName of 'Closed Won'.

Thanks! 
 
trigger locStatusOpp on Opportunity (after update) {

    for (Opportunity opp : Trigger.new) {
        
        List<Location_Status__c> loc = [SELECT Id,
                                        On_List__c,
                                        Location__c,
                                        Vendor_Type__c,
                                        OpportunityR__c
                                 FROM   Location_Status__c];
        for (Location_Status__c locLoop : loc)
        if (opp.StageName == 'Closed Won' || opp.Vendors__c == 'Bartender' || opp.Location__c == 'Albuquerque NM'){
            Location_Status__c locNew     =  new Location_Status__c(
            Name                   		  =  opp.Name,
            Location__c           		  = 'Albuquerque NM',
            Vendor_Type__c       		  = 'Bartender',
            OpportunityR__c       		  =  opp.Id);      
        }
        insert loc;
    }
}

 
Hi everyone ive asked this question alot and am yet to get a solution. I need to populate a lookup field with a record that matches some criteria. Attached is my code and entity model etc
trigger setTermsConditions on DOUM_DOU__c (before insert, before update) {

Map<Id,Id> cases = new Map<Id,Id>(); 
 
    List<DOUM_Terms_Conditions__c> listGL = new List<DOUM_Terms_Conditions__c>(); 

try{     

listGL = [Select DOUM_TermsConditions.Name, DOUM_Terms_Conds__c from DOUM_DOU__c where Id In: trigger.newMap.keySet() AND DOUM_Terms_Conditions__c.DOUM_TCs_RD__c = NULL]; 

}catch(exception e){ 

 system.debug(e.getmessage()); 

} 

if(listGL !=null && ! listGL.isempty()){  

    for(DOUM_DOU__c objGL: listGL) 
 
    { 

        cases.put(objGL.id,objGL.DOUM_TermsConditions__r.Name); 
        
    } 

} 

    for (DOUM_DOU__c a : Trigger.new) 

    { 
    
        if(a.DOUM_Terms_Conds__c != nul && cases.containskey(a.DOUM_Terms_Conds__c)) 

        { 
            a.DOUM_Terms_Conds__c = cases.get(a.DOUM_Terms_Conds__c); 

        } 
    } 

} 


}
My code doesnt save because i get this error
 
Error: Compile Error: Didn't understand relationship 'DOUM_TermsConditions' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. at line 9 column 10


User-added image
Our developer console in our Enterprise org has been acting up when you scroll it with the mousewheel the last few weeks, and support refuses to help with the issue becuase we don't pay them enough money I guess. 
When we try to scroll on the dev console using the mousewheel, it will keep fighting you, trying to scroll back the opposite of the direction you were trying to scroll in. This causes the window's scroll position to jerk around and makes it very hard to keep your place in large code files.
Has anyone else faced this issue? It is in Chrome