You can customize the add products screen to add a custom
field, and populate the values to order line.
Procedure
-
Log on to Sterling™ Call Center. The Home
page opens.
- Open the Create Order screen in any
of the following ways:
- On the Home page, in the Order panel
click Create Order.
- From Related Tasks, click Create
Order.
- In the Customer Search screen, enter
the appropriate search criteria and click Search.
The search results are displayed.
- Click Next. The Add Products screen
opens.
- In the Product ID field, enter the
product identifier.
- From the application header, click
the Development Tools icon
, and select Customize from
the list. Hover over the Add Products screen
and right-click to select the screen. Alternatively,
you can select
Customize from Outline from
the application header. The
Select Screen to Extend window
opens. From the tree, select
AddItemsLines and
click
Extend Screen.
Note:
- If you cannot customize the selected screen, an appropriate message
is displayed.
- If multiple instances of the same screen are found, by default,
the first instance of the screen is selected for customization.
- By default, the Layout tab is selected. From the Widget
Palette panel, select and drag the Filtering
Select widget to the Screen Outline panel
and place the widget in the appropriate position. The Basic
Properties window opens.
- In the Unique identifier field,
select
extn_filteringselect
from the list.
- In Field label, click
. The Field label window
opens.
- Click
. The Add
Bundle Entry window opens.
- In the Bundle Text field, enter Department.
- In the Bundle key field, extn_Department bundle
key is populated.
- Click Ok.
- Click Select with Colon. The Basic
Properties window opens.
- Click Apply. The Filtering
Select: extn_filteringselect panel opens to the right.
- Click the Binding tab and expand Source.
- In the Namespace field, select OrderLine from
the list.
- In the Path field, enter DepartmentCode.
- Expand Target, and in the Namespace field,
select getCompleteOrderLineList_input from
the list.
- In the Path field, enter DepartmentCode.
- Expand Option, and click
.
- In the Namespace field, select extn_getDataList from
the list. Otherwise, click the Add icon
to
add the namespace. After adding the namespace, click Ok.
- In the Path field, enter DepartmentCode.
- In Screen Outline, select Filtering
Select:extn_deptCode. The filtering select details are
displayed.
- Click the Events tab, and select OnChange event.
- Click the Add icon
.
- In the Method field, enter onDeptCodeChange.
- Click Ok.
- Click the screen level Events tab.
- Add the local afterScreenInit event
by clicking the Add icon
.
- In the Method field, enter the callExtnAPIs method.
- Click Ok.
- Click the Data tab, and click Mashup
Calls.
- Expand
Behavior Mashup
, and click the Add icon
.
- In the Mashup Reference ID field,
enter extn_getOrderTypesCommonCodesList.
- Against Mashup ID, click the Edit icon
. The Editing a Custom Mashup,
complete editing allowed screen is displayed.
- From the API Name list, select getCommonCodeList.
- Click the Input tab, if necessary.
By default, this tab is selected.
- In the API Input panel, expand Input > CommonCode.
- Select CallingOrganizationCode and CodeType attributes,
and place it in the appropriate position in the Input Template panel.
- Click the Output tab.
- In the API Output panel, expand Output > CommonCodeList > CommonCode.
- Select CodeValue and CodeShortDescription attributes,
and place it in the appropriate position in the Output Template panel.
- Click the screen level Events tab.
- Add the local onExtnMashupCompletion event
by clicking the Add icon
.
- In the Method field, enter the handleOnExtnMashupCompletion method.
- Click Apply.
- Click Save.
- Click Close.
What to do next
- Add the following code in the
extensions/isccs/webpages/order/create/additems/AddItemsLinesExtn.js
file.callExtnAPIs : function(){
var CommonCode={};
_isccsUIUtils.callApi(
this, CommonCode, "extn_getOrderTypesCommonCodeList", null);
},
onExtnMashUpCompletion : function(bEvent,uiEvent,ctrl,args){
if(args == null || args.hasError){
// handle error.
// args.errorData will contain error related information
}
else{
var mashupArray=args.mashupArray;
var len=mashupArray.length;
for(var i=0;i<len;i++){
var currentReference=mashupArray[i];
var mashupRefId =currentReference.mashupRefId;
if(_scBaseUtils.equals(mashupRefId, "extn_getOrderTypesCommonCodeList"))
{
var modelOutput =currentReference.mashupRefOutput;
_scScreenUtils.setModel(this, "extn_getOrderTypesCommonCodeList", modelOutput, null);
break;
}
}
}
},
onDeptCodeChange : function(){
var targetModel = null;
var deptCode=null;
var modelObj=null;
targetModel = _scScreenUtils.getTargetModel(
this, "getCompleteOrderLineList_input", null);
deptCode = dLang.getObject("DepartmentCode", false,targetModel);
modelObj = _scScreenUtils.getModel(this, "OrderLine");
dLang.setObject("DepartmentCode", deptCode, modelObj);
this.fireEventToUpdateGridColumn(this,targetModel);
this.updateChangesInOrderLine(modelObj);
}
- Import the appropriate utilities in
scDefine
.
- In the additionalmashups.xml file present
in the isccs\webpages\mashupxmls folder, add
the following values:
- Restart your server, and open the screen to view the changes.