Skip to content

Commit

Permalink
Adding warehouse location for opportunity edit/insert.
Browse files Browse the repository at this point in the history
Adding opportunity edit/insert location to match what was added in the
web client. The lookup should fetch slxlocations where the location type
is warehouse and the erpstatus is open.

Refs: INFORCRM-23307
  • Loading branch information
jbest84 committed Mar 26, 2020
1 parent 9929509 commit cc0a621
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 3 deletions.
2 changes: 1 addition & 1 deletion localization/locales/icboe/en/strings.l20n
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@
quotesText: "Quotes"
ordersText: "Sales Orders"
opportunityRefreshPricingText: "Refresh Pricing"
warehouseText: "Warehouse"
warehouseText: "warehouse"
>

<helpModule ""
Expand Down
29 changes: 28 additions & 1 deletion src-out/Integrations/BOE/Modules/OpportunityModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,16 @@ define('crm/Integrations/BOE/Modules/OpportunityModule', ['module', 'exports', '
},
type: 'insert',
where: 'after',
value: 'Location/Name'
value: 'Location/*'
});

am.registerCustomization('models/edit/querySelect', 'opportunity_sdata_model', {
at: function at() {
return true;
},
type: 'insert',
where: 'after',
value: 'Location/*'
});

_lang2.default.extend(crm.Views.Opportunity.Detail, {
Expand Down Expand Up @@ -248,6 +257,24 @@ define('crm/Integrations/BOE/Modules/OpportunityModule', ['module', 'exports', '
property: 'Location.Name'
}
});

// Add warehouse to opportunity edit (SlxLocation)
am.registerCustomization('edit', 'opportunity_edit', {
at: function at(row) {
return row.name === 'CloseProbability';
},
type: 'insert',
where: 'after',
value: {
label: this.warehouseText,
name: 'Location',
property: 'Location',
textProperty: 'Name',
type: 'lookup',
view: 'locations_list',
where: "ErpStatus eq 'Open' and LocationType eq 'Warehouse'"
}
});
},
loadToolbars: function loadToolbars() {}
});
Expand Down
27 changes: 26 additions & 1 deletion src/Integrations/BOE/Modules/OpportunityModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@ const __class = declare('crm.Integrations.BOE.Modules.OpportunityModule', [_Modu
at: () => { return true; },
type: 'insert',
where: 'after',
value: 'Location/Name',
value: 'Location/*',
});

am.registerCustomization('models/edit/querySelect', 'opportunity_sdata_model', {
at: () => { return true; },
type: 'insert',
where: 'after',
value: 'Location/*',
});

lang.extend(crm.Views.Opportunity.Detail, {
Expand Down Expand Up @@ -231,6 +238,24 @@ const __class = declare('crm.Integrations.BOE.Modules.OpportunityModule', [_Modu
property: 'Location.Name',
},
});

// Add warehouse to opportunity edit (SlxLocation)
am.registerCustomization('edit', 'opportunity_edit', {
at: function at(row) {
return row.name === 'CloseProbability';
},
type: 'insert',
where: 'after',
value: {
label: this.warehouseText,
name: 'Location',
property: 'Location',
textProperty: 'Name',
type: 'lookup',
view: 'locations_list',
where: "ErpStatus eq 'Open' and LocationType eq 'Warehouse'",
},
});
},
loadToolbars: function loadToolbars() {
},
Expand Down

0 comments on commit cc0a621

Please sign in to comment.