• Arvind Balijepalli
  • NEWBIE
  • 29 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 8
    Replies
I am referring to the page 214 on apex dev guide and confused with the table as such , am okay with first and second column of it ,but did not get what below meant ? can someone pls explain me 
  • Can update original object using an update DML operation
  • Can delete original object using a delete DML operation
i am running below indeveloper console and it doesnt print system.debug ? i suspect something wrong with the way list is retrieved ? pls let me know 


list<list<Sobject>> results = [find '4155557000' in PHONE FIELDS RETURNING contact(Phone, FirstName, LastName),
                                Account(Id, Phone, Name)];


list<Sobject> results1=results[0];

for(Sobject r : results1)
{
    if(r.getSobjectType()==Account.sObjectType)
    {
   account acc = (account)r;
    
    system.debug('value is '  + acc.Name);
    }
    
}
User-added image

I have created a permission set with the system permission "Two-Factor Authentication for User Interface Logins" and assigned it to the Samantha Cordero users. Here is the login history which i have used the Authenticator to authenticate the login of the user.

User-added image
What else am i missing? Any help is much appreciated.
I have a trigger below that works but i need it to check a Primary_Quote__c checkbox on the newest created quote on an opportunity with the record type of "NA Opportunity Record Type".  How would i accomplish adding a filter to only check the newest Primary_Quote__c quote while unchecking previous qoutes?


 
trigger Trigger_MarkPrimaryQuote on Quote (before insert) { 
    List<Id> opptyList = new List<Id>();
    for(Quote qRec : Trigger.New)
        opptyList.add(qRec.OpportunityId);
        
    Map<Id,Opportunity> opptyMap = new Map<Id,Opportunity>([Select Id, RecordType.Name from Opportunity where Id IN :opptyList]) ;
    for(Quote qRec :Trigger.New ) {
        if(opptyMap.containsKey(qRec.OpportunityId) && opptyMap.get(qRec.OpportunityId).RecordType.Name == 'NA Opportunity Record Type')
            qRec.Primary_Quote__c = true;
    
    
    }
    }

 
  • May 05, 2016
  • Like
  • 0
Hello,
I am a Trailhead Newbie. How do I know if I have already created my Developer Org? When I click on Connect To Your Developer Edition it gives me the option to Log In With Developer Edition or Create a New Developer Edition; when I click on Connect To Your Developer Edition it asks me to authorize Salesforce Developer to access my information, basic data, etc; when I click on Create a New Developer Edition, it asks me to enter a Username, but when I use my current log in e-mail, it says it's already being used so not sure if I've created a Developer Org already? I appreciate your help!
Chelsea
I am referring to the page 214 on apex dev guide and confused with the table as such , am okay with first and second column of it ,but did not get what below meant ? can someone pls explain me 
  • Can update original object using an update DML operation
  • Can delete original object using a delete DML operation
i am running below indeveloper console and it doesnt print system.debug ? i suspect something wrong with the way list is retrieved ? pls let me know 


list<list<Sobject>> results = [find '4155557000' in PHONE FIELDS RETURNING contact(Phone, FirstName, LastName),
                                Account(Id, Phone, Name)];


list<Sobject> results1=results[0];

for(Sobject r : results1)
{
    if(r.getSobjectType()==Account.sObjectType)
    {
   account acc = (account)r;
    
    system.debug('value is '  + acc.Name);
    }
    
}