Skip to content
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-14308598 set batch default Values for GAU Allocation fields #7252

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions force-app/main/default/lwc/geBatchWizard/geBatchWizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ export default class geBatchWizard extends NavigationMixin(LightningElement) {
this.formSections.forEach(section => {
if (section.elements) {
section.elements.forEach(element => {
if (batchLevelDefaults[element.fieldApiName]) {
element.value = batchLevelDefaults[element.fieldApiName].value;
if (batchLevelDefaults[element.customLabel]) {
element.value = batchLevelDefaults[element.customLabel].value;
}
});
}
Expand Down Expand Up @@ -459,10 +459,10 @@ export default class geBatchWizard extends NavigationMixin(LightningElement) {
if (dataImportBatch.apiName === formElement.objectApiName) {
dataImportBatch.fields[formElement.fieldApiName] = formElement.value;
} else {
batchDefaults[formElement.fieldApiName] = {
batchDefaults[formElement.label] = {
objectApiName: formElement.objectApiName,
fieldApiName: formElement.fieldApiName,
value: formElement.value
value: isNotEmpty(formElement.value) ? formElement.value : undefined
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1668,7 +1668,7 @@ export default class GeFormRenderer extends LightningElement{
sections.forEach(section => {
section.elements.forEach(element => {
for (let key in batchDefaultsObject) {
if (batchDefaultsObject.hasOwnProperty(key)) {
if (batchDefaultsObject.hasOwnProperty(key) && key === element.customLabel) {
const batchDefault = batchDefaultsObject[key];
if (batchDefault.objectApiName === element.objectApiName &&
batchDefault.fieldApiName === element.fieldApiName) {
Expand Down
3 changes: 2 additions & 1 deletion force-app/main/default/lwc/utilInput/utilInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ export default class utilInput extends LightningElement {
return {
objectApiName: this.objectApiName,
fieldApiName: this.fieldApiName,
value: this.fieldValue
value: this.fieldValue,
label: this.uiLabel
};
}

Expand Down
Loading