• Adam Purkiss
  • NEWBIE
  • 25 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 5
    Replies

The following single line of code produces this error:

 

Messaging.reserveMassEmailCapacity(1);

When I omit this and actually send a mass email, Messaging.sendEmail returns success in the SendEmailResult list (isSuccess == true). However, the email doesn't actually send and instead I get the following email:

 

Mass email request "Mass Email (API)" failed.
The system returned an error code of "INSUFFICIENT_EMAIL_ACCESS".

You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.

Click http://na9.salesforce.com/07AE0000000CbZW to view more details about this mass email request.

Best Regards,
Salesforce.com
www.salesforce.com



Clicking on the link takes you to a page that simply displays the following:

 

Insufficient Privileges You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.


 

I'm running as a System Administrator, from within Apex.The email is just a test and should be sent to one user, which is me in this test case. When I send as a single email it works fine. Following is the code for sending the mass email:

 

// Reserve email capacity for the current Apex transaction to ensure
// that we won't exceed our daily email limits when sending email after
// the current transaction is committed.
//Messaging.reserveMassEmailCapacity(userIds.size());
// TODO: Report error to Salesforce? This method results in an unauthorized error.
	
// Create a new single email message object 
// that will send out a single email to the addresses in the To, CC & BCC list.
Messaging.Massemailmessage mail = new Messaging.Massemailmessage();
	
// Specify the address used when the recipients reply to the email.
mail.setReplyTo(o.EmailReplyTo__c);
			
// Specify the name used as the display name.
mail.setSenderDisplayName(o.EmailSenderDisplayName__c);
				
// Apply template.
mail.setTemplateId(o.EmailTemplateId__c);
			
// SaveAsActivity must be false when sending email to users
mail.setSaveAsActivity(false);

// Set target object Ids
mail.setTargetObjectIds(userIds);
	
// Send the email.
Messaging.sendEmail(new Messaging.Massemailmessage[] { mail }, false);

 

 

Any help would be greatly appreciated.

 

Thanks in advance,

Adam Purkiss

The following single line of code produces this error:

 

Messaging.reserveMassEmailCapacity(1);

When I omit this and actually send a mass email, Messaging.sendEmail returns success in the SendEmailResult list (isSuccess == true). However, the email doesn't actually send and instead I get the following email:

 

Mass email request "Mass Email (API)" failed.
The system returned an error code of "INSUFFICIENT_EMAIL_ACCESS".

You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.

Click http://na9.salesforce.com/07AE0000000CbZW to view more details about this mass email request.

Best Regards,
Salesforce.com
www.salesforce.com



Clicking on the link takes you to a page that simply displays the following:

 

Insufficient Privileges You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.


 

I'm running as a System Administrator, from within Apex.The email is just a test and should be sent to one user, which is me in this test case. When I send as a single email it works fine. Following is the code for sending the mass email:

 

// Reserve email capacity for the current Apex transaction to ensure
// that we won't exceed our daily email limits when sending email after
// the current transaction is committed.
//Messaging.reserveMassEmailCapacity(userIds.size());
// TODO: Report error to Salesforce? This method results in an unauthorized error.
	
// Create a new single email message object 
// that will send out a single email to the addresses in the To, CC & BCC list.
Messaging.Massemailmessage mail = new Messaging.Massemailmessage();
	
// Specify the address used when the recipients reply to the email.
mail.setReplyTo(o.EmailReplyTo__c);
			
// Specify the name used as the display name.
mail.setSenderDisplayName(o.EmailSenderDisplayName__c);
				
// Apply template.
mail.setTemplateId(o.EmailTemplateId__c);
			
// SaveAsActivity must be false when sending email to users
mail.setSaveAsActivity(false);

// Set target object Ids
mail.setTargetObjectIds(userIds);
	
// Send the email.
Messaging.sendEmail(new Messaging.Massemailmessage[] { mail }, false);

 

 

Any help would be greatly appreciated.

 

Thanks in advance,

Adam Purkiss

A whole lot of tests that were working fine are suddenly producing errors on our production environment meaning the test coverage has fallen below 75% and we can't update anything.

 

While I have found a couple of genuine errors and fixed in the Sandbox ready to deploy, I'm at a loss to understand the majority of them.

 

Example 

System.AssertException: Assertion Failed: Expected: Benchmark, Actual: N/A	Class.testUKItemCodes.testUKItemCodes: line 47, column 5 External entry point

 When I actually create a record on the object that has the trigger which populates the value Benchmark in a text field, it works fine and I don't get N/A. 

 

But for some reason when the test class does the same action virtually, it gets a different value.

 

I'm really at a loss as I they were working fine until recently. 

 

We need to update some of the triggers due to product changes and can't because we can't get the test coverage up.


Any help or ideas would be appreciated.

 

Regards

 

Kirsty - Livebookings

Hi All,

 

I work with an ISV Partner who has a developer org where a managed package is updated / upgraded / tested and then uploaded "privately' to the exchange for a set of clients to install.

 

The orgs that install my package have the standard EE limits applied to them.

 

Herein lies the issue I have come across, whilst doing some development a new TAB was inadvertently added to the managed package and subsequently uploaded as a 'managed - released' package. It took the custom TABS within the managed package to 26.

 

This as you can see has caused HUGE implications across the current install base and for new clients. The package is constantly being updated / customised to suit clients needs and updates are continously being pushed however now that it has 26 TABS it will not install on any of the orgs as it reaches the 25 custom tab limit.

 

I REALLY NEED HELP BRAINSTORMING SOME POSSIBLE SOLUTIONS!!!

 

As I see it there are a range of possibilities and I look to any sf reps / partner ops / product managers subject matter experts out there to let me know what is feasible.

 

IDEAL SOLUTION - Since the tab that has been added is not installed on any clients org (it physically cannot be because of the limit on the install orgs, developer org doesn't have a tab limit) - I'm looking for an overall package admin or someone that can reference or edit the package I have created and manually remove the tab from it altogether. It can be deleted from the salesforce developer instance altogether I don't care it's not needed at all! Support tells me it cannot be deleted but someone out there must have access to it!!

Is there a way to 'rollback' to a previous package version that only had 25tabs in it's managed set>? And then be able to delete the 25th tab somehow completely from the developer org?

 

Other options include:

 

Going through the LMA process and getting the application security checked so that it's contents do not affect sf org limits. This is obviously primary concern right now however the whole process could take up to 2-3 weeks which is time we don't have! This problem needed to be sorted out YESTERDAY!

 

Upgrading provisions on future clients and current installbase so that orgs can install apps with more than 25 tabs. (i.e. increase tab limit)

 

I really need to know if the ideal solution is feasible here as that would be well... Ideal. But I'm interested to see if anyone has any other suggestions.

TIME IS A FACTOR. There are new clients coming on board this week and next not to mention the current install base that is catered for in package updates so this really needs to get sorted out.

 

As always any help is much appreciated. Thanks in advance for any reads of this post.

 

Patrick

I'm overriding "delete" on std object Asset, pointing it to a vf page whose controller should either delete the asset or (if it has related custom objects) redirect to a vf page which warns the user that these relationships will be broken, dispays the related list, and offers a "delete anyway" button.

 

Following delete of the asset, I want to emulate standard salesforce behavior, that is, display the Products tab home page.

 

How can I determine the url of the Products page within my apex controller?