• Richard Clarke (Artisan)
  • NEWBIE
  • 5 Points
  • Member since 2016
  • Salesforce Certified Architect
  • Artisan Consulting

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies
I have a batch apex class which terminates early.
It shows 90 batches at the start but ends early (like after 6 or 7).
There is no error shown anywhere and you would be unaware if you did not monitor the Apex Jobs page whilst running and the outputs
Once I got the email below

Developer script exception from Artisan Consulting Pty Ltd : 'ArtHubBatchRefreshCerts' : common.exception.SfdcSqlException: ORA-20008:  ORA-06512: at "SNEEZY.CACCESS", line 4033 ORA-06512: at "SNEEZY.CACCESS", line 2219 ORA-06512: at "SNEEZY.CACCESS", ...

Apex script unhandled exception by user/organization: 00528000001vObr/00D280000019EHA
 
Failed to process batch for class 'ArtHubBatchRefreshCerts' for job id '7070K00007gYqd2'
 
Debug Log:
36.0 APEX_CODE,FINEST;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WAVE,INFO;WORKFLOW,INFO
16:21:22.0 (75228)|USER_INFO|[EXTERNAL]|00528000001vObr|richard.clarke.crm@artisans.com.au|Australian Eastern Standard Time|GMT+10:00
16:21:22.0 (115864)|EXECUTION_STARTED
16:21:22.0 (120082)|CODE_UNIT_STARTED|[EXTERNAL]|01p2800000FFvEk|ArtHubBatchRefreshCerts
16:21:22.0 (7926558)|HEAP_ALLOCATE|[72]|Bytes:3
16:21:22.0 (7992833)|HEAP_ALLOCATE|[77]|Bytes:152
16:21:22.0 (8012559)|HEAP_ALLOCATE|[342]|Bytes:408
16:21:22.0 (8029514)|HEAP_ALLOCATE|[355]|Bytes:408
16:21:22.0 (8042827)|HEAP_ALLOCATE|[467]|Bytes:48
16:21:22.0 (8103414)|HEAP_ALLOCATE|[139]|Bytes:6
16:21:22.0 (8438592)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:22.0 (8466161)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:21:22.0 (8498596)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:22.0 (8505565)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:21:22.0 (8515708)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:22.0 (8519393)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:22.0 (9392689)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:48
16:21:22.0 (12992062)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:11
16:21:22.0 (13077595)|SYSTEM_METHOD_ENTRY|[15]|BatchableContextImpl.BatchableContextImpl()
16:21:22.0 (13087977)|STATEMENT_EXECUTE|[15]
16:21:22.0 (13119093)|SYSTEM_METHOD_EXIT|[15]|BatchableContextImpl
16:21:22.0 (13133278)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:22.0 (13141911)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:4
16:21:22.0 (13147781)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:4
16:21:22.0 (13157695)|VARIABLE_SCOPE_BEGIN|[31]|this|Database.BatchableContextImpl|true|false
16:21:22.0 (13406180)|VARIABLE_ASSIGNMENT|[31]|this|{}|0x166910cc
16:21:22.0 (13417152)|VARIABLE_SCOPE_BEGIN|[31]|jobId|Id|false|false
16:21:22.0 (13536085)|VARIABLE_ASSIGNMENT|[31]|jobId|"7070K00007gYqZ6QAK"
16:21:22.0 (13548106)|VARIABLE_SCOPE_BEGIN|[31]|childJobId|Id|false|false
16:21:22.0 (13590645)|VARIABLE_ASSIGNMENT|[31]|childJobId|"7070K00007gYqd2QAC"
16:21:22.0 (29493860)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:124
16:21:54.410 (32410862935)|HEAP_ALLOCATE|[72]|Bytes:3
16:21:54.410 (32410929223)|HEAP_ALLOCATE|[77]|Bytes:152
16:21:54.410 (32410945957)|HEAP_ALLOCATE|[342]|Bytes:408
16:21:54.410 (32410959812)|HEAP_ALLOCATE|[355]|Bytes:408
16:21:54.410 (32410972513)|HEAP_ALLOCATE|[467]|Bytes:48
16:21:54.410 (32411000552)|HEAP_ALLOCATE|[139]|Bytes:6
16:21:54.410 (32411264679)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:54.410 (32411279631)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:21:54.410 (32411324675)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:54.410 (32411334368)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:21:54.410 (32411350748)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:54.410 (32411357647)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:54.410 (32530729988)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:124
16:22:25.730 (63730046108)|HEAP_ALLOCATE|[72]|Bytes:3
16:22:25.730 (63730091016)|HEAP_ALLOCATE|[77]|Bytes:152
16:22:25.730 (63730105554)|HEAP_ALLOCATE|[342]|Bytes:408
16:22:25.730 (63730119597)|HEAP_ALLOCATE|[355]|Bytes:408
16:22:25.730 (63730132951)|HEAP_ALLOCATE|[467]|Bytes:48
16:22:25.730 (63730157622)|HEAP_ALLOCATE|[139]|Bytes:6
16:22:25.730 (63730398901)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:25.730 (63730408371)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:22:25.730 (63730433621)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:25.730 (63730438764)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:22:25.730 (63730448310)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:25.730 (63730452387)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:25.730 (63788706067)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:124
16:22:57.591 (95591372095)|HEAP_ALLOCATE|[72]|Bytes:3
16:22:57.591 (95591416784)|HEAP_ALLOCATE|[77]|Bytes:152
16:22:57.591 (95591430909)|HEAP_ALLOCATE|[342]|Bytes:408
16:22:57.591 (95591444045)|HEAP_ALLOCATE|[355]|Bytes:408
16:22:57.591 (95591456897)|HEAP_ALLOCATE|[467]|Bytes:48
16:22:57.591 (95591481683)|HEAP_ALLOCATE|[139]|Bytes:6
16:22:57.591 (95591725948)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:57.591 (95591736527)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:22:57.591 (95591762152)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:57.591 (95591767428)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:22:57.591 (95591776900)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:57.591 (95591781249)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:57.591 (95654627602)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:44
16:23:07.952 (105952323260)|HEAP_ALLOCATE|[72]|Bytes:3
16:23:07.952 (105952365869)|HEAP_ALLOCATE|[77]|Bytes:152
16:23:07.952 (105952382437)|HEAP_ALLOCATE|[342]|Bytes:408
16:23:07.952 (105952396025)|HEAP_ALLOCATE|[355]|Bytes:408
16:23:07.952 (105952429413)|HEAP_ALLOCATE|[467]|Bytes:48
16:23:07.952 (105952459667)|HEAP_ALLOCATE|[139]|Bytes:6
16:23:07.952 (105952654436)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:07.952 (105952664426)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:23:07.952 (105952689069)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:07.952 (105952694141)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:23:07.952 (105952703590)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:07.952 (105952707276)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:07.952 (106027668844)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:124
16:23:42.50 (140050349094)|HEAP_ALLOCATE|[72]|Bytes:3
16:23:42.50 (140050407130)|HEAP_ALLOCATE|[77]|Bytes:152
16:23:42.50 (140050423197)|HEAP_ALLOCATE|[342]|Bytes:408
16:23:42.50 (140050437297)|HEAP_ALLOCATE|[355]|Bytes:408
16:23:42.50 (140050450164)|HEAP_ALLOCATE|[467]|Bytes:48
16:23:42.50 (140050478144)|HEAP_ALLOCATE|[139]|Bytes:6
16:23:42.50 (140050718139)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:42.50 (140050728863)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:23:42.50 (140050784891)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:42.50 (140050790786)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:23:42.50 (140050803790)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:42.50 (140050808025)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:42.50 (140150034903)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:124
16:24:11.638 (169638561748)|HEAP_ALLOCATE|[72]|Bytes:3
16:24:11.638 (169638635933)|HEAP_ALLOCATE|[77]|Bytes:152
16:24:11.638 (169638660810)|HEAP_ALLOCATE|[342]|Bytes:408
16:24:11.638 (169638683778)|HEAP_ALLOCATE|[355]|Bytes:408
16:24:11.638 (169638706762)|HEAP_ALLOCATE|[467]|Bytes:48
16:24:11.638 (169638748737)|HEAP_ALLOCATE|[139]|Bytes:6
16:24:11.638 (169639076008)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:24:11.638 (169639092980)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:24:11.638 (169639149215)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:24:11.638 (169639156671)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:24:11.638 (169639167841)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:24:11.638 (169639172339)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
 
