-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
W-17216147 - 'First installment paid' checkbox not being set to true in Gift Entry #7266
W-17216147 - 'First installment paid' checkbox not being set to true in Gift Entry #7266
Conversation
Replaced hard-coded fieldname with label for 'First installment paid' checkbox, since batch-Defaults contains field labels as keys
@@ -47,7 +47,7 @@ public inherited sharing class GiftBatch implements IGiftBatch { | |||
private GiftTemplate giftTemplate; | |||
|
|||
private Boolean shouldPayFirstInstallment = false; | |||
private static final String AllowFirstInstallmentPaid = 'AllowFirstInstallment__f'; | |||
private static final String AllowFirstInstallmentPaid = 'First installment paid'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@salesforce-suyash-more Will this break when the User is set to a non-English language? It looks like the geRD2FirstInstallmentPaid
Label has translations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lparrott, your doubt about the translation issue was wise. I've made changes to ensure the FirstInstallmentPaid label is translation-compatible. Please review the latest updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@salesforce-suyash-more Unfortunately this still won't work in an multi-language org since the Template (in Batch_Defaults__c
) gets stored in the running User's language, and then it would potentially get read back as a different language. Is there a reason the Batch_Defaults__c
use field Labels and not API names as the key values? That seems to be the issue, did we change that in the past release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lparrott , Let's consider a scenario where a user using the English language creates a Gift Batch, which stores the 'First installment paid' English label in 'Batch_Defaults'. However, when a user from a different language (e.g. German) accesses the same Gift Batch and edits the 'Batch Info', the translated label will be updated in 'Batch_Defaults'.
The reason for using field labels in 'Batch_Defaults__c' stems from the bug fix related to W-14308598. This bug required replacing API names with field labels to distinguish between the ‘GAU Allocation 1’ and ‘GAU Allocation 2’ object group fields in the gift entry template. Since both object groups will have the same API names, it caused an issue of overriding form field values while setting defaults.
please refer to the Quip document for details of that bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@salesforce-suyash-more Thanks for that info, I forgot about that bug fix.
Are you saying the scenario you mentioned will work? That was my concern, an English User creates the Batch which stores the Labels as English, then a German User accesses it and our logic fails because it won't find the German translation of "geRD2FirstInstallmentPaid".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, @lparrott. The German user won't see the translated label in Batch_Defaults until they make an update in 'Batch Info'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lparrott, I made some changes to the logic for populating the Batch_Defaults, ensuring that the fieldApiName for the 'First installment paid' checkbox is stored in Batch_Defaults to resolve the translation issues with the labels.
…installment paid' checkbox
…_Defaults to avoid translation issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
…47-First-installment-paid-value-not-update-in-GE-Batch-Info
Critical Changes
Changes
GUS : W-17216147
Modified files :
Issues Closed
Community Ideas Delivered
Features Intended for Future Release
Features for Elevate Customers
New Metadata
Deleted Metadata