alert modal out of box got it button not working
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
45m ago
Hi All,
The alert modal out of box got it button is not working in the UI builder. The behavior is not consistent, I have 3 alerts modals, one for select location, second one for billing profile and third one for network coverage, the configuration and events are same except message. It is working for second and third and first one it is not working. I have created the script to invoke this in the above sequence, it is not working for first one. Following is the script. Below is the script that invoke the alert modal from the button.
/**
* @Param {params} params
* @Param {api} params.api
* @Param {any} params.event
* @Param {any} params.imports
* @Param {ApiHelpers} params.helpers
*/
function handler({
api,
event,
helpers,
imports
}) {
//If location is not selected, error message will be displayed
if (!api.state.contextFilterChanges.contextFields["location"]) {
helpers.modal.open('select_location');
return;
}
var permittedBillingProfile = event.payload.data.output;
let productData = {
"productId": permittedBillingProfile.productOfferingSysId,
"quantity": 1,
"contextFilterChanges": api.state.contextFilterChanges
};
// check for permitted billing profile and type Network Coverage
if (permittedBillingProfile.isPermitted == true && permittedBillingProfile.hasNetworkCoverage == true) {
api.emit('SN_PRODUCT_CATALOG#CUSTOMIZE', {
productData: productData,
catalogType: api.state.requestEntityDetails.catalogType
});
} else if (permittedBillingProfile.isPermitted == false) {
helpers.modal.open('select_billing_account');
} else {
helpers.modal.open('network_coverage_undefined');
}
}
0 REPLIES 0
