Skip to main content
System Update ha fatto una domanda in #Apex

System.runAs(systemAdminUser) {

try {

List<Group> tgroup = [Select Id from Group where RelatedId = :territory.Id and Type = 'Territory'];

AccountShare ashare = new AccountShare();

ashare.AccountId = testAccount.Id;

ashare.UserOrGroupId = tgroup[0].Id;

insert ashare;

} catch (Exception e) {

System.debug(e.getMessage());

}

salesForecastList = generateSalesForecasts();

generateSalesActuals();

generateSalesGoals();

}

After Summer 16 upgrade this code fails with inetrnal server error unless I comment out the "insert ashare;" line.

Internal Salesforce Error: 122688937-111940 (-137733349) (-137733349) after AccountShare record insert.
2 risposte
  1. 22 giu 2016, 14:58
    Thanks pcon. That is what I thought, but support was pushing back a bit, so just doing my due diligence.
0/9000