• ajbtv2
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies

I've been tasked with the following:

 

1.  Identify all assets with an Install Date of Today.

2.  Identify the Contact and Public Group Users associated with the Asset.

3.  Email all identified people with details about their asset.

 

Because of the Salesforce limits of only being able to send out 10 emails and online invoke 100 SOQL statements, I have not been able to find logic that will successfully satisfy this requirement.

 

I was going to use Mass Email, but it will not work with WhatIds of Assets (not will it allow me to connect users to the Asset).

 

I have had success in sending the email through a trigger when the Install Date is entered line by line, but any Mass Updates fail because of the limits mentioned and the requirement being to identify the individuals and Information per Asset Record.

 

Any assistance would be greatly appriciated.

I need some assistance bulkifing a trigger.

 

I have been tasked with setting up a Fulfillment Email trigger that notifies end users when an Asset has been shipped.

 

I have found I need to use the SingleEmail method due to needed to Mail Merge Asset Fields.

 

The system must identify the contact on the Asset, the Contacts in a group associated to the Asset, the contacts on the account requesting all notices sent, and if a web fulfillment all users in the Public Group associated to the account.

 

The trigger works well if I am updating a single record at a time.  I run into issues when my vendor asset also updates all associated records for other accounts giving me a 101 SOQL error.

 

I have been able to remove the error by updating out of the for loop, but the emails now only go to the first account (as expected) [0].

 

I have thought about running a schedule apex class, but if I can only send 2 or 3 notices at a time, that will take too long to complete.

 

Any assistance is greatly appriciated.  I have posted my WIP code below:

 

----- REMOVED CODE AS UPDATE IS AVAILABLE BELOW  ----- 

I need some assistance bulkifing a trigger.

 

I have been tasked with setting up a Fulfillment Email trigger that notifies end users when an Asset has been shipped.

 

I have found I need to use the SingleEmail method due to needed to Mail Merge Asset Fields.

 

The system must identify the contact on the Asset, the Contacts in a group associated to the Asset, the contacts on the account requesting all notices sent, and if a web fulfillment all users in the Public Group associated to the account.

 

The trigger works well if I am updating a single record at a time.  I run into issues when my vendor asset also updates all associated records for other accounts giving me a 101 SOQL error.

 

I have been able to remove the error by updating out of the for loop, but the emails now only go to the first account (as expected) [0].

 

I have thought about running a schedule apex class, but if I can only send 2 or 3 notices at a time, that will take too long to complete.

 

Any assistance is greatly appriciated.  I have posted my WIP code below:

 

----- REMOVED CODE AS UPDATE IS AVAILABLE BELOW  ----- 

Hello All,

                 I am facing one problem in one Org in that org i have contact list.

                 Now when i am trying to send email to this particular contact it gives me error.

                 'List has no Row for assignment to SObject'

                 since i am selecting the transaction than also it gives me this error and when i checked it in my developer org it is working correclty.

                 Now the problem i found is the contact.To which contact i am sending the Email In that Contact Email it shows me Confirm Email Address .

                 So can anyone tell me how to know wheather this is confirmed email address to send email.Why it is showing me that confirm Email address though i have another user Email address of same smtp server.