• Jai Suresh
  • NEWBIE
  • 25 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 5
    Replies
I am trying to create a case and send an email with attachment related to the case.
Both are working fine, but the email is not listed under the respective case, but the attachment is properly listed.

Here is the code:
for (Case cRow: lstcase) 
	{
		//....
		String[] arrSendEmailAdd = new String[]{};
		arrSendEmailAdd = toAdd.split(',');

		Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
		email.setToAddresses(arrSendEmailAdd);

		String mailSubject = 'Your Sterling Membership E Kit-ID - '+cuRow.Name;
		String mailMessage = '';
		email.setSubject(mailSubject);
		email.setHtmlBody(mailMessage);
		email.setSaveAsActivity(false);
		email.setWhatId(cRow.Id);
		//...
		//Attachment
		//....
		Messaging.sendEmail(new Messaging.SingleEmailMessage[] {email});
	}

 
Hi, I require some help in the following scenario.

When a User is deactivated, a workflow is triggered to send an email to the User's Manager.

I now have to extend this to include the summary of records owned by the User (Contacts, Accounts, Opportunities etc.)

How can I manage this using email templates/visualforce components and apex class?

Any help will save me lots of time in searching for a solution.

Thank you.
I am new to Visual Flow and have just started learning what and how.

In a record, I have to populate three lookup fields using Flow and before I end up in a final screen, if all the lookups are successfully populated, I have to approve that record else I have to send an error email to the record owner.

I have managed only upto populating the three lookups and now trying to find a way to accomplish the approval process through Flow without any manual intervention.

Thank you.
This is going to be tricky.

I have two related objects.

ObjOne has two date Fields StartDate, EndDate
ObjTwo has a lookup to ObjOne and Date, a date field

When I save ObjOne, I need to find the number of days between the two dates and create that many ObjTwo records, each populated with a date (starting StartDate till EndDate).

My trouble is with the dates. Any help is welcome.

Thank you

I understand there is a 14 days limit for calendar (all day events). I need to create events that is upto 90 days long. Is there any efficient way to accomplish that?

Thank you.

I am new to Visual Flow and have just started learning what and how.

In a record, I have to populate three lookup fields using Flow and before I end up in a final screen, if all the lookups are successfully populated, I have to approve that record else I have to send an error email to the record owner.

I have managed only upto populating the three lookups and now trying to find a way to accomplish the approval process through Flow without any manual intervention.

Thank you.
Hi, I require some help in the following scenario.

When a User is deactivated, a workflow is triggered to send an email to the User's Manager.

I now have to extend this to include the summary of records owned by the User (Contacts, Accounts, Opportunities etc.)

How can I manage this using email templates/visualforce components and apex class?

Any help will save me lots of time in searching for a solution.

Thank you.
Hi All,

We are getting this error while inserting Case Manual share records through Apex manual sharing.

duplicate value found: <unknown> duplicates value on record with id: <unknown>

We are not able to identify and reproduce this error.

Can someone provide some inputs on cause of this error?

Thanks
Deepak
Hello,

I created the class below to fire from a trigger on the Update of a custom object.  The code is designed to update 2 fields on an associated Account with values from the associated custom object.  The Account_Manager_Handoff_Notes__c field updates fine.  However, the Secondary_Owner__c field does not update at all.  Can anyone help me decifer why that field is not updating?  Thanks,

public void addNotes(List<Account_Manager_Handoff__c> accountManagerHandoffs){
        
        Set<Id> accountsInTrigger = new Set<Id>();
        Map<String,String> accountMap = new Map<String,String>();
        List<Account> accountsToUpdate = new List<Account>();
        
        FOR(Account_Manager_Handoff__c amh : accountManagerHandoffs){
            IF(amh.AccountLookup__c != NULL){
            
            accountsInTrigger.add(amh.AccountLookup__c);
            String notes = amh.Platform_Experience__c + '\n\n' + amh.Issues_Encountered__c + '\n\n' + amh.Known_Goals__c + '\n\n' + amh.Additional_Notes__c;
            String owner = amh.Assigned_Account_Manager__c;
            accountMap.put(amh.AccountLookup__c,notes);
            accountMap.put(amh.AccountLookup__c,owner);
                
            }
        }
        
        FOR(Account a : [SELECT
                            Id,Account_Manager_Handoff_Notes__c,OwnerId
                         FROM
                            Account
                         WHERE
                            Id In :accountsInTrigger]){
                             
                             a.Account_Manager_Handoff_Notes__c = accountMap.get(a.Id);
                             a.Secondary_Owner__c = accountMap.get(a.Id);
                             accountsToUpdate.add(a);
                             
                         }
        
        UPDATE accountsToUpdate;
        
    }


I am new to Visual Flow and have just started learning what and how.

In a record, I have to populate three lookup fields using Flow and before I end up in a final screen, if all the lookups are successfully populated, I have to approve that record else I have to send an error email to the record owner.

I have managed only upto populating the three lookups and now trying to find a way to accomplish the approval process through Flow without any manual intervention.

Thank you.
This is going to be tricky.

I have two related objects.

ObjOne has two date Fields StartDate, EndDate
ObjTwo has a lookup to ObjOne and Date, a date field

When I save ObjOne, I need to find the number of days between the two dates and create that many ObjTwo records, each populated with a date (starting StartDate till EndDate).

My trouble is with the dates. Any help is welcome.

Thank you