The following code sends an email to a Contact using a template.
It works perfectly in a sandbox (email sent/received AND logged into activity history).
In our production work the email is sent/received but the activity history/task is not added.
I've tried coding the block a few ways as there are different ways of using SendEmail but in all cases I get the same outcome.
The code is running inside a future method.
If I run the code in anonyous apex it works as expected in production.
Any idea why an SendEmail call would not log activity history and not throw any exceptions?

Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage();
message.setTemplateId( emailTemplateId );
message.setSaveAsActivity( true ); 
message.setOrgWideEmailAddressId( XXXXXXId );
message.setTargetObjectId( contacts[0].Id );
message.toAddresses = new String[] { contacts[0].Id };
Messaging.SingleEmailMessage[] messages = new List<Messaging.SingleEmailMessage> {message};
Messaging.SendEmailResult[] results = Messaging.sendEmail(messages);
 
I have a batch apex class which terminates early.
It shows 90 batches at the start but ends early (like after 6 or 7).
There is no error shown anywhere and you would be unaware if you did not monitor the Apex Jobs page whilst running and the outputs
Once I got the email below

Developer script exception from Artisan Consulting Pty Ltd : 'ArtHubBatchRefreshCerts' : common.exception.SfdcSqlException: ORA-20008:  ORA-06512: at "SNEEZY.CACCESS", line 4033 ORA-06512: at "SNEEZY.CACCESS", line 2219 ORA-06512: at "SNEEZY.CACCESS", ...

