• SouvikSome
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hi, 
I have select query as below. Based on the result, I want to send a single email with multiple records. How can I do that? I'm using Apex and visualforce page for this feature. If I use for loop, i can only get one record at a time and that is not what I want. 

public PageReference sendEmail(){
        system.debug('Status value is here '+statusValue);
        Records = [select Asset_Type__c, id, Active__c, Name, CPU_Model__c, Expiry_Date__c, Hostname__c, Location__c, Manufacturer__c, Model__c, PO_Number__c, Purchase_Date__c, Remark__c from IT_Inventory__c where Active__c =: statusValue];
        
//I want to send the whole list of result via email here. 

        return null;
    }
Hi All,
I have a trigger on attachment object to update the case owner based on the attachment type.
But the owner is being reassigned to case default owner (under Support Settings)

I have tried the dml options but it didn't work.
Any pointers/workarounds will be highly appreciated.
Many thanks in advance
Hi Can someone explain how to set the lookup (from account name value) to conatct name when creating contact from anonymous window.

List<contact> contactToSave = new List<contact> ();
Contact cont = new Contact();
Account acctRef = new Account(name='University of Arizona'); // need to set this name to contact which I'm creating below. Account name already available on org 
cont.FirstName='Test1';
cont.LastName='Test2';
cont.Department='Finance';
cont.name=actRef;
contactToSave.add(cont);
insert contactToSave;

please explain how this works...