You can extend existing modal pop-ups of the native quote management application as per
your business requirement. You can override the modal properties of an existing modal by configuring
the AngularJS provider.
-
Open the command prompt and run the following command from the
FieldSales_UI directory:
gulp serve-dev.
This command will launch Sterling Field Sales in a
stand-alone mode in a browser. Any customization changes that you make will be reflected in
real-time in the browser.
Note: If you create or modify any directory within the extensions directory while the
gulp serve-dev command is running, kill the command and run
gulp serve-dev again from the FieldSales_UI
directory.
-
Create an
extensions\fieldSales directory in the
CPQ_UI\FieldSales_UI\web\app directory.
- Create a JavaScript file in the
extensions\fieldSales directory to
configure the modal.
- In the JavaScript file, configure an existing modal using the AngularJS provider,
fieldSalesConfig in the
config() method of the module:
angular.module("ibmFieldSalesApp").config(['fieldSalesConfigProvider', function (fieldSalesConfigProvider) {
fieldSalesConfigProvider.setModalConfigurationByDirectiveName ("attachment", {
templateUrl: 'app/extensions/fieldSales/Actions/Attachment/newAttachment.html',
controller: 'attachmentCtrl'
});
}]);
The configuration provided for the modal pop-up, newAttachment will override the
configuration of the existing modal pop-up, attachment. The HTML template and the controller
provided in the configuration should be created in the extensions
directory.
-
Once you are ready with your customization changes and you want to deploy the changes in a
production environment, build the production ready UI artifacts by running the following command
from the FieldSales_UI directory:
gulp build.
- Create a
cpqui_ext.zip file by archiving the contents of the
build directory.
Note: Exclude the index.html file and then create the
cpqui_ext.zip file.
-
Upload the production ready UI artifacts,
cpqui_ext.zip as a static resource
in Salesforce.com by performing the following steps:
- Log in to your Salesforce.com account.
- Navigate to the Static Resources page, and then click
New button.
If a static resource by the name cpqui_ext already exists, click
Edit to update the existing file instead of creating a new resource.
The Static Resources page is
displayed.
- Enter the name of the static resource: cpqui_ext.
- Click Browse to select the
cpqui_ext.zip file
that you created in the previous steps.
- Click Save.