Apex script unhandled exception by user/organization: 00528000001vObr/00D280000019EHA
 
Failed to process batch for class 'ArtHubBatchRefreshCerts' for job id '7070K00007gYqd2'
 
Debug Log:
36.0 APEX_CODE,FINEST;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WAVE,INFO;WORKFLOW,INFO
16:21:22.0 (75228)|USER_INFO|[EXTERNAL]|00528000001vObr|richard.clarke.crm@artisans.com.au|Australian Eastern Standard Time|GMT+10:00
16:21:22.0 (115864)|EXECUTION_STARTED
16:21:22.0 (120082)|CODE_UNIT_STARTED|[EXTERNAL]|01p2800000FFvEk|ArtHubBatchRefreshCerts
16:21:22.0 (7926558)|HEAP_ALLOCATE|[72]|Bytes:3
16:21:22.0 (7992833)|HEAP_ALLOCATE|[77]|Bytes:152
16:21:22.0 (8012559)|HEAP_ALLOCATE|[342]|Bytes:408
16:21:22.0 (8029514)|HEAP_ALLOCATE|[355]|Bytes:408
16:21:22.0 (8042827)|HEAP_ALLOCATE|[467]|Bytes:48
16:21:22.0 (8103414)|HEAP_ALLOCATE|[139]|Bytes:6
16:21:22.0 (8438592)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:22.0 (8466161)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:21:22.0 (8498596)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:22.0 (8505565)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:21:22.0 (8515708)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:22.0 (8519393)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:22.0 (9392689)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:48
16:21:22.0 (12992062)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:11
16:21:22.0 (13077595)|SYSTEM_METHOD_ENTRY|[15]|BatchableContextImpl.BatchableContextImpl()
16:21:22.0 (13087977)|STATEMENT_EXECUTE|[15]
16:21:22.0 (13119093)|SYSTEM_METHOD_EXIT|[15]|BatchableContextImpl
16:21:22.0 (13133278)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:22.0 (13141911)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:4
16:21:22.0 (13147781)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:4
16:21:22.0 (13157695)|VARIABLE_SCOPE_BEGIN|[31]|this|Database.BatchableContextImpl|true|false
16:21:22.0 (13406180)|VARIABLE_ASSIGNMENT|[31]|this|{}|0x166910cc
16:21:22.0 (13417152)|VARIABLE_SCOPE_BEGIN|[31]|jobId|Id|false|false
16:21:22.0 (13536085)|VARIABLE_ASSIGNMENT|[31]|jobId|"7070K00007gYqZ6QAK"
16:21:22.0 (13548106)|VARIABLE_SCOPE_BEGIN|[31]|childJobId|Id|false|false
16:21:22.0 (13590645)|VARIABLE_ASSIGNMENT|[31]|childJobId|"7070K00007gYqd2QAC"
16:21:22.0 (29493860)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:124
16:21:54.410 (32410862935)|HEAP_ALLOCATE|[72]|Bytes:3
16:21:54.410 (32410929223)|HEAP_ALLOCATE|[77]|Bytes:152
16:21:54.410 (32410945957)|HEAP_ALLOCATE|[342]|Bytes:408
16:21:54.410 (32410959812)|HEAP_ALLOCATE|[355]|Bytes:408
16:21:54.410 (32410972513)|HEAP_ALLOCATE|[467]|Bytes:48
16:21:54.410 (32411000552)|HEAP_ALLOCATE|[139]|Bytes:6
16:21:54.410 (32411264679)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:54.410 (32411279631)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:21:54.410 (32411324675)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:54.410 (32411334368)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:21:54.410 (32411350748)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:54.410 (32411357647)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:21:54.410 (32530729988)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:124
16:22:25.730 (63730046108)|HEAP_ALLOCATE|[72]|Bytes:3
16:22:25.730 (63730091016)|HEAP_ALLOCATE|[77]|Bytes:152
16:22:25.730 (63730105554)|HEAP_ALLOCATE|[342]|Bytes:408
16:22:25.730 (63730119597)|HEAP_ALLOCATE|[355]|Bytes:408
16:22:25.730 (63730132951)|HEAP_ALLOCATE|[467]|Bytes:48
16:22:25.730 (63730157622)|HEAP_ALLOCATE|[139]|Bytes:6
16:22:25.730 (63730398901)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:25.730 (63730408371)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:22:25.730 (63730433621)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:25.730 (63730438764)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:22:25.730 (63730448310)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:25.730 (63730452387)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:25.730 (63788706067)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:124
16:22:57.591 (95591372095)|HEAP_ALLOCATE|[72]|Bytes:3
16:22:57.591 (95591416784)|HEAP_ALLOCATE|[77]|Bytes:152
16:22:57.591 (95591430909)|HEAP_ALLOCATE|[342]|Bytes:408
16:22:57.591 (95591444045)|HEAP_ALLOCATE|[355]|Bytes:408
16:22:57.591 (95591456897)|HEAP_ALLOCATE|[467]|Bytes:48
16:22:57.591 (95591481683)|HEAP_ALLOCATE|[139]|Bytes:6
16:22:57.591 (95591725948)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:57.591 (95591736527)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:22:57.591 (95591762152)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:57.591 (95591767428)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:22:57.591 (95591776900)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:57.591 (95591781249)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:22:57.591 (95654627602)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:44
16:23:07.952 (105952323260)|HEAP_ALLOCATE|[72]|Bytes:3
16:23:07.952 (105952365869)|HEAP_ALLOCATE|[77]|Bytes:152
16:23:07.952 (105952382437)|HEAP_ALLOCATE|[342]|Bytes:408
16:23:07.952 (105952396025)|HEAP_ALLOCATE|[355]|Bytes:408
16:23:07.952 (105952429413)|HEAP_ALLOCATE|[467]|Bytes:48
16:23:07.952 (105952459667)|HEAP_ALLOCATE|[139]|Bytes:6
16:23:07.952 (105952654436)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:07.952 (105952664426)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:23:07.952 (105952689069)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:07.952 (105952694141)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:23:07.952 (105952703590)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:07.952 (105952707276)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:07.952 (106027668844)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:124
16:23:42.50 (140050349094)|HEAP_ALLOCATE|[72]|Bytes:3
16:23:42.50 (140050407130)|HEAP_ALLOCATE|[77]|Bytes:152
16:23:42.50 (140050423197)|HEAP_ALLOCATE|[342]|Bytes:408
16:23:42.50 (140050437297)|HEAP_ALLOCATE|[355]|Bytes:408
16:23:42.50 (140050450164)|HEAP_ALLOCATE|[467]|Bytes:48
16:23:42.50 (140050478144)|HEAP_ALLOCATE|[139]|Bytes:6
16:23:42.50 (140050718139)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:42.50 (140050728863)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:23:42.50 (140050784891)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:42.50 (140050790786)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:23:42.50 (140050803790)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:42.50 (140050808025)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:23:42.50 (140150034903)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:124
16:24:11.638 (169638561748)|HEAP_ALLOCATE|[72]|Bytes:3
16:24:11.638 (169638635933)|HEAP_ALLOCATE|[77]|Bytes:152
16:24:11.638 (169638660810)|HEAP_ALLOCATE|[342]|Bytes:408
16:24:11.638 (169638683778)|HEAP_ALLOCATE|[355]|Bytes:408
16:24:11.638 (169638706762)|HEAP_ALLOCATE|[467]|Bytes:48
16:24:11.638 (169638748737)|HEAP_ALLOCATE|[139]|Bytes:6
16:24:11.638 (169639076008)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:24:11.638 (169639092980)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
16:24:11.638 (169639149215)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:24:11.638 (169639156671)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:13
16:24:11.638 (169639167841)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
16:24:11.638 (169639172339)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
 

