• ruehawk
  • NEWBIE
  • 50 Points
  • Member since 2010

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

We have custom settings and an APEX class that is returning zero records after October 12th.

The day that Winter 14 was implemented in our production environment.
 Up to that day we would average about 10 emails a day from this approval process.

 

The select statement that returns zero is 
EmailTemplate template = [ 
select id 
from EmailTemplate 
where developerName = :System.Label.PRW_Phase_Assigned_Accounting_Notification_Email_Template_Name 
]; 

This is embedded as part of an Approval process. When I, as an administrator, approve  this select statement will return the template name.   Everything is fine.

However, when our production staff approves then this will return no rows. 

I can not figure out where to check their profile to the emailtemplate object. Or is there another way of granting permission for these templates?  I don't see an object as part of App Setup - Customize...

Rudy

 

I did a refresh of my sandbox yesterday and re-applied code that was working in the sandbox previously.

It was probably 6 months since the previous refresh.

 

This statement  then caused an "Internal Salesforce Error".

Messaging.reserveSingleEmailCapacity(1);

 

So, I tried Execute Anonymous in my SANDBOX - Messaging.reserveSingleEmailCapacity(1); -  And it gives me an "Internal Error".

 

I try this statement using Execute Anonymous in Production and it works.

The issue is not the code, but the environment.

 

Sandbox is in CS3 instance.

Production is  NA5 instance.

 

Any ideas?

 

Rudy

 

 

 

 

We have custom settings and an APEX class that is returning zero records after October 12th.

The day that Winter 14 was implemented in our production environment.
 Up to that day we would average about 10 emails a day from this approval process.

 

The select statement that returns zero is 
EmailTemplate template = [ 
select id 
from EmailTemplate 
where developerName = :System.Label.PRW_Phase_Assigned_Accounting_Notification_Email_Template_Name 
]; 

This is embedded as part of an Approval process. When I, as an administrator, approve  this select statement will return the template name.   Everything is fine.

However, when our production staff approves then this will return no rows. 

I can not figure out where to check their profile to the emailtemplate object. Or is there another way of granting permission for these templates?  I don't see an object as part of App Setup - Customize...

Rudy

 

I did a refresh of my sandbox yesterday and re-applied code that was working in the sandbox previously.

It was probably 6 months since the previous refresh.

 

This statement  then caused an "Internal Salesforce Error".

Messaging.reserveSingleEmailCapacity(1);

 

So, I tried Execute Anonymous in my SANDBOX - Messaging.reserveSingleEmailCapacity(1); -  And it gives me an "Internal Error".

 

I try this statement using Execute Anonymous in Production and it works.

The issue is not the code, but the environment.

 

Sandbox is in CS3 instance.

Production is  NA5 instance.

 

Any ideas?

 

Rudy