Skip to content

Commit

Permalink
Merge pull request #7222 from SalesforceFoundation/feature/248__house…
Browse files Browse the repository at this point in the history
…hold-regression-bugs

Fix Household Regression
  • Loading branch information
npsp-reedestockton authored Dec 12, 2023
2 parents 65a391a + 61c5989 commit d51b683
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
11 changes: 1 addition & 10 deletions force-app/main/default/classes/HH_Container_LCTRL.cls
Original file line number Diff line number Diff line change
Expand Up @@ -551,21 +551,12 @@ public with sharing class HH_Container_LCTRL {
}

Set<String> addressFields = new Set<String>{
'Default_Address__c',
'Household_Account__c',
'Address_Type__c',
'MailingStreet__c',
'MailingStreet2__c',
'MailingCity__c',
'MailingState__c',
'MailingPostalCode__c',
'MailingCountry__c',
'Seasonal_Start_Month__c',
'Seasonal_Start_Day__c',
'Seasonal_End_Month__c',
'Seasonal_End_Day__c',
'Geolocation__Latitude__s',
'Geolocation__Longitude__s'
'MailingCountry__c'
};

for (String addressField : addressFields) {
Expand Down
7 changes: 4 additions & 3 deletions force-app/main/default/classes/HH_ManageHH_CTRL.cls
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,12 @@ public with sharing class HH_ManageHH_CTRL {
String accountToCheck = isHHAccount ? 'Account' : 'npo02__Household__c';
Set<String> fieldsToCheck = new Set<String>();
for (FieldSetMember fsMember : hhFieldSet) {
DescribeFieldResult dfr = fsMember.getSObjectField().getDescribe();
if (dfr.isCalculated() || !dfr.permissionable || fsMember.getFieldPath().contains('__r')) {
continue;
}
fieldsToCheck.add(fsMember.getFieldPath());
}
if (isHHAccount) {
fieldsToCheck.add('npo02__Household__c');
}
for (String fieldToCheck : fieldsToCheck) {
if (!UTIL_Permissions.canUpdate(accountToCheck, fieldToCheck, false)) {
return false;
Expand Down

0 comments on commit d51b683

Please sign in to comment.