Error when authenticating to community site using SAML/Azure AD:  The reply address 'https://company2.force.com/login?so=00D41000001i0oF' does not match the reply addresses configured for the application: 'https://company1.my.salesforce.com'.
Hello,

We have recently implemented Azure AD single sign on for Salesforce in both our production and test environments.  This seems to work great.  However, there does not seem to be a way to add additional reply URL's so that we can authenticate to our "Salesforce Communities".  Our Salesforce URL for our main site is "https://companyname.my.salesforce.com/".  Our "Community" domain sign in URL is "https://companyname2.force.com/login".  

In the Azure, we've added the salesforce "application from the gallery".  When we go to configure the application, we see a section for adding a reply URL but are forced to use a convention that meets the "https://example.my.salesforce.com" standard.  
Has anyone else implemented salesforce SSO with more than one domain?  How do you add additional URLs?
We've looked at the following guides but some seem to be outdated or don't include instructions to add additional reply URLs for SAML to include additional URLs for Salesforce Community domains.
Guide from Microsoft Documentation for SAML, Azure AD, and Salesforce (note: no information about adding additional "Reply URLs for "Communities"):
https://docs.microsoft.com/en-us/azure/active-directory/active-directory-saas-salesforce-tutorial
Guide on Salesforce developer site using Open ID Connect and Azure AD (note: this includes information about implementing communities but hasn't been updated since Oct 2015 and seems to be missing steps or has out of date information.  Also, no user provisioning steps):
https://developer.salesforce.com/page/Login_with_Azure_AD
TechNet article for integrating SAML/Azure AD with Salesforce Sandbox (note: nothing about adding additonal reply URLs for communities.):
https://social.technet.microsoft.com/wiki/contents/articles/32146.azure-active-directory-integration-with-salesforce-sandbox.aspx

Also, we've tried to use OAuth and OpenID Connect with Azure using this guide:

https://developer.salesforce.com/page/Login_with_Azure_AD#Test_Connection_with_Azure_AD

The OAuth and OpenID connect does not work following those instructions and I believe it has something to do with the Reg handler or possibly Azure AD endpoints changing.  Specifically, the Authorize, Token, and Profile Endpoint URLs don't seem to be the same anymore as seen when you click the "endpoints" in Azure AD for the application.  There isn't even a "profile endpoint" available but instead a "graph API endpoint".. So, instead of using https://login.windows.net/common/openid/userinfo, I'm guessing more code has to be written on Salesforce's end to work with https://graph.windows.net.

 

Any insight into these things would be greatly appreciated.

Thanks,
Dean

On the verification step of the last module in this project I get this error even though interactively everything works as it should

There was an unhandled exception. Please reference ID: ILQPADTM. Error: Faraday::ClientError. Message: UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 1818881392-96611 (1688746493)
Hi there,

Does Community template Napili support Reports and Dashboards ?

Thanks !