EpicorICETools UserGuide 102700

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1311

Epicor ICE 3.

2 Tools User Guide


10.2.700
Disclaimer
This document and its contents, including the viewpoints, dates and functional content expressed herein are the
proprietary copyrighted property of Epicor Software Corporation, are intended for informational purposes only and
are believed to be accurate as of its date of publication. However, Epicor Software Corporation makes no guarantee,
representations or warranties with regard to the enclosed information and specifically disclaims any applicable implied
warranties, such as fitness for a particular purpose, merchantability, satisfactory quality or reasonable skill and care.
As each user of Epicor software is likely to be unique in their requirements in the use of such software and their business
processes, users of this document are always advised to discuss the content of this document with their Epicor support
representative, account manager and/or consulting personnel. All information contained herein is subject to change
without notice and changes to this document since printing and other important information about the software
product are made or published in release notes, and you are urged to obtain the current release notes for the software
product. The usage of any Epicor software shall be pursuant to an Epicor end user license agreement and the performance
of any consulting services by Epicor personnel shall be pursuant to Epicor's services terms and conditions. Usage of the
solution(s) described in this document with other Epicor software or third party products may require the purchase of
licenses for such other products. Where any software is expressed to be compliant with applicable laws or other statutory
or regulatory requirements in this document, such compliance is not a warranty and is based solely on Epicor's current
understanding of such laws and requirements. All laws and requirements are subject to varying interpretations as well
as to change and accordingly, Epicor cannot guarantee that the software will be compliant and up to date with such
changes. All statements of platform and product compatibility in this document shall be considered individually in
relation to the products referred to in the relevant statement, i.e., where any Epicor software is stated to be compatible
with one product and also stated to be compatible with another product, it should not be interpreted that such Epicor
software is compatible with both of the products running at the same time on the same platform or environment.
Additionally platform or product compatibility may require the application of Epicor or third-party updates, patches
and/or service packs and Epicor has no responsibility for compatibility issues which may be caused by updates, patches
and/or service packs released by third parties after the date of publication of this document. Epicor, Business Inspired
and the Epicor logo are trademarks of Epicor Software Corporation, registered in the United States, certain other
countries and/or the EU. All other trademarks mentioned are the property of their respective owners. Copyright ©
Epicor Software Corporation 2020. All rights reserved. Not for distribution or republication. Information in this document
is subject to Epicor license agreement(s).

10.2.700
Revision: January 28, 2021 11:36 a.m.
Total pages: 1311
sys.ditaval
Epicor ICE 3.2 Tools User Guide Contents

Contents
Introduction..........................................................................................................................19

Chapter 1: Business Activity Queries.............................................................20


Database Viewing Tools.................................................................................................................................20
Data Dictionary Viewer...........................................................................................................................21
Table View......................................................................................................................................21
Field View........................................................................................................................................22
Field Help...............................................................................................................................................24
System Queries..............................................................................................................................................27
View System Queries..............................................................................................................................27
Custom Queries.............................................................................................................................................30
New Business Activity Query...................................................................................................................30
The General Sheet...........................................................................................................................30
Define Business Activity Query Attributes..................................................................................30
The Query Builder............................................................................................................................33
Add Table................................................................................................................................33
Additional Controls..................................................................................................................35
Table Relations.........................................................................................................................36
Table List..................................................................................................................................44
Table Criteria............................................................................................................................46
SubQuery Criteria.....................................................................................................................51
Function Call Parameters..........................................................................................................69
Pivot SubQuery FOR Clause......................................................................................................72
Display Fields............................................................................................................................82
SubQuery Options..................................................................................................................121
SubQuery List.........................................................................................................................131
Updatable Business Activity Query.................................................................................................132
User Rights.............................................................................................................................133
General Properties..................................................................................................................135
Update Processing..................................................................................................................143
Analyze.........................................................................................................................................161
Analyze and Test the Query....................................................................................................162
Test the Updatable Query.......................................................................................................165
Where Used..................................................................................................................................171
BAQ Search...................................................................................................................................173
Comments....................................................................................................................................174
Actions..........................................................................................................................................175
Copy Query............................................................................................................................175
Export BAQ............................................................................................................................177
Import BAQ............................................................................................................................179

10.2.700 3
Contents Epicor ICE 3.2 Tools User Guide

Change Author......................................................................................................................183
Run BPM Designer..................................................................................................................184
Define Custom Action............................................................................................................186
Define Parameters..................................................................................................................187
Execution Settings..................................................................................................................188
Get Query Execution Plan.......................................................................................................193
Change Security Code............................................................................................................195
Reset Field Attributes Cache...................................................................................................196
Export Query Data.......................................................................................................................................197
BAQ Application Server Settings...................................................................................................................199
BAQ Info Zones............................................................................................................................................202
Activate a BAQ Zone.............................................................................................................................202
BAQ Field Security........................................................................................................................................203
BAQ Best Practices.......................................................................................................................................203
Case Studies................................................................................................................................................204
Labor Summary BAQ............................................................................................................................204
Define the Query...........................................................................................................................205
Select and Create Columns for Display...........................................................................................208
Not Clocked Out BAQ...........................................................................................................................212
Define the Query...........................................................................................................................213
Select Columns for Display............................................................................................................215
Simple Updatable BAQ.........................................................................................................................218
Define the Query...........................................................................................................................218
Define Basic Processing Details......................................................................................................220
Update and Create Supplier Records..............................................................................................222
Advanced Updatable BAQ....................................................................................................................228
Create New BAQ...........................................................................................................................228
Select Display Columns..................................................................................................................231
Select Updatable Fields..................................................................................................................233
Specify Update Processing Method................................................................................................235
Analyze Tracing Log......................................................................................................................236
Use Updatable Field Editor.............................................................................................................246
Tour Updatable BAQ Method Directives.........................................................................................249
Create New Directive.....................................................................................................................252
Test Events....................................................................................................................................256
Configure Customer ID Condition.................................................................................................259
Configure BO Call.........................................................................................................................261
Fill TableSet Variable......................................................................................................................265
Add Remaining Customer Change Methods..................................................................................270
Update ttResults Table...................................................................................................................275
Build ShipTo Change Workflow Branch.........................................................................................283
Build Ship By Date Assignment Workflow Branch...........................................................................287
Complete the Directive..................................................................................................................291
Test BAQ Results...........................................................................................................................293
Using Inner SubQueries.........................................................................................................................299

4 10.2.700
Epicor ICE 3.2 Tools User Guide Contents

Create Open Orders SubQuery......................................................................................................299


Select Columns..............................................................................................................................301
Create Closed Orders SubQuery....................................................................................................303
Select Columns..............................................................................................................................305
Create TopLevel SubQuery.............................................................................................................305
Select BAQ Display Columns..........................................................................................................307
Test the BAQ.................................................................................................................................309
Combine Results Sets Using Union........................................................................................................310
Create TopLevel BAQ.....................................................................................................................311
Create Order View SubQuery.........................................................................................................315
Create Invoice View SubQuery.......................................................................................................321
Create Query Parameter................................................................................................................323
Test the BAQ.................................................................................................................................325
Advanced Data Aggregation.................................................................................................................328
Create Order View SubQuery.........................................................................................................328
Create Quote View SubQuery........................................................................................................335
Create TopLevel Subquery.............................................................................................................339
Test the BAQ.................................................................................................................................345
Intersect and Except SubQuery Type.....................................................................................................348
Create TopLevel BAQ.....................................................................................................................348
Create Intersect SubQuery.............................................................................................................351
Use Except SubQuery Type............................................................................................................356
Common Table Expression Query..........................................................................................................358
Create CTE SubQuery....................................................................................................................358
Create Query Parameter................................................................................................................360
Select Columns..............................................................................................................................362
Define UnionAll SubQuery.............................................................................................................365
Select Columns..............................................................................................................................367
Create TopLevel SubQuery.............................................................................................................369
Test the BAQ.................................................................................................................................371
BAQ Combo.........................................................................................................................................374
Define the Query...........................................................................................................................374
Customize the Form......................................................................................................................378
Add the BAQ Markup....................................................................................................................382
Test the Results.............................................................................................................................385
Transforming Legacy First/Last Table Modifiers......................................................................................386
Example 1.....................................................................................................................................387
Example 2.....................................................................................................................................393

Chapter 2: External Business Activity Queries............................................402


External Datasource Type Maintenance........................................................................................................402
Create New Datasource Type................................................................................................................403
Create New Filter Group.......................................................................................................................404
Add New Definition..............................................................................................................................404

10.2.700 5
Contents Epicor ICE 3.2 Tools User Guide

Apply Table Filter..................................................................................................................................406


Apply Column Filter..............................................................................................................................407
External Datasource Maintenance................................................................................................................408
Create an External Datasource..............................................................................................................409
Use the Distribution sheet.....................................................................................................................413
Export Datasources...............................................................................................................................415
Import Datasources...............................................................................................................................417
32 Bit vs 64 Bit ODBC...........................................................................................................................418
External Datasource Metadata Maintenance.................................................................................................420
Retrieve External Tables........................................................................................................................421
Use Table List........................................................................................................................................424
Modify Field Properties.........................................................................................................................425
Enable External Datasources.........................................................................................................................426
Design External Business Activity Query........................................................................................................428
Update External Datasource.........................................................................................................................431

Chapter 3: BAQ Report Designer..................................................................433


BAQ and BAQ Report Datasets.....................................................................................................................433
Standard BAQ Report Interface....................................................................................................................434
BAQ Report Options....................................................................................................................................437
Create a BAQ Report...................................................................................................................................438
Add the BAQ Report.............................................................................................................................438
Add Option Fields.................................................................................................................................442
Test the Report.....................................................................................................................................444
Design the Report Layout......................................................................................................................446
Implement the Report...........................................................................................................................455
Customize a BAQ Report.............................................................................................................................458

Chapter 4: Searches.......................................................................................466
Default Search Interface...............................................................................................................................466
Default Features...................................................................................................................................466
Hot Key Searches..................................................................................................................................469
Quick Searches............................................................................................................................................471
Create a Quick Search..........................................................................................................................472
Activate Quick Search....................................................................................................................472
Quick Search Detail Sheet..............................................................................................................473
Quick Search Criteria.....................................................................................................................476
Test a Quick Search.......................................................................................................................481
Display a Quick Search..........................................................................................................................482
Quick Search Tab...........................................................................................................................482
Context Menu Options..................................................................................................................484
Default Search Program.................................................................................................................485
Business Activity Query Searches..................................................................................................................488
Enable BAQ Search Fields......................................................................................................................488

6 10.2.700
Epicor ICE 3.2 Tools User Guide Contents

Use a BAQ Search.................................................................................................................................491


Advanced Searches......................................................................................................................................493
Use an Advanced Search.......................................................................................................................494
Named Searches..........................................................................................................................................494
Create a Named Search........................................................................................................................494
Named Search Details...........................................................................................................................498
Auto Populate Data..............................................................................................................................500
Auto Load Search.................................................................................................................................502
Override Search Options..............................................................................................................................505
Data Tag Searches.......................................................................................................................................505
Add Data Tags to a Record...................................................................................................................505
Add Data Tags to Records in a Grid......................................................................................................507
Perform a Data Tag Search...................................................................................................................509
Data Tags and BPM Directives...............................................................................................................511
Data Tag Maintenance..........................................................................................................................512
Predictive Search..........................................................................................................................................515
Activate Predictive Search.....................................................................................................................515
Define Source BAQ...............................................................................................................................517
Create Predictive Search.......................................................................................................................521
Test Predictive Search...........................................................................................................................523
Enterprise Search.........................................................................................................................................524
Activate Enterprise Search.....................................................................................................................525
Smart Client Enterprise Search..............................................................................................................526
Web Client Enterprise Search................................................................................................................529
Enterprise Search Filter Options.............................................................................................................531

Chapter 5: Business Process Management..................................................533


BPM Base Elements......................................................................................................................................533
Assign BPM Advanced User Rights...............................................................................................................534
Expression Security - BPM Rights...........................................................................................................535
Directive Scope............................................................................................................................................536
Holds...........................................................................................................................................................537
Hold Type Maintenance........................................................................................................................538
Hold Type Maintenance – How to Use...........................................................................................538
BPM Holds............................................................................................................................................540
BPM Holds – How to Use...............................................................................................................540
Review BPM Holds.........................................................................................................................542
Directives.....................................................................................................................................................543
Method Directives.................................................................................................................................543
Data Directives......................................................................................................................................544
Updatable BAQ Method Directives........................................................................................................545
How it Works................................................................................................................................545
Custom Actions.............................................................................................................................548
How BPM Works..................................................................................................................................548

10.2.700 7
Contents Epicor ICE 3.2 Tools User Guide

Standard Execution Flow...............................................................................................................549


Using Business Process Management.............................................................................................549
Create a New Directive.........................................................................................................................551
Locate Service Method..................................................................................................................551
Create the Directive.......................................................................................................................554
BPM Workflow Designer.......................................................................................................................556
General Principles..........................................................................................................................557
BPM Query....................................................................................................................................560
Validate Directive...........................................................................................................................562
Customize Element Block..............................................................................................................565
Availability of Workflow Elements..................................................................................................569
Copy and Paste Workflow Elements..............................................................................................570
Transmission Rules.................................................................................................................572
Directive Level Variables.................................................................................................................573
Create New Variables.............................................................................................................573
Variables vs. Parameters.........................................................................................................577
Availability of Directive Variables.............................................................................................577
Validation...............................................................................................................................584
Reference Variables Using Context Menu...............................................................................585
Callers...........................................................................................................................................585
Call BPM Data Form...............................................................................................................585
Call SC Workflow...................................................................................................................586
Execute Custom Code............................................................................................................589
Invoke External Method..........................................................................................................590
Invoke BO Method.................................................................................................................592
Invoke Function......................................................................................................................594
Flow Chart....................................................................................................................................596
Condition...............................................................................................................................596
List of Conditions...................................................................................................................597
Labels............................................................................................................................................606
Attach Data Tag.....................................................................................................................606
Remove Data Tag...................................................................................................................607
Attach Hold............................................................................................................................608
Remove Holds........................................................................................................................609
Other............................................................................................................................................609
Auto Print..............................................................................................................................610
Change Log...........................................................................................................................611
Enable Post Directive..............................................................................................................612
Enable Standard Directive.......................................................................................................612
Notify Collaborate..................................................................................................................613
Raise Exception......................................................................................................................616
Send E-mail............................................................................................................................617
Show Message.......................................................................................................................619
Setters...........................................................................................................................................621
Set BPM Data Field.................................................................................................................621

8 10.2.700
Epicor ICE 3.2 Tools User Guide Contents

Set By Query..........................................................................................................................622
Set Field.................................................................................................................................623
Set Argument/Variable...........................................................................................................624
Fill Table By Query..................................................................................................................625
Update Table By Query...........................................................................................................627
Processing Asynchronous Actions.........................................................................................................629
Support for Multiple Dirty Rows............................................................................................................630
Dependent Directives...................................................................................................................................631
Primary Directive...................................................................................................................................631
Dependent Directive.............................................................................................................................631
Epicor Functions...........................................................................................................................................631
Functions Roles.....................................................................................................................................632
Assigning Users to Functions Security Groups................................................................................633
Summary of Security Rights by Role...............................................................................................633
Types of Functions................................................................................................................................634
Creating Function.................................................................................................................................635
Add a Library.................................................................................................................................635
Add References......................................................................................................................637
Set Up Security.......................................................................................................................641
Add a Widget Function..................................................................................................................642
Set Up Main Properties...........................................................................................................642
Define Parameters..................................................................................................................643
Design Function.....................................................................................................................645
Add a Custom Code Function........................................................................................................676
Function Editor.......................................................................................................................677
Copying Function.................................................................................................................................687
Exporting Library...................................................................................................................................688
Importing Library..................................................................................................................................689
Publishing/Unpublishing Library............................................................................................................694
Calling Function from BPM Directive.....................................................................................................696
Add a New Function......................................................................................................................697
Design Function Workflow.....................................................................................................697
Create an Order (Optional)............................................................................................................705
Add BPM Directive 1......................................................................................................................706
Add BPM Directive 2......................................................................................................................707
Test Function Calls.........................................................................................................................709
Calling Function via REST......................................................................................................................710
Calling Function from Client Customization..........................................................................................713
Create the REST Client...................................................................................................................713
Specify Call Context......................................................................................................................715
Execute Call...................................................................................................................................717
Handle Response...........................................................................................................................719
Scheduling Functions............................................................................................................................720
Schedule a Function......................................................................................................................720
Installing Libraries.................................................................................................................................721

10.2.700 9
Contents Epicor ICE 3.2 Tools User Guide

Add Library to Solution..................................................................................................................721


Debugging Function Source Code.........................................................................................................723
Case Studies................................................................................................................................................725
Make a Field Mandatory.......................................................................................................................725
Select Business Object Method......................................................................................................725
Add a Pre-Processing Directive.......................................................................................................727
Add First Condition.......................................................................................................................728
Extend First Condition...................................................................................................................730
Add First Action.............................................................................................................................733
Add Another Condition.................................................................................................................735
Check for Sales Kit Part.................................................................................................................737
Extend Second Condition..............................................................................................................738
Add Second Action........................................................................................................................741
Test the BPM for the Part Class......................................................................................................744
Test the BPM for the Part Group....................................................................................................745
Create and Use a Hold Type..................................................................................................................746
Create the Hold Type.....................................................................................................................746
Select Business Object Method......................................................................................................748
Add a Pre-Processing Directive.......................................................................................................750
Add an Action...............................................................................................................................753
Add a Pre-Processing Directive.......................................................................................................754
Add an Action...............................................................................................................................757
Add a Post-Processing Directive.....................................................................................................758
Add an Action...............................................................................................................................760
Add a Post-Processing Directive.....................................................................................................762
Add an Action...............................................................................................................................764
Add a Method Code......................................................................................................................765
Add a Post-Processing Directive.....................................................................................................768
Add an Action...............................................................................................................................770
Test the BPM.................................................................................................................................772
Use Auto Print Action...........................................................................................................................776
Locate the OrderHed Table............................................................................................................776
Add Standard Directive..................................................................................................................777
Add an Action...............................................................................................................................779
Define Report Parameters..............................................................................................................782
Test the BPM.................................................................................................................................784
Use Fill Table By Query and Invoke BO Method.....................................................................................786
Select Business Object Method......................................................................................................786
Create New Directive.....................................................................................................................787
Configure Condition......................................................................................................................789
Specify BO Method........................................................................................................................790
Configure Method Parameters.......................................................................................................791
Design BPM Query.........................................................................................................................795
Select Target Table........................................................................................................................800
Configure Table Mappings............................................................................................................800

10 10.2.700
Epicor ICE 3.2 Tools User Guide Contents

Activate the Directive.....................................................................................................................805


Test the Directive...........................................................................................................................806
Update Table Using BPM Query............................................................................................................807
Select Business Object Method......................................................................................................808
Create New Directive.....................................................................................................................809
Configure Condition......................................................................................................................811
Design BPM Query.........................................................................................................................813
Select Target Table........................................................................................................................815
Configure Table Mapping..............................................................................................................817
Test the Directive...........................................................................................................................820
Set Up Security for Posting Invoices.......................................................................................................821
Create Security Group...................................................................................................................821
Select Process Method...................................................................................................................822
Add Pre-Processing Directive..........................................................................................................823
Test Directive.................................................................................................................................827
Set Default Value for Report Parameter.................................................................................................830
Select Report Method....................................................................................................................831
Add Post-Processing Directive........................................................................................................832
Test Directive.................................................................................................................................835

Chapter 6: Custom Business Process Management.....................................837


Execute Custom Code Directive...................................................................................................................837
Create the Data Directive......................................................................................................................837
Test the Data Directive..........................................................................................................................841
BPM Data Form Designer.............................................................................................................................845
Create a BPM Data Form......................................................................................................................845
Add Fields.....................................................................................................................................846
Define Control Values....................................................................................................................848
Create Password............................................................................................................................849
Create or Remove Buttons.............................................................................................................850
Test the Form................................................................................................................................851
Data Form Directive..............................................................................................................................852
Create BPM Data Form Action.......................................................................................................852
Create Send E-Mail Action.............................................................................................................855
Design E-mail Template.................................................................................................................855
Test the BPM Form........................................................................................................................859
External Methods and Workflows................................................................................................................862
Assign BPM Advanced User Rights........................................................................................................863
Method Arguments..............................................................................................................................864
Programming Interface Generator Form................................................................................................865
.NET Assembly [C#].......................................................................................................................865
.NET Assembly [VB.NET].................................................................................................................867
Service Connect Workflow............................................................................................................869
External Method Logic..........................................................................................................................871

10.2.700 11
Contents Epicor ICE 3.2 Tools User Guide

Programming Action Signatures....................................................................................................872


.NET Process [C#]...........................................................................................................................873
.NET Process [VB.NET]....................................................................................................................874
Deploy the External Method.................................................................................................................875
Attach the External Method..................................................................................................................875
Build the Method..........................................................................................................................875
Test the Method............................................................................................................................879

Chapter 7: Business Process Management Utilities....................................882


Directive Management.................................................................................................................................882
Groups.................................................................................................................................................882
Directive Export....................................................................................................................................883
Directive Import....................................................................................................................................885
Import User Rights.........................................................................................................................886
Import Compatibility......................................................................................................................887
Directive Update...................................................................................................................................887
Update a Directive Group..............................................................................................................887
Recompile a Directive Group..........................................................................................................889
Remove a Directive Group.............................................................................................................892
Update ESC Credentials.................................................................................................................895
Troubleshooting Actions..............................................................................................................................898
BPM Tracing.........................................................................................................................................898
Client Trace Log............................................................................................................................898
Activate From User Account...................................................................................................898
Activate From Client...............................................................................................................901
Select Tracing Options............................................................................................................904
Server Trace Log............................................................................................................................906
Debugging Using Visual Studio.............................................................................................................909
Prerequisites..................................................................................................................................909
Debug BPM Directive.....................................................................................................................910
Debug Custom Project...................................................................................................................913
Disable BPM.........................................................................................................................................915

Chapter 8: Global Alerts................................................................................916


Global Alerts Setup......................................................................................................................................916
Company Maintenance - Email Settings................................................................................................916
Alert Attachments - Shortcut Link.........................................................................................................918
Alert Data Directive for Standard Global Alerts......................................................................................919
Create Data Directive.....................................................................................................................919
Define the Condition.....................................................................................................................921
Define the Send E-Mail Action.......................................................................................................923
Connect the Directive Sequence and Enable the Directive..............................................................927
Standard Global Alerts.................................................................................................................................929
Standard Global Alert for Specific Recipient..........................................................................................929

12 10.2.700
Epicor ICE 3.2 Tools User Guide Contents

Activate the Global Alert...............................................................................................................930


Set Up the Work Force..................................................................................................................931
Set Up a Test Sales Order...............................................................................................................932
Trigger the Alert............................................................................................................................933
Alert for Alert Group............................................................................................................................935
Alert Groups..................................................................................................................................936
Activate the Global Alert...............................................................................................................936
Set Up an Alert Group...................................................................................................................937
Set Up a Person.............................................................................................................................938
Assign the Person to a Production Team........................................................................................939
Trigger the Alert............................................................................................................................940
Custom Global Alerts...................................................................................................................................941
Refine the Shortcut Link File..................................................................................................................941
Create the Data Directive......................................................................................................................943
Define the Alert Condition....................................................................................................................945
Define the Send E-mail Alert Action......................................................................................................948
Connect the Directive Sequence and Enable the Directive.....................................................................952
Test the Custom Alert...........................................................................................................................954
Test the Shortcut Link...........................................................................................................................956

Chapter 9: Dashboards..................................................................................959
Standard System Dashboards.......................................................................................................................959
Navigate in a Dashboard.......................................................................................................................960
Conduct an Advanced Search...............................................................................................................964
Assign Dashboard Developer Rights.............................................................................................................965
Dashboard Creation.....................................................................................................................................966
Dashboard Developer Mode.................................................................................................................966
Add a Query to the Dashboard.............................................................................................................970
Add the Query...............................................................................................................................970
Modify Query Properties.......................................................................................................................975
General Properties.........................................................................................................................975
Publish to Title Bar.........................................................................................................................977
Apply Filters to a Query.................................................................................................................979
The Grid View.......................................................................................................................................981
The Grid Properties Window..........................................................................................................982
Change Display Columns and Enable Group By and Summarization in a Grid.........................982
Change the Grid Display.........................................................................................................985
Apply a Filter to a Grid...........................................................................................................990
Add a New Grid View to the Dashboard.................................................................................991
Add a Rule to Highlight Cells..................................................................................................995
Add an Image Column to a Grid Based on a Rule...................................................................999
The Chart View...................................................................................................................................1004
The Chart Properties Window......................................................................................................1004
Add a Chart View.................................................................................................................1004

10.2.700 13
Contents Epicor ICE 3.2 Tools User Guide

Chart Settings.............................................................................................................................1007
Modify Chart Settings..........................................................................................................1007
The Tracker View................................................................................................................................1010
The Tracker Properties Window...................................................................................................1011
Add a Tracker View for an Advanced Search.........................................................................1011
Add an Advanced Search with Range...................................................................................1013
The Gauge View.................................................................................................................................1020
The Gauge Properties Window....................................................................................................1020
Add a Gauge View to the Dashboard...................................................................................1020
The URL/XSLT View.............................................................................................................................1023
URL/XSLT Properties.....................................................................................................................1023
Add a URL Link to Display the Customer Website.................................................................1023
The Process Link.................................................................................................................................1026
Process Link Properties.................................................................................................................1026
Add a Process Link for Customer Entry.................................................................................1026
The Report View and Report Link........................................................................................................1030
Report Options............................................................................................................................1030
Design Crystal Report..................................................................................................................1031
Select Report Data.......................................................................................................................1035
Add Report View.........................................................................................................................1042
Add a Report Link to the Dashboard............................................................................................1045
Publish and Subscribe Functionality............................................................................................................1049
Add a Secondary Query to Display Line Item Shipment Information.....................................................1049
Publish................................................................................................................................................1051
Publish Fields from a Query..........................................................................................................1052
Subscribe............................................................................................................................................1053
Apply a Filter that Subscribes to the Published Order and Line Number........................................1053
Bind Query Parameter to a Published Column.....................................................................................1056
The Dashboard Browse..............................................................................................................................1061
Add a Dashboard Browse to the Dashboard........................................................................................1061
Dashboard User Notes and Tech Notes.......................................................................................................1068
Update Notes.....................................................................................................................................1069
Dashboard Properties.................................................................................................................................1070
Modify the Dashboard Title Bar...........................................................................................................1071
Enable the Dashboard as Advanced Search.........................................................................................1073
Dashboard Modification.............................................................................................................................1075
Copy a Dashboard..............................................................................................................................1075
Multi Threaded Save..................................................................................................................................1078
Reusing Views............................................................................................................................................1081

Chapter 10: Dashboard Utilities.................................................................1089


Export and Import Dashboards...................................................................................................................1089
Export Definition.................................................................................................................................1089
Import Definition................................................................................................................................1091

14 10.2.700
Epicor ICE 3.2 Tools User Guide Contents

Deploy Dashboards....................................................................................................................................1095
Deploy Dashboard as an Application...................................................................................................1095
Access New Dashboard.......................................................................................................................1100
Deploy Kinetic Dashboards.........................................................................................................................1105
Deploy Dashboard as a Kinetic Application.........................................................................................1105
Add Kinetic Dashboard to the Main Menu..........................................................................................1108
Mobile Device Dashboards.........................................................................................................................1111
Assign Mobile Access Rights...............................................................................................................1111
Create a Mobile Device Dashboard.....................................................................................................1112
Define Mobile Navigation...................................................................................................................1115
Deploy Mobile Dashboard Device........................................................................................................1120
Mobile Menu Maintenance.................................................................................................................1123
Explore Home Page.............................................................................................................................1124
Launch Mobile Dashboard..................................................................................................................1126
Filter Data...........................................................................................................................................1127
Update Records Using Mobile Dashboard...........................................................................................1131
URL Query Phrase Subscribers....................................................................................................................1134
Create New Dashboard.......................................................................................................................1135
Create URL View.................................................................................................................................1137
Epicor SharePoint Publisher........................................................................................................................1140
Create a New Web Part Page..............................................................................................................1141
Modify a Web Page............................................................................................................................1143
Arrange Views Within the SharePoint Page.........................................................................................1147
Adjust the ESP Dashboard...................................................................................................................1149
Web Dasher........................................................................................................................................1152

Chapter 11: Updatable Dashboards...........................................................1155


Assign Updatable BAQ Rights....................................................................................................................1155
Updatable Business Activity Queries...........................................................................................................1157
Define an Updatable BAQ...................................................................................................................1157
Set Up the Updatable Query...............................................................................................................1158
General Properties..............................................................................................................................1160
Primary Updatable Properties.......................................................................................................1160
Define Updatable Fields...............................................................................................................1161
Updatable Field Editor.................................................................................................................1164
Update Processing..............................................................................................................................1166
Advanced BPM Processing...........................................................................................................1167
Update Processing.......................................................................................................................1168
Analyze..............................................................................................................................................1173
Update Existing Record................................................................................................................1173
Add New Record.........................................................................................................................1177
Customer Contact Updatable BAQ.....................................................................................................1180
Define the Query.........................................................................................................................1180
Add the Tables............................................................................................................................1181

10.2.700 15
Contents Epicor ICE 3.2 Tools User Guide

Link the Role Code Table.............................................................................................................1184


Add the Ship To Table.................................................................................................................1186
Select Columns for Display..........................................................................................................1190
Indicate the Sort Order................................................................................................................1194
Define the Updatable Fields.........................................................................................................1195
Activate Database Processing.......................................................................................................1196
Test the Updatable BAQ..............................................................................................................1198
Regenerate Updatable BAQs...............................................................................................................1205
Updatable Dashboards...............................................................................................................................1207
Create a Dashboard............................................................................................................................1208
Add Customer Query..........................................................................................................................1209
Modify Customer Grid Properties........................................................................................................1212
Add Updatable Contact Query............................................................................................................1215
Modify Contact Grid Properties...........................................................................................................1220
Add Tracker View for Contact Query..................................................................................................1223
Test Updatable Dashboard..................................................................................................................1225
Updatable BAQ Method Directives.............................................................................................................1230
Custom Actions..................................................................................................................................1230
Default Data to Updatable BAQ Records.............................................................................................1231
Publish Dashboard Data...............................................................................................................1231
Get the Updatable BAQ Methods................................................................................................1233
New Post-Processing Directive.....................................................................................................1234
Select BAQ Directive Action.........................................................................................................1235
Define BAQ Directive Action........................................................................................................1236
Add More Set Field Actions.........................................................................................................1239
Test the Directive.........................................................................................................................1240

Chapter 12: Executive Dashboards.............................................................1244


ShopVision Module....................................................................................................................................1244
How Executive Dashboards Work...............................................................................................................1245
Executive Dashboard Setup........................................................................................................................1246
Schedules...........................................................................................................................................1246
Process Set Maintenance....................................................................................................................1247
The Business Activity Query (BAQ).......................................................................................................1248
Executive Dashboard Creation....................................................................................................................1249
Create an Executive Dashboard - Overview.........................................................................................1249
Executive Query..................................................................................................................................1249
What It Adds...............................................................................................................................1250
Limitations...................................................................................................................................1250
Create the Base Cube Query........................................................................................................1250
Field Mapping.............................................................................................................................1253
Save to Process Set......................................................................................................................1255
Executive Query Examples...................................................................................................................1257
Example One...............................................................................................................................1257

16 10.2.700
Epicor ICE 3.2 Tools User Guide Contents

Example Two...............................................................................................................................1258
Create a Dimension BAQ....................................................................................................................1259
Build the Executive Query Against Data Dimensions.....................................................................1265
Schedule a Process Set........................................................................................................................1267
Create BAQs for Executive Dashboard Display.....................................................................................1268
Dimension BAQ...........................................................................................................................1268
Dimension Details BAQ................................................................................................................1269
Data BAQ....................................................................................................................................1270
Create and Deploy a Dashboard.........................................................................................................1271
Verify the Process Set..........................................................................................................................1272

Chapter 13: Epicor Data Analytics..............................................................1273


Design Database........................................................................................................................................1273
Add User-Defined Fields......................................................................................................................1273
Add Base Currency Measures..............................................................................................................1282
Create Financial Statements Database.................................................................................................1289
Export Chart of Accounts to Excel................................................................................................1290
Map Accounts.............................................................................................................................1295
Design Financial Statements Database.........................................................................................1298
Troubleshooting.................................................................................................................................1303
Inventory Databases Do Not Display Historic Data........................................................................1303

10.2.700 17
Contents Epicor ICE 3.2 Tools User Guide

18 10.2.700
Epicor ICE 3.2 Tools User Guide Introduction |

Introduction

The Epicor Tools User Guide explores the data gathering and monitoring tools available within the Epicor ICE
framework. This guide is intended for managers responsible for fine-tuning their departmental use of the Epicor
ERP application and advanced users looking to manage and display key data for their specific business needs.
The first chapters examine business activity queries, or BAQs, which are the primary query tools you use for
pulling, displaying, and entering specific data. You can create BAQs that display unique views of data, and also
updatable BAQs that contain fields you activate for data entry. Next you explore how to use the External Query
functionality to manipulate data from external data sources. Then the BAQ Report Designer chapter explains how
to turn a BAQ into a SQL Server Reporting Services (SSRS) report.
The Searches chapter that follows explores the tools you can use to easily locate and organize records using filters
and specific criteria.
The chapters that follow discuss the Business Process Management (BPM) functionality you can use to create
workflows that automate, execute and monitor business processes. Learn how to create method, data, and BAQ
directives that ensure data entries are valid and reflect your business cycle. The Custom Business Process
Management chapter discusses more advanced techniques such as execution of custom code written in C#
language or creation of external methods. The BPM functionality is concluded with an overview of utilities available
within the BPM module.
Then, the Global Alerts chapter explores how you can use both standard and custom global alert messaging.
Global alerts are email messages you activate to help specific users track data activity. Learn how to determine
which alerts you want continuously monitoring data and who will receive the automatic email messages generated
by the specific database activity.
The chapters that follow explore how to monitor, display and manipulate your business data using Dashboards.
Learn how to incorporate BAQs and BPMs for custom use on smart client dashboards, executive dashboards,
and mobile device dashboards.
The guide concludes with the Epicor Data Analytics (EDA) chapter. You can use this business analytics tool for
long-term data exploration in a data warehouse.
Use this guide as a starting point to learn about the available data flow tools and as a reference for later use of
these same tools. This guide is a crucial resource for anyone who monitors data to both manage and enhance
their organization’s unique business practices.

10.2.700 19
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Chapter 1: Business Activity Queries

Use the Business Activity Query (BAQ) Designer to create personalized queries or to copy system queries so you can
modify them. Queries can be accessed in different ways throughout the Epicor ERP application. Queries can be used
to generate Reports, included in application Searches, displayed and updated through a dashboard and mobile devices.
BAQ execution results can also be exported as .xml or ASCII files, so you can edit their data in third party applications
as well. The functionality has some security options, as you can create queries only available for your personal use, or
create shared queries available to everyone within your company.

Example You are in charge of your company’s security. You need


to build one query that lists all security IDs in the system for the
current company. Since this item is a sensitive query, you do not
select it as a shared query.
You next create a query that summarizes the status of current orders.
Because you want everyone to be aware about the progress of the
sales orders, you define this query as a shared query.

Leveraging this functionality does require some fundamental knowledge of database concepts such as table relationships,
records, and field types. This knowledge helps you create queries that have good performance and display the results
you want. You start by defining the information to display through your BAQ, and then finding out which database
tables contain the appropriate columns which hold this data. Some application tools are available which can help you
find the database information you need. This chapter describes these tools.
Once you determine the information you want to display, you can begin creating the query through the Business
Activity Query Designer. Use the Query Builder sheets to define which tables you want to include in your main query,
potential subqueries and what relationship they have with each other. You also define subquery parameters and decide
which columns you want to display for the end user. Finalize your BAQ by testing it using the Analyze sheet, correct
any errors before you use this query on a dashboard or mobile device.
Queries can be read only tools which you can later place on a smart client dashboard for display on the Main Menu.
You can also create an updatable BAQ. These BAQs can be placed on a smart client dashboard and/or used on a mobile
device, such as an iPhone® or a Blackberry®. Users then enter data through either the dashboard or the mobile device,
and this new data updates records within the main database. Business Process Management (BPM) directives can be
created which monitor the data entered through an updatable BAQ. Based on the conditions defined in the BPM
directive, various actions run automatically. For example, you could use this functionality to verify data is being correctly
entered into the database. Updatable dashboards and BAQ directives are described in later chapters in this guide, but
you will learn the basic principles for updatable BAQ functionality through this chapter.
To further leverage the BAQ functionality, you can connect to an external data source using the ODBC connection.
Use this feature to design an external query in a similar way to create an ordinary query. For more information on how
to utilize External BAQs, review the External Business Activity Queries chapter.

Database Viewing Tools

The Epicor application contains tools to help you locate database information you need. These tools also reduce
issues with your BAQs, as you can leverage them to make sure you reference correct fields and tables within your
modified and personalized queries. This section describes Data Dictionary Viewer and Field Help options you can
use to find the required information before you start designing your custom query.

20 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Data Dictionary Viewer

You use the Data Dictionary Viewer to find and review details of each field and table within the database. It helps
you better understand the purpose and data values of every field.
Use this program to identify the fields and tables you want within a custom business activity query. This program
is also an aid during upgrades, as you can view the current database structure to compare it against a previous
database version; this helps to ensure your BAQs match the current state of the database.
Menu Path: System Setup > System Maintenance > Data Dictionary Viewer

Table View

To use the Data Dictionary Viewer:

1. In the Table Schema Type, select a schema that holds the table of your interest.
The available options include:
• System - Select this option to retrieve tables belonging to the ICE schema which refers to the Tools
(framework) part of the system.
• Product - Select this option to retrieve tables belonging to the ERP schema which refers to the Application
part of the system.
• Intermediate - Select this option to retrieve intermediate tables. Tables within this schema stage the
data for another process to come through and update the main database tables.

10.2.700 21
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Click the Table button to find and select the table you wish to review.

In Epicor ERP version 10, user-defined columns are placed


within separate UD tables.
For example, the Part table may have a corresponding
Part_UD table.

3. The Description field displays a brief explanation for the table.

4. The IndexName column displays the index name used by the database to access a specific field. Each field
is displayed using its database schema name. In this example, ABCldx is shown.

5. The Fields displays which column(s) of a database table are associated with a particular index as well as the
order in which columns are listed in the index definition.

6. The Display Format section contains options that change how the information displays on the Tree View.
Available options:
• Schema – Select this option to display the table fields in schematic order on the Tree View. This defines
the order of precedence in which the fields are evaluated by the application. For example, Company,
Resource Group, Alternate Resource Group.
• Alphabetic – Select this option to display the table fields in alphabetic order on the Tree View. For
example, Alternate Resource Group, Company, Resource Group.

Field View

You can also use the Data Dictionary Viewer to display information on a selected field.

1. In the Tree View, select a field. In this example, you select the Count Frequency field.

22 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. The Fields > Detail sheet displays the field’s information.

3. The Field Name displays the selected field. If you need, you can use the Navigation toolbar to display a
different field.

4. The Format field defines the layout for the characters within the field. This value displays in either schema
or alphanumeric format; for example, X(8), >>9.

5. If this field is a Decimal type (see the Type field description below), the Decimals field displays how many
decimal positions are available within the field.

6. The Extent field indicates how many items you can store within this field for each record. If this value is
higher than one, it indicates multiple values can appear within this field. For example, if 5 displays, the field
can contain up to five items.

7. The Type field defines the selected field’s main data definition. The type defines the data that displays within
the field; for example, nvarchar, integer, bit.

8. The Initial Value field defines the beginning value, if any, that automatically displays within this field. It
indicates the default value that appears each time a user views this field.

9. If this field is displayed on a grid, the Column Label field indicates the text that displays at the top of the
grid column; for example, Count Freq.

10. The Label field displays the title that displays above the field on a sheet, for example, Count Frequency.

10.2.700 23
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

11. When selected, the Mandatory check box indicates the current field is required. To finish a record within
this table, users must either enter data or select an option within this field.

12. The Description field displays the concise explanation for the field. This text explains the field’s purpose
and other useful information.

13. The Display Format section contains options that change how the selected field’s information displays on
the Fields sheet. Here is what these options do:
• Schema – When selected, this option displays the field’s schematic values. These values define how the
database views and evaluates this field’s data.
• Alphabetic – When selected, this option displays the field’s alphanumeric values. Use these values to
help you understand how the field’s data appears on the interface.

Field Help

Use the Field Help feature to display the technical details on a specific field within a program (form). With the
Field Help window displayed, you can immediately see the technical information you need on each field. When
you click the mouse pointer inside a field, the Field Help window displays the field details from the Data Dictionary.
Navigate and launch the program that contains fields you want to use in a BAQ to activate field help within each
program.
For this example, you launch Ship Via Maintenance: Sales Management > Order Management > Setup >
Ship Via.

1. Click the Help menu.

2. From the menu options, select Field Help to display the pane in the left portion of the screen.

24 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

3. Click the Thumbtack icon to pin the window in place. If you do not click this icon, the Field Help window
automatically minimizes to the side of the window (form). You can then display Field Help again by clicking
the button that displays on the side of the window.

4. When the Field Help window is pinned to the interface, you can view the technical details for the current
field. To do this, click the Technical Details button.

5. The Field Help window displays the technical details on each selected field. For this example, the Description
field is selected on the Detail sheet, and so the technical details for this field display within the Field Help
window.

10.2.700 25
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. The Field Name displays the selected field.

7. The EpiBinding field displays the name to use if you want to link to this field through a customization or
a code reference. This value uses the ViewName.FieldName format. ViewName is the name of the view on
the user interface; FieldName is the database column name.

8. The DB Field value contains the information you most likely need for your BAQ. It displays the table name
and the column name for the selected field. Typically, this value is identical to the EpiBinding value and it
displays the true database name for the field.

9. The Format field defines the layout for the characters within the field. This value displays in either schema
or alphanumeric format; for example, X(30).

10. If this field is a Decimal type, the Decimals field displays how many decimal positions are available within
the field.

11. The Data Type field defines the selected field’s main data definition. The type defines the data that appears
within the field; for example; Character, Decimal, Boolean (True or False).

12. If this field is displayed on a grid, the Column Label field indicates the text that appears at the top of the
grid column.

26 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

13. The Description field displays the concise explanation for the field. This text explains the field’s purpose
and other useful information.

14. Continue to click other fields to display the technical details for each field on the form. When you finish,
click Close on the Field Help toolbar.

System Queries

Several system queries developed by Epicor are installed within the application. The delivered queries all begin
with the letter ‘z’ so that you can easily differentiate them from queries you create. When you create a custom
query, or copy an existing query to modify it, you must follow specific naming conventions.
Navigate to Business Activity Query Designer.
Menu Path: Executive Analysis > Business Activity Management > Setup > Business Activity Query

This program is not available in Epicor Web Access.

View System Queries

To view the list of system queries:

1. Click the Query ID button.

2. Notice you can filter the business activity queries by various types. To view system queries, select the
System check box.

10.2.700 27
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

3. Click Search.

4. Look at system query properties.

You cannot modify a system query delivered with the


Epicor application. You must first copy the query, rename
it, and then modify it. This process is reviewed in the Copy
Query section later in this chapter.

5. The Author field displays the login of the user who created the BAQ. Only the author can modify their
BAQs. However, you can assign a new author to modify a BAQ. To do this, from the Actions menu, select
Change Author. This functionality is explored in the Actions Menu section of this chapter.

6. The Description field describes the purpose of the query.

7. The Shared property indicates whether a query is available to all users within the current company. System
queries are all marked as Shared.

8. The Cross-Company check box indicates the ability of a query to brings back all results across companies.
In order to use this function, a selected user must have the ability to create cross-company queries.

9. If a query is Updatable, a check mark displays in this column as well. This value indicates users can enter
data within the BAQ that then updates the database.

10. The External queries use data retrieved from an external datasource outside the Epicor ERP application.
They are created within the External Business Activity Designer found in the System Management module.
To learn more about this functionality, review the External Business Activity Queries chapter.

28 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

11. As you indicated in the Search criteria, only System queries display on the list.
All system queries are created by Epicor, and this column indicates Epicor delivered these BAQs to your
database.

12. The All Companies check box indicates whether the BAQ Definition is visible to all companies on the same
database server. When the Epicor application uses multiple companies contained within a single database,
the BAQ usage and visibility is applied regardless of multi-company direct configuration. For companies
hosted on different databases, this check box initiates the Service Bus processing, when it is configured to
synchronize BAQs to external companies. If the custom BAQ is created from a Company that is running
under a multi-tenant license, the definition becomes visible to all companies within the same Tenancy as
the Owning Company. The BAQ definition can only be updated from the original company, but is available
for execution and review in other companies.

13. The Use Primary Database field indicates if this execution setting is enabled for the BAQ.
For details on the Use Primary Database feature, please refer to the Actions Menu > Execution Settings
topic.

14. Select the system query you need and click OK.

15. The Change Security Code command allows selecting custom Security codes and apply them to System
BAQs. If a seeded System BAQ already references a System Security code as assigned by Epicor, it is possible
for customer administrator to control user access by creating a custom Security code record and allow or
disallow access to users or user groups, and assign them to System BAQs. In On-Premise and Multi-Tenant
environments a user can apply one Security code to any System BAQ. The applied Security code allows user
access to a system query in all on-premise companies, as well as in all companies within the tenancy.

Only a user with Security Manager rights is allowed to


make changes to a System BAQ.

10.2.700 29
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Custom Queries

You create your own queries in the Business Activity Query (BAQ) Designer program.
When you create custom queries, make sure you query database tables that are indexed in the Epicor Data Model.
The Epicor database contains a number of internal system tables that are not part of zData. When run from the
ERP application, queries that request data from such tables end up in failure. Use the Data Dictionary Viewer tool
to check if a specific table belongs to the Epicor Data Model.
Furthermore, the BAQ Designer also takes into account additional table metadata stored in the Epicor Data Model
- for example, detailed description, data format, Like columns from other tables, or applied security restrictions
(by Territory ID, Site/Plant, etc.). So if a table has been designed to display only for one specific site, you will not
be able to query it from another.
Some table fields and tables may have availability restrictions based on their pertinence to a specific
Country/Country Group Code (CGC Code) used in development of Country Specific Functionality (CSF). In the
BAQ Designer, you can query such fields or tables only from the Companies with a matching Country Code or
Country Group Code, if any. For example, the Erp.Customer.MXMunicipio field is available for querying only if
you have the Mexican CSF package installed and the current Company has the MX (Mexico) Country Code
assigned to it.

New Business Activity Query

The Business Activity Query Designer program contains multiple sheets through which you define the query
criteria and indicate how the data displays through the executed query. The content and purpose of each sheet
is described in this section.

The General Sheet

Use the General sheet to create your query; you define the query’s identifier and description here. You also
indicate whether this query should be made available to all users within the company, support data updatability,
if you want to share this query between multiple companies and if the query should retrieve results across
companies.
In this example, you create a query that displays all open sales order detail lines.
The QueryPhrase text box displays the query you created. The resulting SQL statement is a pseudo SQL statement
that indicates how the query is executed.

When a BAQ is executed, Today and other dependent


constants, as well as the current date value for current
date-based condition, are calculated one time per query run,
and their values are based on company time zone of the
company from which the BAQ is executed. For Cross-Company
BAQ, it means the value of Today and dependent constants is
calculated based on company time zone of user’s current
company; it is not recalculated for each company from which
the data is retrieved by Cross-Company BAQ.

Define Business Activity Query Attributes

1. Click the New button.

30 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. In the Query ID field, enter a value. In this example, enter SalesValue.


When creating a new Business Activity Query, the originating company information is attached to the BAQ
behind the scenes.

A Query ID can only contain letter characters, digits,


dashes, or underscores. It cannot begin or end with a
dash or an underscore.

3. In the Description field, enter a concise explanation for the query. In this example, enter Total Value of
Quotes, Orders, Invoices by Date.

4. Notice the Author field displays the name of the user who created the current business activity query. Other
users cannot modify the current query. If you need to assign author rights to another user, use the Actions
> Change Author option.

5. The Owning Company displays the company inside which the current BAQ was created. You cannot change
this value; only users within the Owning Company can modify this BAQ.
If the All Companies check box is selected, then companies within the same organization as the Owning
Company can view and use the query. If the System BAQ check box is selected, the Owning Company field
is blank. This indicates the current BAQ is available to all companies within the current organization.

6. The Shared check box indicates this query is available to all users. After you save the query, all users in your
company can utilize this query using the available BAQ consumers, such as Quick Searches, BAQ info zones,
BAQ reports, and dashboards. Note these users will need various rights to use these features.

To learn more about creating your own dashboards, refer


to the Dashboards chapter. For more information about
how to use global BAQs and the multi-company
functionality, review the Multi-Site Technical Reference
Guide available within the application help.

7. The All Companies check box controls whether the current BAQ Definition is visible to all companies on
the same database server. When the Epicor application uses multiple companies contained within a single
database, the BAQ usage and visibility is applied regardless of multi-company direct configuration. For
companies hosted on different databases, this check box initiates the Service Bus processing, when it is
configured to synchronize BAQs to external companies.

10.2.700 31
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

If the custom BAQ is created from a Company that is running under a multi-tenant license, the definition
becomes visible to all companies within the same Tenancy as the Owning Company.
The options/values for tenant and multi-tenant features are only for Epicor hosted environments. Typically
you can ignore these options. Internal Epicor administrators who need more information should refer to
the Epicor SaaS Installation Guide.

The following rules apply to usage of BAQs visible across companies:


• The BAQ definition can only be updated from the original company, but is available for review and
execution in other companies. To modify the BAQ definition in other companies, you need to create a
copy of the BAQ.
• The BAQ ID of queries having the All Companies property must be unique across all companies.
• When you create a BAQ visible across companies in Company A, and Company B uses a local BAQ with
the same ID, a warning message displays. A user is informed that in Company B, the local BAQ is used
and the BAQ created in Company A will not be available for use.
• Likewise, when you create a local BAQ in Company A and a BAQ visible to all companies, having the
same ID, already exists in the Company B, a warning message displays. A user is informed that the local
BAQ will take precedence over the All Companies BAQ. The same principle is true for the BAQ import
process.

The local BAQ always take precedence over the BAQ


visible to all companies, when the naming conflict
occurs.

To see in which companies (outside the current company), references to the BAQ were created, use the
Where Used tabs.

8. The System BAQ check box indicates whether the current BAQ is installed with the Epicor ERP application.
If the current BAQ is a system BAQ, you cannot make changes to it.
This information displays in the read-only format.

9. By selecting the Updatable check box, you indicate the current query allows performing database updates.
This option activates the sheets under the Update tab; use these sheets to indicate which fields will be
available for data entry through this query. You can place an updatable BAQ on both smart client dashboards
and mobile device dashboards.

When you select this option, the Use Primary Database


option in the Execution Settings is selected
automatically.

To learn how to utilize updatable queries, see the Updatable Business Activity Query section later in this
chapter.

10. The Cross-company check box controls if the BAQ brings back results across multiple companies.
In order to use this function, a selected user must have the ability to create cross-company queries.

11. Click the Security ID button to search for and select a security code used to give or block access to the
BAQ for specific users. Security codes limit access to user groups, specific users, and/or both; the codes are
configured in the Menu Maintenance program.

This field is disabled for system BAQs. Security Managers


can update the Security Code applied to a system BAQ
by using the Change Security Code action.

32 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

12. When you finish, on the Standard toolbar, click Save.

The Query Builder

Use the Query Builder sheets to design a Business Activity Query. Use this sheet to set up everything from basic
queries with a single table to complex queries including multiple subqueries of different types, joins or query
parameters.
The Phrase Build sheet is where you select the tables and fields you wish to include in the query. Use this sheet
to set up everything from basic queries with a single table to complex joins between multiple tables.
Several sheets are available at the bottom of the Phrase Build sheet. Use these sheets to indicate how tables are
linked together, define the relation between the tables, and specify the selection criteria for the query.
The Display Fields sheets define which columns display and in what order they display in the query. You can
also create and display a special calculated field you need within the current business activity query and indicate
if you want to sort BAQ results through any combination of columns.
The SubQuery Options sheet is where define subquery properties. When you construct a BAQ, use this sheet
control what data displays in the SQL output by selecting an appropriate subquery type. You also have the ability
to control the SQL results set. For example, you can construct an SQL text to only display top 50% of rows from
the retrieved results set.
The SubQuery List sheet displays the read-only information of all subqueries created within the BAQ. All
subqueries are ordered by the sequence number. Using this sheet, you can change the order of subqueries to
define how partial query texts are concatenated in the final SQL statement.

Add Table

Use the Phrase Build sheet to design a query using the visual representation of the query.

1. On the left pane, Epicor ERP tables, Extension tables within the database are displayed in the table palette.
Select a table you want to add.

10.2.700 33
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. To easily locate the table you want, in the Filtering field, enter a value.
By default, the filter is applied to all tables whose names (excluding the schema part of the table name) start
with the string you enter in the filtering box. In this example, enter Quote to narrow down the list of tables.

3. When you select the Contains check box, all tables that contain a filtering substring you enter in the Filtering
field display.

4. In the left pane, above the list of tables, the three buttons control the list of available objects you can select
and drag on the designer canvas:
• Connected Only - When selected, the palette displays only the tables that have relations, described in
system tables, with the table you select on the canvas. The table palette displays Extension Table when
connection with selected table is defined in Extension Table settings.
• SubQueries - When selected, the palette displays subqueries of InnerSubQuery or CTE type created
within the current BAQ. You can drag these subqueries on the canvas and use in the JOIN clause as any
ordinary table.
• Table-Valued Functions - When selected, the palette displays all Table-Valued Function (TVF) defined
in the application. A Table-Valued Function is a user-defined function that returns a table. Currently, this
feature is only supported in External Business Activity Query.

5. The central part of the form contains the canvas where tables are dropped.

34 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

6. To include a table in your query, select a table and drag it on the canvas in the center pane.

To perform multi-selection, hold Ctrl or Shift and select


tables you want to include in the BAQ.

BAQ Designer displays extension tables relevant to the


current company in table list. Table information, as well
as Field information, is displayed when you select the
table. Fields from extension tables are used similar to fields
from regular tables.

Peer Extension Table Columns display as a part of their


main table and follow the
<SystemCode>_<TableName>_<FieldName> naming
pattern.

Additional Controls

Several additional Phrase Build controls help you construct the query.

1. To create a manual connection between two tables, click the Add Connection button. Select the first table
you want to link; drag the line and drop it on the table you want to connect to.
For more information on table connections, review the Phrase Build > Table Relations topic.

10.2.700 35
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. If you want to remove a table or an existing connection from the query, select it on the canvas and click
Remove Selected.

3. Instead of selecting tables individually, you can use the Business Objects button to search for and load
table(s) within an entity, for example, ERP.Part. These tables are organized as hierarchical nodes under the
business objects, User can inspect these tables and drag some of them on the canvas. Dragging the parent
node results into adding all child nodes also. The links between loaded tables are displayed automatically.

You cannot select multiple tables/objects at once.

4. The Toggle IsSummary Flag button is an Epicor 9 legacy feature, which should be used ONLY with legacy,
migrated BAQs to simulate Epicor 9 summary table behavior. Users should not use this option when creating
new BAQs as this flag does not support new features such as subqueries. New BAQs should use standard
SQL syntax with GROUP BY and HAVING, and SQL aggregate functions to create aggregate queries.

5. You can use the options on the Arrange Diagram list to modify how the tables display on the grid. Available
options include:
• Diagram Overview - Displays the query in its default view mode.
• Zoom - Select this option to turn on zoom mode. When you click the tables in the grid, they increase
in size.
• Fit to Screen - Displays the entire query through a high level view.
• Layout Tables Automatically - Places the tables in a default order. The order of tables can be set on
the Table List sheet. Current positions of tables within a subquery is represented by numbers in the upper
left corner of table rectangles.

6. The right pane contains the description and list of the columns on the selected table. You can use the
Filtering edit box to only view the columns, with names that start with specified letters and sort column
names (alphabetically or in database order).

Table Relations

Use the Table Relations sheet to display and modify the fields that make up the joins between tables and
subqueries. You can add, modify and delete the join fields within the current query.
By default, queries are set up to display Matching rows from {left joined table} and {right joined table},
which means that data from the first table only displays if it is linked to data within the second table. The query
output from this type of join includes all the records in which the table relations values in both tables are an exact
match. Records from either table that do not have a match in the other table are not included in the query results.
For example, use the matching rows join to view all customers and the orders they have placed. You will not get
a match for any customer who has not placed orders. Most queries you create only need this type of join.

It is crucial a user explicitly determines the correct order of


tables in the query to retrieve the expected results.

You can use the following join types to retrieve the expected BAQ results:
• Matching rows from {left joined table} and {right joined table} - only rows satisfying join criteria from
both joined tables are selected. By default, tables are linked through this type of join.

36 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Example
The join between the Customer table1 and the OrderDtl
table2 creates a view that displays customers and orders
placed. In this case, the view includes only customers who
have placed an order. Records for any customers who have
not placed an order are excluded.

Use this join to display only matching records between the primary table and the lookup table.
• All Rows from {left joined table} - rows satisfying join criteria from both joined tables are selected as well
as all remaining rows from left joined table are kept along with Nulls instead of actual right joined table values.

Example
Use the All Rows from {left joined table} join to view all
customers (table1) and the orders (table2) for these
customers, and to retrieve a row for every customer who
has not placed any orders. Fields that otherwise hold the
order information display blank for these customers.

• All Rows from {right joined table} - rows satisfying join criteria from both joined tables are selected as
well as all remaining rows from right joined table are kept along with Nulls instead of actual left joined table
values

10.2.700 37
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Example
Use the All Rows from {right joined table} join to find each
employee (table1) and his or her department (table2), but
still show departments that have no employees.

• All Rows from {left joined table} and {right joined table} - rows satisfying join criteria from both joined
tables are selected as well as all remaining rows both from left joined table and right joined table are kept
along with Nulls instead of values from other table.
In SQL, this type of join combines the results of both left and right outer joins and returns all (matched or
unmatched) rows from the tables on both sides of the join clause.

Predefined Dictionary Relations

When two tables are placed on the canvas, and relation between tables is described in the dictionary, the relation
is drawn by the BAQ automatically. The relation is represented by the line that indicates the JOIN clause. You
can also create table relations manually or replace existing ones.
To automatically connect tables:

1. Click the Connected Only button (the chain link icon) to only display tables appropriate for linking with
the selected table that displays on the grid.

38 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. Click and drag another table to the grid. In this example, drag and drop the Customer table on the center
pane.

3. When two tables are placed on the canvas, and relation between tables is described in the dictionary, the
relation is drawn by the BAQ automatically. The relation is represented by the line that indicates the JOIN
clause. Automatic creation of JOINs is supported between standard Epicor tables, between Epicor tables
and Extension tables, and between Extension tables.

4. When the relation involves two standard tables, by default queries are set up to display the Matching rows
from {left joined table} and {right joined table} join type, which means that data from the first table
only displays if it is linked to data within the second table. The query output from a Matching rows join
includes all the records in which the table relations values in both tables are an exact match. Records from
either table that do not have a match in the other table are not included in the query results. When relation
is between Standard and Extension tables, by default it is set up to display the All Rows from {left joined
table} join type, which means that join criteria includes all rows from Standard table, while only including
matching rows from Extension table. Data on relations between two tables is selected from Extension Table
settings. When relation includes two Extension tables, by default it is set to include all rows from the parent
table, and only matching rows from the child table.
The available types of joins are discussed on the Phrase Build - Table Relations topic.

5. You can use the Dictionary button to view and select one of the predefined relations between tables. This
is supported for relation between Standard tables, between Standard and Extension tables, and between
two Extension tables. When two tables are placed on the canvas, and relation between tables is described
in the dictionary, the relation is automatically defined by the BAQ.

10.2.700 39
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

As tables are placed on the canvas subsequently, the newly added table always checks relation with the
previous table within the table order. It does not check relations to all possible tables within the query. This
button is enabled when some predefined relation exists in the dictionary for the selected join connection,
and its title contains number of predefined dictionary relations in the parentheses.

6. The Table Relations from Dictionary window that displays when you click the button lists all relations
with their fields. The result relation expression displays in the Expression text box at the bottom. You can
select one of the relations and press the Replace In Query button. As a result, fields from the Dictionary
form will replace fields used in the current BAQ relation.

7. In this example, accept the default relation between tables using the Company and CustNum columns.

40 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Manually Connect Tables

If you want to join tables or subqueries with no predefined relations in the system, you must manually create
these relations. You can also replace or modify existing relations by building an expression of your choice.
To manually create a relation between tables:

1. To create a join between tables or subqueries, click the Add Connection button.
The cursor turns into the cross.

10.2.700 41
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Create a join between tables using the drag and drop functionality.
The tables are connected with the line. In this example, assume you would like to create a business activity
query that displays the list of parts and for each part you would like to attach a detailed company information.

3. At the bottom of the screen, the Table Relations sheet is automatically selected.

42 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

4. To define the relation between the tables, on the Table Relations sheet toolbar, click the Add Row button.

5. Create a join between the first and second table. In this example, you select the Company column to join
Part and Company tables.

You have the following options to create a relation:


• Create a simple join between table fields using the
field1 = field2 pattern.
• Construct an advanced expression, for example, using
functions or operations different from = (equals). There
is no list of predefined operators, you can enter a
custom expression of your choice.

6. If the BAQ designer determines a non-standard expression, it displays the Fx symbol in the middle of the
join square on the link.

10.2.700 43
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

7. In the Join Type field, select a desired type of join to combine records from two tables to construct your
query. The available types of joins are discussed in the Phrase Build - Table Relations topic.

When tables you add are not joined by any field, the
CROSS JOIN (Cartesian join) is automatically selected.
This join returns all records where each row from the first
table is combined with each row from the second table.

It is not possible to add a new connection to the already


connected tables. Instead add new fields on the Table
Relations tabs at the bottom of the page.

Table List

The Tables List sheet displays the list of tables and subqueries you place on the canvas for the subquery in focus.
The first table listed in the FROM clause of the resulting SQL statement is explicitly set on this sheet. The order
of the other tables is based on table relations.

1. If your BAQ incorporates multiple SubQueries, switch between them using the Active SubQuery navigational
toolbar found above the Phrase Build sheet.

44 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. The current position of a table within a subquery is represented by a number in the upper left corner within
the table rectangle.

3. In this example, the QuoteHed table is the first table within the table order.

4. Notice what the current resulting SQL syntax looks like.

5. To change the order of tables, select a table and use the Up or Down arrow on the toolbar to move the
selected table one position up or down. Repeat this action the required number of times to move the table
several positions up or down to define the new table order. In this example, select the Customer table and
click the Up arrow to make it the first table on the list.

10.2.700 45
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. Notice the change in the resulting SQL syntax.

The correct order of tables is crucial for retrieving the


expected BAQ results.

Table Criteria

Use the Table Criteria sheet to limit the data that displays in the BAQ results by adding filtering conditions for
the selected table.
When you add a filter to the table, the following rules apply:
• If the table with applied filtering is the first table in the BAQ, then these criteria go to the WHERE part of the
resulting SQL statement.

46 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

• If the table with applied filtering is not the first table in the BAQ and is connected to the previous table with
join, then within the resulting SQL statement, these criteria will be applied to the JOIN clause in the ON
condition.

You should consider leaving the query criteria open. You then
have more flexibility within the query, as you can always add
a filter to the query results within a dashboard or a BAQ report.
For more information on this functionality, review the BAQ
Report Designer and Dashboards chapters.

To create a table filter criterion:

1. Select a table on the canvas from which you want to filter the data. In this example, select the QuoteHed
table. Notice the table with a filter applied displays the "+criteria" indicator on the table rectangle.

2. Click the Sort Columns Alphabetically button to display the fields on the drop-down lists in alphabetical
order.

3. Click the Add Row button on the toolbar.

4. A new row displays on the grid; enter the options you need for this filter. In this example, you add a filter
that causes the query to only display quotes that are currently active.

5. The And/Or field defines the criterion string clause in relation with other criterion on this sheet. Use this
field when you need to apply a filter based on the values of more than one criterion.

10.2.700 47
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. Use the ( and ) fields to insert the left and right parenthesis to the clause. You can enter as many parenthesis
characters as you need to complete the order in which you want the criteria to filter the results.

7. If you want this criterion to evaluate a Not criterion value, select the Not check box. This Not value indicates
you want a value returned not like the evaluating value; for example, a column NOT IsNull.

8. From the Field drop-down list of fields of the table selected on the canvas, select the QuoteClosed field.

9. The Compare (operator) list defines how the selected field is evaluated against the Filter Value. In this
example, select = (equals) option. The Filter Value can be an alphanumeric value. You have the following
options:

Operator Description
> Greater than
< Less than
= Equals
>= Greater than or equals
<= Less than or equals
<> Not equal or not identical to
BEGINS Returns data that starts with the same characters. Although this operator is less efficient
compared to the Greater than or Equal sign (>=), you can use this value to pull in a series
of records that start with the same set of alphanumeric characters.

This operator is only used for backward


compatibility with legacy ABL/Progress
BAQs used in the Epicor 9 application.

MATCHES Returns data that is exactly the same as the character string. Although this operator is less
efficient compared to the Equal sign (=), you can use asterisk wildcards to pull in data. For
example: MATCHES '*owe*' finds both owe and powerful. With MATCHES, you can use
no asterisks, a left asterisk, a right asterisk or both asterisks.

This operator is only used for backward


compatibility with legacy ABL/Progress
BAQs used in the Epicor 9 application.

ISNULL Returns fields that have an unknown, or "NULL" value.


• If you want to find rows with the EMPTY string value, use comparison with an empty
constant. The example of an empty constant looks as follows:
SELECT AbcCode from Erp.AbcCode where AbcCode.Company <> ''

• If you want to find rows with unassigned fields, use the ISNULL operation. This
operation may be useful in external queries which execute against non-Epicor
databases.

IN Indicates this value is used with either a list of constant values or a BAQ item list parameter,
or a field from an inner subquery.
You can also use this criterion for updatable BAQs.

48 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Operator Description
CONTAINS Returns data when the selected character field has data which is present within the defined
Filter Value.

In MSSQL, CONTAINS only works when


a field is fully indexed; otherwise, the
following error is thrown:

Msg 7601, Level 16, State 2, Line 1 Cannot use a CONTAINS or FRE
ETEXT predicate on table or indexed view 'Erp.Abccode' because i
t is not full-text indexed.
This field is a predicate used in a WHERE clause to search columns containing character-based
data types for precise or fuzzy (less precise) matches to single words and phrases, the
proximity of words within a certain distance of one another, or weighted matches. This
operation can be applied against column of following data types and its derived types:
• char
• text
• image
• xml
• binary

EXISTS The EXISTS condition is considered to be met if the SubQuery returns at least one row. This
condition can be used in any valid SELECT SQL statement. The syntax for the EXISTS condition
is:

SELECT columns
FROM tables
WHERE EXISTS ( subquery );

When you select the EXISTS operator, in


the Filter Value field, you can only select
the a row in specified subquery
option.

If the subquery is not specified for EXISTS


condition, the QueryPhrase text box
displays where (exists<not selected
subquery>) statement.

LIKE Allows usage of SQL Like syntax. It determines whether a specific character string matches
a specified pattern defined in the filtering value. A pattern can include regular characters
and wildcard characters.

10. Click the Filter Value drop-down list to define how this criterion filters data. Each option displays with
hyperlink text; click this hyperlink text to define the filter values. The next section describes each of these
options in more detail. In this example, select the specified constant option. Click the specified link.

11. The Specify Value window displays.

10.2.700 49
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

12. In the Value field, enter the constant value you need. In this example, enter False as you want the query to
return open quotes.

13. Click OK.

14. Notice the word False now displays as the filter value.

15. Continue to add the criteria you need. When you finish, click Save.

16. You can now view your query; navigate to the General sheet.

17. The Query Phrase text box displays the query you created. Notice your criterion is included as part of the
resulting SQL syntax.

50 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

The Query Phrase is generated to review your query


design only. The actual query may contain additional
statements that are injected by the framework during
query execution - for example, company or security
filtering, or input parameters. Executing this query outside
Epicor ERP may produce a different result.

SubQuery Criteria

Use the SubQuery Criteria sheet to narrow down BAQ results by adding filtering conditions on the selected
SubQuery.
When you add a filter to the SubQuery, the following rules apply:
• In the resulting SQL statement, the SubQuery criterion displays in the WHERE part of the SubQuery.
• When you select the Having check box to indicate the SubQuery should meet specified conditions, the criterion
displays within the SubQuery's HAVING part of the resulting SQL statement.
For more information on creation of SubQueries, read the SubQuery Options topics.

1. If your BAQ incorporates multiple SubQueries, switch between them using the Active SubQuery navigational
toolbar found above the Phrase Build sheet.

10.2.700 51
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Navigate to the SubQuery Criteria sheet.

3. Click the Add Row button on the toolbar.

4. A new row displays in the SubQuery Criteria grid; enter the options you need for this filter. In this example,
the BAQ is comprised of two SubQueries returning the list of Quotes and Orders. You will limit the BAQ
results by adding a filter to each SubQuery. For the Quotes SubQuery, add a criterion to only return quotes
for the customer Addison.

5. Entering a condition for the SubQuery is similar to entering Table Criteria discussed in the previous topic,
except in a SubQuery, first use the Table field to select a table from the current SubQuery or a predefined
Calculated table name, when referring to calculated fields. In this example, select the Customer table.

6. Build the criterion by selecting the SubQuery Field, Operation and Filtering Value. In this example, create
a criterion to only retrieve quotes from the customer Addison.

7. When you select the Having check box, the SQL statement returns rows where aggregate values meet the
specified conditions. Typically you use this field with the calculated field editor.

8. If you want to apply criteria to another SubQuery, use the Active SubQuery navigational toolbar to select
it.

52 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

9. Enter the criteria for the second SubQuery. In this example, limit the BAQ results to only retrieve orders for
the customer Dalton.

10. You can now view your query; navigate to the General sheet.

11. The Query Phrase text box displays the query you created. Notice the filtering is applied to each SubQuery
within the resulting SQL syntax.

10.2.700 53
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

12. The following is the BAQ result returned by the query.

54 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Filter Values

The previous sections described how to create a criterion using the specified constant filter value. This section
now discusses each of the Filter Value options, explaining what you can define on each option.

Specified Table Field Value

Use this option to filter the data using a field from a table included in the query.

1. From the Filter Value drop-down list, select the specified table field value option.

10.2.700 55
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Click the word specified.

3. The Select Table window displays.

4. In the Subquery field, select the name of the subquery used to filter data.

By default, the current subquery is selected.

5. From the Table drop-down list, select the table that contains the fields you want to filter against. All the
tables available in your current subquery display.

6. All the available fields display in the fields section. Select the field you want to use in the criterion.

7. Click OK.

8. The field value displays in the Filter Value column.

56 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Specified Constant

Use this option to filter the data against a specific value you define. To use this option, do the following:

1. From the Filter Value drop-down list, select the specified constant option.

2. Click the specified link.

3. The Specify Value window displays.

4. In the Value field, enter the value you want to filter against. You can enter any text value you need.
Depending on what you enter, some values may or may not be case sensitive.

5. Click OK.

10.2.700 57
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. Your specific value displays in the Filter Value column.

Specified Expression

Use this option to filter the data against a specific expression you create. You can use this filter to build complex
expressions that are calculated when the criterion is applied to the query.
To create an expression:

1. From the Filter Value drop-down list, select the specified expression option.

2. Click the specified link.

3. The Specify SQL Expression window displays. To help you create expressions, the Editor window contains
lists of available fields, functions, and operators. You can add these items to an expression by either
double-clicking them or dragging them onto the editor window's Editor field.

58 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

The editor supports intelligent code editing, which includes invoking member lists. To bring up a list of
columns for a table, enter the name of the table followed by a dot (.) and press Ctrl + Space. Select the
column you need, it will be added to the table name. For example, ABCCode.Company.

4. Click OK.

5. Your specific value displays in the Filter Value column.

Specified Parameter

Use this option to filter the data using an alternative parameter value you define. These parameters can be nearly
any value you need.
You can also use parameters to display customized method arguments for use in Business Process Management
(BPM) directives.
The query text contains references to arguments using this format: @arg_name

Example

select * from dbo.PartCOPart as PartCOPart


where PartCOPart.CoRevisionNum = @CustomParameter
This argument reference is replaced by the argument value when the query activates.
To select this option and create a new parameter:

1. From the Filter Value drop-down list, select the specified parameter option.

10.2.700 59
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Click the specified link.


The Select Parameter window displays.

3. To create a new parameter, click the Define… button.


The Query Parameters window displays.

4. Enter the Parameter Name you want for your new parameter value.
This name cannot contain any spaces.

60 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

5. From the drop-down list, select the Data Type for the parameter. Available types:
• nvarchar
• int
• decimal
• date
• datetime
• bit
• uniqueidentifier
• bigint

6. In the Format field, the default format for this Data Type displays.
If you need, you can edit this value. Be sure the format follows the convention of the database.

7. If this parameter is required in order for the BAQ to pull in query results, select the Mandatory check box.

8. Use the Editor Type drop-down list to select how you will define the parameter values. Available options:

Option Description
Common Editor Activates the Default Value field. Enter a custom text value you need for the
parameter. The field selected on the criterion is then evaluated against this default
value.
Radio Button Set Activates the Values Editor sheet. Use this sheet to define the various radio button
options this parameter will use. The field selected on the criterion is then evaluated
against these multiple options.

10.2.700 61
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Option Description
DropDown List Activates the Data from drop-down list. Use this list to define the source of the
drop-down list options. The field selected on the criterion is then evaluated against
the options contained on the drop-down list.
Item List Use this option the create the list of values this parameter will use. The field selected
on the criterion will then be evaluated against these item list options. For this option,
BAQ execution expects the list of values transmitted in the ExecutionParameter
table, instead of a single value.
This parameter is only used with the IN operation.

9. If you select the Common Editor option from the Editor Type drop-down list, the Default Value field
activates. Enter the default value you want within this field.

10. Select the Skip condition if empty check box when you want the BAQ to ignore this parameter if it returns
a blank, or empty, value. If parameter is not supplied, the BAQ ignores the criterion with this parameter.
For example, in the condition StartDate > @param1, the param1 value returns null. If the Skip condition if
empty check box is selected, the BAQ does not check the criterion specified for the StartDate field.

BAQ parameters having this property enabled are not


available for use within the Calculated Field Editor. If a
query parameter is referenced in a calculated field, and
then this check box is enabled for the parameter, on
analysing or saving the query, the following error message
is presented to the user: "Expression of calculated field
<FieldName> references optional query parameter
<ParameterName>".

11. If you select the DropDown List option from the Editor Type drop-down list, the Data from field activates.
Use the options from this drop-down list to indicate the source from which the data on this list populates.
Available options:

Option Description
Custom The Values Editor displays controls for creating a new list of values. Use this functionality
Values to define the various list options this parameter will use. The field selected on the criterion
will then be evaluated against these item list options. Enter the following information:
• Value - Enter the actual value of the parameter that is sent to the query.
• Display text - Enter the text displayed for the user for this value.
• Order - Defines the sequential order of items in the list.

BAQ The Values Editor displays controls for selecting a BAQ. Enter the following information:
• Query ID - search for and select the BAQ you need.
• Display Column - select the column that displays in the lookup list.
• Value Column - defines the name of the column you want to use for the parameter
value.

62 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Option Description
User Codes The Values Editor displays the control for selecting a specific user code.
User codes are lists of custom values you define through User Defined Codes
Maintenance. When you select a user code, its list of values is compared against the
field selected on the criterion. For more information about creating user codes, review
the User Defined Codes Maintenance help topics.

12. When you finish defining the parameter, click Save.


Continue to create as many parameters as you need.

13. When you finish, exit the Query Parameters window.

14. Your new parameter displays in the Select Parameter window. Highlight the parameter you created.

15. Click Select.

16. Your parameter displays in the Filter Values column.

17. You can also create parameters through the Actions menu. To do this, from the Actions menu, select
Define Parameters.

10.2.700 63
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

BAQ Special Constant

Use this option to filter against a specific constant, like CurrentCompany, CurrentEmployeeID, First Day of the
Month, Fiscal Period, and so on. The query pulls data based on the BAQ constant you select.
To define a BAQ special constant:

1. From the Filter Value drop-down list, select the BAQ special constant option.

64 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. Click the special link.


The Select BAQ Constant window displays.

3. In the Select BAQ Constant window, select one of the constant options available from the list.

4. Click OK.

5. The selected BAQ constant displays in the Filter Values column.

To review the complete list of BAQ constants, see the


Calculated Field: BAQ Constants topic.

Current Date + Specified Number of Days

Use this option to filter query results by date intervals: days, weeks, months, and years. The result is always
evaluated against the current company date (TODAY). You can enter a positive or negative value; the value is
then added or subtracted from the current company date to calculate a different date.
To filter query results by a date interval:

1. From the Filter Value drop-down list, select the Current date + specified interval option.

10.2.700 65
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Click the + specified interval link.


The Select Date window displays.

3. Use the arrow buttons and the drop-down list to define the next BAQ execution date.

The current date is retrieved from Constants.Today. This


constant allows to set the date according to the time zone
based on the company location.

4. Click OK.

5. The interval in days you defined displays in the Filter Value column. The query pulls in records that have a
date equal to or greater than the interval you defined ahead from the current company date. In this example,
the query pulls in records that have a date equal to or greater than five days ahead from the current company
date.

66 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Select Value(s) of Field From Specified Subquery

Use this option to filter the data using values of a subquery field(s) you define.

Example Create a simple query and add a new inner subquery


with one display field. On the main subquery, create a filter
using a scalar operation, for example, <>=. In the Filter Value
field, select the inner subquery you created.

1. From the Filter Value drop-down list, select the selected value(s) or field from specified subquery option.

2. Click the word selected.


The available options:
• ALL - the condition evaluates against all values returned from a subquery.
• ANY - comparison with at least one value returned from a subquery.

3. Click the field from specified link.

4. In the Select SubQuery Field window, the list of subqueries of the InnerSubQuery or CTE type displays.

5. Select a Subquery you want to use.

6. Select a Field against which you want to filter data.

10.2.700 67
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

7. Click OK.

8. The subquery field you defined displays in the Filter Value column.

Operation Specific Filters

For certain operations, only specific filters are available for use.
The table below displays which filters become available when you select the following operations:

68 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Operation Available Filter(s)


IN operation
• specified constants list
Use this filter to specify the list of constants.
• specified list parameter
Use this filter to select an Item List parameter you want to use in the query execution.
This parameter contains a list of values supplied during query execution.
• field from specified subquery
Use this option to filter the data using a subquery field(s) you define. You can select
fields from subqueries of the InnerSubQuery or CTE type.

EXISTS operation
• a row in specified subquery
Use this option to filter the data using a subquery you define. You can select a subquery
of the InnerSubQuery or CTE type.
This operator only checks the row is returned.
If the subquery is not specified for EXISTS condition, the QueryPhrase text box displays
where (exists<not selected subquery>) statement.
When you select the EXISTS operator, in the Filter Value field, you can only select the
a row in specified subquery option.

CONTAINS
• specified contains expression
operation
Use this filter to launch the Specify Expression window. Use this form to create an
expression compatible with the CONTAINS predicate in SQL. Supported terms: AND
(&), OR (|), wildcard (*), parentheses (()). Full-text indexed column is required.

Function Call Parameters

Use the Function Call Parameters sheet to specify values for the parameters in a Table-Valued Function.

This option is only available in External Business Activity


Query.

A Table-Valued Function (TVF) is a user-defined function that returns a table. To view the list of TVFs available
for use with your product, click the Table Value Function button above the left panel on the Phrase Build
sheet.
TVFs typically require input parameter values. The Function Call Parameters sheet is populated when you add a
TVF to the grid. To be able to retrieve results from the TVF, you must define an expression in the Value field of
each listed parameter. This can be done by manually typing an expression or by using the expression editor that
displays when you click the ellipses button.

10.2.700 69
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Add Function Call Parameter Values

This procedure discusses adding parameter values when adding a Table-Valued Function (TVF) to an External
Business Activity Query (BAQ). You also can select an existing TVF on the grid and edit the parameter values.
To use the TVF function:

1. Display the TVFs available for use with your product.


On the Phrase Build sheet, click the Table-Valued Functions button above the left pane.

2. Click and drag a TVF to the grid.


On the grid, the TVF rectangle displays in red color.

3. By default, the Function Call Parameters sheet is selected.


Adding the TVF to the grid populated this sheet with a list of all parameters in the TVF.

4. Add an expression in the Value field of each listed parameter.


Enter the expression manually or click the ellipses button to open an expression editor. To help you create
expressions, the editor window contains lists of available fields, functions, and operators. You can add these
items to an expression by either double-clicking them or dragging them onto editor window's Editor field.

5. When you right click on a red TVF rectangle on the canvas, you can use the context menu to set the APPLY
operator.

70 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

The following options are available:


• CROSS APPLY - when selected, only rows from the outer table that produce the result set from the TVF
are returned.
• OUTER APPLY - when selected, either rows that produce the result set as well as those that do not,
with NULL values in the columns produced by the TVF are returned.
If the APPLY operator is set for TVF, it is used instead of the join expression. The selected operator specifies
how the TVF is invoked for each row in the result set. The result set is created by tables that precede the
TVF within the table order. If the preceding table and TVF are connected through the join, the APPLY operator
is ignored.

Example The below BAQs demonstrate usage of the


APPLY operator. Either of the below BAQs return the same
results.

SELECT * from dbo.activity OUTER APPLY dbo.p21_fn_split(…)

10.2.700 71
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Pivot SubQuery FOR Clause

You can use the PIVOT operator within a query to transform data from row-level to columnar data.
PIVOT rotates SubQuery results by turning the unique values from one column in the expression into multiple
columns in the output, and performs aggregations where they are required on any remaining column values that
are wanted in the final output.
Creation of PIVOT statements within a BAQ is available for the InnerSubQuery or CTE SubQuery types. To
activate the Pivot SubQuery FOR Clause sheet, place a SubQuery on the canvas. Right-click the SubQuery
rectangle and select PIVOT > SET PIVOT. To create an aggregation formula used within the PIVOT statement,
click the ellipsis button to invoke the Pivot Aggregate Expression Editor.

Aggregate Data Using Pivot

In this example, build a query against the OrderHed and Customer tables to determine the number of sales orders
placed by each customer throughout the selected years.
To use the PIVOT operator:

1. Create a BAQ comprised of two SubQueries. In this example, you display the aggregated data through
TopLevel SubQuery1. For the moment, leave this first SubQuery intact.

2. For the second SubQuery type, select InnerSubQuery.

72 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

You can use either the InnerSubQuery or CTE Subquery


types to aggregate data using the PIVOT operator. When
a CTE SubQuery is used, it must be placed as the first
SubQuery as it provides the base data for the rest of the
process for fetching the data.

3. In SubQuery2, place the Erp.OrderHed and Erp.Customer tables on the canvas.

10.2.700 73
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

4. For the DisplayColumn(s), select Customer_CustID and OrderHed_OrderNum columns.

74 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

5. Now create a calculated column that displays the order creation year.

6. To get the year part of the date on which a sales order was placed, use the datepart(year, expression)
function. The expression looks as follows:
datepart(year,OrderHed.OrderDate)

7. Now switch back to SubQuery1 and place SubQuery2 on the canvas.

10.2.700 75
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

8. Right-click the SubQuery2 rectangle and select PIVOT > Set PIVOT.

9. Notice the word PIVOT displays on the rectangle and the Pivot SubQuery FOR Clause sheet becomes
enabled.

76 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

10. Click the ellipsis button to invoke the Pivot Aggregate Expression Editor.

11. Use the Pivot Aggregate Expression Editor to create an aggregation formula.

10.2.700 77
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Similarly to the Calculated Field Editor, the window contains lists of available fields, functions, and operators.
You can add these items to an expression by either double-clicking them or dragging them onto the editor
window's Expression Editor field.

Users are not limited to using only the functions from the
tree view. Any function supported by the SQL Server used
by your Epicor application can be used within an
expression. In External BAQs, functions supported in the
database server where the external BAQ is executed
should be used.

12. In this example, count the number of sales orders using the below expression:
count( OrderHed_OrderNum )

13. Now specify the FOR clause of the PIVOT statement. In this example, you define which years you want to
include the pivot table output. To begin with, in the Field column, select the Calculated_OrderYear field
you created. Recall this field returns the year on which each sales order was created.

78 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

14. Now you must evaluate this field against the values you define. In the Filter Value column, select specified
constants list.

15. Click the word specified.

16. In the Enter Value List window, create the list of custom values you want to evaluate in the FOR clause.
In this example, define the years you want to analyze.

10.2.700 79
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

17. Using the TopLevel SubQuery1, select the columns you want to include in the BAQ output.
In this example, select Customer_CustID and all fields from the constants list you created in the previous
step.

80 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

For the Display Columns, do not add fields used in the


PIVOT formula or in the FOR clause. Other columns from
the source SubQuery can be selected for display.

18. Now you can test the query. The BAQ output presents aggregated numbers of orders placed by each
customer throughout the selected years.

The resulting SQL syntax looks as follows:

10.2.700 81
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Display Fields

Use the Display Fields sheet to define the columns that display on your query, how the data is sorted within the
query, and set the display names for the columns. You can also create a special calculated field that you need
within the current BAQ and create advanced data grouping expressions.
The Display Fields sheet consists of two subsheets: Column Select and Sort Order.

Column Select

Use the Column Select sheet to define the columns that display on your query.
You can also configure the display name and format for each column, create a calculation for a selected field
and define how you want to summarize data within the BAQ.

The Display Column(s) grid changes when SubQuery in focus


is of the Union, UnionAll, Intersect or Except type.

Select Display Columns - TopLevel, CTE, InnerSubQueries

When the SubQuery in focus is of the TopLevel, CTE, or InnerSubQuery type, use the below steps to select
BAQ columns.
To select columns you want to displays in BAQ results:

1. The Available Columns list displays all the tables included within the query.

82 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. To view the columns within each table, expand the table node. In this example, expand the OrderDtl table.

3. The columns available within the OrderDtl table display. Notice each column identifies the type of data it
contains - Y/N (check box), 1.2 (numeric field), abc (character field), and so on.

4. You can click the Sort Columns Alphabetically button to display the columns in alphabetical order.
Typically, you will activate this button, as it makes the fields (columns) easier to find.

5. From the Available Columns list, select the fields you want to display. You can select multiple fields by
holding Ctrl on your keyboard while selecting fields or by holding Shift to select a range of fields.

6. Click the Right Arrow button to move the selected column(s) into the Display Column(s) list. In this
example, select multiple columns from the Available Columns list and move them into the Display Column(s)
list.

7. If you want to modify the column name, enter a value in the Label field. This field displays the default name
for a field. You can edit the display name for the current field. The name you enter displays on the column
header within BAQ results.

10.2.700 83
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

8. To change the field's format mask, modify the value in the Format field.
Several single character format options are available. Use these options in various combinations to display
the results in the format you want. Available single character formats:
• X - Any Character
• N - Number or Letter
• A - Letter Only
• ! - Lower Case Letter
• 9 - Number Only
• > - Suppress Zeros

Example
• X(8)
• ->>>,>>>,>>9.9999

Updatable BAQs utilize two field format definitions. The


format you define on the Display Fields > Columns
Select sheet defines how a field value displays in a
read-only mode, for example, in a grid.
For updatable BAQs, you can define a second format in
the Updatable field editor. You launch the editor using
the Advanced Column Editor Configuration button

84 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

found on the Update > General Properties sheet. This


way, you can define different formats; for example, x(10)
for display and >>,>>9.99 for editing.

9. To group query results by specific column, select the Group By check box.

When selected, this field is listed in the Group By SQL


clause as well as in the Select clause. The Group By
statement is often used in conjunction with aggregate
queries utilizing aggregate functions, such as AVG, SUM,
or COUNT.
Outside the simple grouping mechanism you can use by
selecting this check box, the advanced grouping features
are available for use by clicking the Advanced Group By
Clause button. For more information, review the
Advanced Group By Clause topic later in this section.

10. You can remove columns by highlighting them in the Display Columns list.

11. Click the Left Arrow button, or drag and drop the column name to the left pane. The column returns to
the Available Columns list.

12. You can change the order in which the columns display across the BAQ grid. To do this, select a field in the
Display Column(s) List and use the Up and Down Arrow buttons.

10.2.700 85
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Select Columns - Set Operator Type SubQueries

When the SubQuery in focus is of the Union, UnionAll, Intersect, or Except type, use the steps below to select
BAQ columns.
In BAQ Designer, SubQueries are concatenated in the sequential order, so one or more SubQueries of the Union,
UnionAll, Except, or Intercept type can go after TopLevel, or CTE SubQueries.

When one or more SubQueries are combined using the above


set operators, their fields, specified on the Display Fields >
Columns Select sheet should conform to the following rules:
• The number and the order of the columns must be the
same in all SubQueries.
• The data types must be compatible, through implicit
conversion.
• Field aliases of the result record set are taken from the first
SubQuery.

To select columns you want to displays in BAQ results:

1. In a SubQuery of the TopLevel or CTE type, define the set of Display Column(s). In this example, SubQuery1
has five columns set for display.

2. On a SubQuery that follows, set one of the Union, UnionAll, Intersect, or Except set operators. In this
example, SubQuery2 of the Union type is used.

86 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

3. Navigate to the Display Fields > Column Select sheet.

4. At the bottom, the information on how many fields you need to select to match the number of display
columns in SubQuery1 displays.

5. You are also informed what first column is selected for display in SubQuery1 and what format it uses.

6. From the Available Columns list, select fields that meet criteria described above.

10.2.700 87
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

7. Use the Right Arrow button to move the fields into the Display Column(s) list.

8. The Alias field displays the field name of the current SubQuery's column.

Field aliases of the result record set are taken from the
first SubQuery.

9. Each SubQuery treats Group By independently. You can construct a BAQ where only one SubQuery
aggregates data, for example:
SELECT Field1, Count(field2)
From Table1
Group By
Group By Field1
UNION
SELECT FieldX, FieldY
FROM Table2
However, if a TopLevel or CTE SubQuery groups data by specific column, and a SubQuery of the Union,
UnionAll, Intersect, or Except type is set up to also aggregate data, the number of columns must match and
column types must be compatible in both the SubQueries. The grouping method used to aggregate BAQ
results can differ in each SubQuery. You can use simple group by in one SubQuery and an advanced grouping
method in another.
In the Display Column(s) grid, all fields, except for Group By, provide read-only information only.

10. The DataType field displays the type of data of the current SubQuery's column.

88 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

11. The Subquery Set Data Type displays the expected data type of the corresponding field from the group's
uppermost SubQuery, which is either the CTE or the TopLevel type.

12. When the expected data type is different from the selected one, the error indicator displays in the
corresponding Subquery Set Data Type column.

13. The Subquery Set Alias field displays the field name of the corresponding field from the uppermost
SubQuery.
In the resulting record set, field aliases are taken from the group's uppermost SubQuery, for example:
CTE Subquery 1
UNION ALL Subquery 2 <-- fields are from Subquery 1
TopLevel Subquery3 <-- new group of Subqueries
INTERSECT Subquery 4 <-- fields are from Subquery 3
In the example above, result fields are taken from Subquery3 – TopLevel Subquery.

14. The Expected Fields box at the bottom displays the following information:

Condition Information
If the number of selected columns in the current The field shows the first NEXT field from the group's
SubQuery is Less than the number of selected uppermost SubQuery, which is expected to be added.
columns in the group's uppermost SubQuery.
Also, the information on how many fields are still to be
added displays.

If the number of selected columns in the current The information on how many fields should be removed
SubQuery Exceeds the number of selected displays.
columns in the group's uppermost SubQuery.
If the number of column in both SubQueries The Check type compatibility message displays.
Equals, and Any Type difference between
When SubQuery fields have different types, the error sign
columns occurs.
displays in the Subquery Set Data Type column.
The error sign does not automatically mean the SubQuery
fails as proper conversion can still be potentially done by
the database server. The intention of the error sign is to
inform the user about the potential data type discrepancy.

When the number of columns Equals in both The Subqueries have equal number of fields message
the SubQueries, and No Type difference is displays.
found.

15. When the BAQ designer logic encounters any errors, they also display in the Analyze Message window.

10.2.700 89
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

16. In this example, the column mapping of SubQuery2 should look as follows.

Create a Calculated Field

Use the Calculator button to create user-defined columns based on a calculation of selected fields within the
query.
To help you create valid calculations, the Calculated Field Editor contains lists of fields, functions, and operators.
These default items display in the Tree View where you can navigate and find the item you need. To add an item
to calculation, either double-click it or drag and drop the selected item to the Editor pane.
To create a calculated field:

90 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

1. Navigate to the Display Fields > Column Select sheet and click the Calculation (the calculator icon)
button.

2. In the Calculated Field Editor, click New.


In this example, you want to create a BAQ that calculates orders by customer.

10.2.700 91
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

3. In the Field Name field, enter the name of the field for which you create the calculation. In this example,
enter OrderCount.

You can create calculated fields having the same name


across all BAQ SubQueries. However, you cannot create
two identical calculated fields within a SubQuery.

4. From the Data Type list, select the data type generated by this calculation.
In this example, select int.

5. The Format field automatically displays the data format for this calculated field. In this example, ->>,>>>,>>9.
If you need, you can change this value.

Refer to the Business Activity Query – Calculated


Fields topic in the application help for a complete list of
the format options available.

6. Enter the Label you want to display above this calculated field’s column header in the BAQ grid. In this
example, enter Total.

7. Now you can start building the calculation logic in the Editor pane.

Be sure to use the appropriate SQL syntax within the Editor


pane.

92 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

The Editor supports intelligent code editing, which includes invoking member lists. To invoke a list of
columns for a table, enter the name of the table followed by a dot (.) and press Ctrl + Space. Select the
column you need, it will be added to the table name. For example, ABCCode.Company.

8. Use the tree view to find and select the Functions, Operators, and BAQ Constants you will use in the
current calculated field. A function calculates a value through specified parameters. An operator is a
mathematical expression used to evaluate a function. BAQ operators and functions are consistent with SQL
naming methodology.

A complete list of available Functions, Operators, and BAQ


Constants is discussed later in this chapter.

9. First navigate to the function or operator you need. Now either double-click or drag and drop it onto your
calculation within the Editor field. In this example, use the Count function.

10. Use the Fields Tree View to place a specific field within the calculation.
You can use the Fields Tree View to:
• Select any of the current Display Fields and existing Calculated fields you want to add to the calculation.
• Pull in any fields contained within the Available tables included with the current query.
• If you have created parameters to use with the BAQ, these options display under the Parameters node.
Parameters pull in multiple values that you can then use within your calculation. Be aware that parameters
using the Skip condition if empty property cannot be used to create a calculated field and do not
display on the list of available parameters. For information about creating parameters, review the The
Query Builder > SubQuery Criteria > Specified parameter topic.
In this example, expand the OrderHed table and double-click the OrderHed.OrderNum field. The field is
added to your calculation.

10.2.700 93
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

11. If you need, use the Calculator keys to manually refine your expression.

12. When you complete the calculation, click Check Syntax to verify the calculation logic is valid.

13. Click Save to complete the calculation.


This field now uses this calculation when you run the query.
If you have created the Inner or CTE type of Subqueries, you can also use them to build a calculated
field. For example, create a simple query and add a new inner SubQuery with only one display field
returning a single value; e.g., Select count(id) from table. You can then use the subquery to create a
calculated expression, such as {SubqueryN} + 1.

14. Click Close to exit the Calculated Field Editor window.

15. Your calculated field is now added to the list of Display Column(s).

16. You can use the Up and Down Arrow buttons to reposition the calculated field as necessary.

Example One

Several calculated fields have been created by Epicor for use in the system queries. The first example is a calculated
field called OpenQty that is used in the zSVSalesOrderBacklog query.
This calculated field determines the Open Quantity of a sales order release by taking the Requested Quantity for
a sales order release, and subtracting the Job Shipped Quantity and the Stock Shipped Quantity. The field is
formatted as a number and displayed as a decimal.

94 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Example Two

The second example is a calculated field called OpenValue that is also used in the zSVSalesOrderBacklog query.
This calculation determines the value of the remaining open balance on a sales order. The calculation uses If,
Then, Else logic written in C# based on the Price Per Code on the Order Detail table. Three different Price Per
Code values are tested in the calculation: M (price per thousand) and C (price per hundred).
The field is formatted as a number and displayed as a decimal.

10.2.700 95
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Functions

The following tables display the functions you can use within the Calculated Field Editor.

Users are not limited to the functions from the Tree View. Any
function supported by the SQL Server used by your Epicor
application can be used within an expression.
For External BAQ functionality, functions supported in the
database server where the external BAQ is executed should be
used.

Aggregate
Aggregate functions perform a calculation on a set of values and return a single value. Aggregate functions are
frequently used with the GROUP BY clause of the SELECT statement.

Function Description

Avg(x) avg(expression)
Calculates the average of all values within the numeric database field.

Count(x) count(expression)
Counts the number of times the database field was counted.

Max(x) max(expression)
Calculates the maximum of all of the values of the numeric database field.

96 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Function Description

Min(x) min(expression)
Calculates the minimum of all of the values of the numeric database field.

Sum(x) sum(expression)
Calculates the total of all the values of the numeric database field.

Math
Mathematical functions execute mathematical operations usually based on input values that are provided as
arguments, and return a numeric value as the result of the operation.

Function Description

Abs(x) abs(expression)
Returns the absolute value of a numeric expression.

Sqrt(x) sqrt(expression)
Returns the square root value of a decimal expression.

Power(x, y) power(expression. exponent)


Returns the expression raised to the power of a decimal expression.

Log(x) Log(expression)
Calculates the natural (e) logarithm of a decimal expression.

Log10(x) Log10(expression)
Calculates the base-10 logarithm of a decimal expression.

(x modulo y) (top expression % bottom expression)


Returns the remainder of the top decimal expression divided by the bottom decimal
expression.

Round(x, y) round(expression , precision )


Rounds a decimal expression to a specified number of places after the decimal
point.

Truncate(x, y) round (expression, precision, 1)


Truncates a decimal expression to a specified number of decimal places, returning
a decimal value.

String
String functions manipulate a string or query information about a string.

10.2.700 97
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Function Description

Asc(x) Asc(expression)
Converts a character expression representing a single character into the
corresponding ASCII value, returned as an integer.

Char(x) Char(expression)
Converts an ASCII integer code to its corresponding character value.

Len(x) Len(expression)
Returns the number of characters in an expression

Left-Trim(x) ltrim(expression)
Removes leading white space from a string expression.

Trim(x) ltrim(rtrim(expression))
Removes leading and trailing white space from a string expression.

Right-Trim(x) trim(expression)
Removes trailing white space from a string expression.

Substitute(x[, y, ...]) Substitute(base-string [, arg ] ...)


Returns a character string that is made up of a base string plus the substitution of
arguments in the string. An argument is referenced in string by &num identifier
where num is 1-based argument index in argument list.

Substring(x,y,z) substring(expression ,position ,length)


Extracts a portion from a string expression.

Replace(x,y,z) Replace(expression ,search ,replace)


Performs a search and replace function on a string expression.

Upper(x) upper(expression)
Converts any lowercase characters in a string expression to upper-case characters.

lower(x) lower(expression )
Converts any upper-case characters in a string expression to lowercase characters.

Date
There are a number of date functions available in the Epicor ERP application.

Function Description

Date(year, month, day) convert(date, expression, 112)


Converts a string expression in 'yyyymmdd' format into date value.

98 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Function Description

Year(x) datepart(year, expression)


Evaluates a date expression and returns the year value of that date, including the
century, as an integer value.

Month(x) datepart(month, expression)


Evaluates a date expression and returns a month integer value from 1 to 12.

Day(x) datepart(day, expression)


Evaluates a date expression and returns a day of the month as an integer value from
1 to 31.

WeekDay(x) datepart(weekday, expression)


Evaluates a date expression and returns the day of the week as an integer value from
1 (Sunday) to 7 (Saturday) for that date.

Add-interval(x,y,z) dateadd(interval-unit, interval-amount, expression)


Adds a date interval to, or subtracts a date interval from, specified expression.
Expression should be of date type.
To subtract, enter interval-amount as a negative value.
Interval-unit is one of the following words: year, month, week, day.

Conversion
Conversion functions transform an expression of one data type to another.

Function Description

DateToString(x) convert(varchar, expression, date-format-index)


Converts a date value into a character value using a date format index. Default
101 results in 'mm/dd/yyyy' string.

TimeToString(x) convert(varchar, expression, time-format-index)


Converts an integer value into a character value using a time format index. Default
108 results 'hh:mi:ss' string.

DecimalToString(x) convert(varchar, expression)


Converts a decimal value into a character value.

IntToString(x) convert(varchar, expression)


Converts an integer value into a character value.

Integer(x) convert(int, expression)


Converts an expression of any data type to a value of integer data type.

Decimal(x) convert(decimal, expression)

10.2.700 99
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Function Description
Converts an expression of any data type to a decimal value.

Date(mm,dd,yyyy) convert(datetime, convert(char, _year_*10000 + _month_*100 + _day_), 112)


Converts a set of month, day, and year values into a date value. Replace _year_,
_month_ and _day_ placeholders with references to fields of integer type or constant
values.

StringToDate("x") convert(date, expression, date-format-index)


Converts a string date representation (expression) into a date value based on date
format index. For example, if the input string contains a date like '07/21/2012',
then date format index should be set to 101.

IntToDateTime(x) convert(datetime, expression)


Converts an integer expression, into a date value. The expression is treated as
number of days after 01/01/1900.

Logical(x) convert(tinyint, expression)


Converts any data type into the logical data type.

Ranges
Functions in this category return the position, string entry, or number of elements from the list, based on the
expression.

Function Description
Lookup(x,y)
[Ice].lookup(expression, list)
Returns an integer value giving the position of an expression in a list. Returns a 0
if the expression is not in the list.

Lookup(x,y,z)
[Ice].lookup(expression, list, separator )
Returns an integer value giving the position of an expression in a list. Returns a 0
if the expression is not in the list.

Entry(x,y)
[Ice].entry(expression, list, ',')
Returns a character string entry from a list based on an integer position.

Entry(x,y,z)
[Ice].entry(expression, list, separator )
Returns a character string entry from a list based on an integer position.

Num-entries(x)
[Ice].num_entries(list)
Returns the number of elements in a list of character strings as an integer value.

Num-entries(x,y)
[Ice].num_entries(list, separator)
Returns the number of elements in a list of character strings as an integer value.

100 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Financial
Functions in this category return either the fiscal year or fiscal period for the supplied date based on the fiscal
calendar.

Function Description
FiscalYear(x)
FiscalYear(company, date)
Returns fiscal year for passed date according to fiscal calendar in the database.

FiscalPeriod(x)
FiscalPeriod(company, date)
Returns fiscal period for passed date according to fiscal calendar records in the
database.

Operators

An operator is a mathematical expression either used with a single function or used to process two or more
functions.

Section Tree View Editor View Expression


Arithmetic Add (x + y) (+) Addition operator.
Adds two numeric expressions. Adds days to date
(date + days).

Arithmetic Divide (x / y ) (/) Division operator.


Divides one numeric expression by another numeric
expression, producing a decimal result.

Arithmetic Modulo (x modulo y) (x modulo y) Modulo operator.


Determines the remainder after division.

Arithmetic Multiply (x * y) (*) Multiplication operator.


Multiplies two numeric expressions.

Arithmetic Negate ( - x) (-) Unary negative operator.


Reverses the sign of a numeric expression.

Arithmetic Subtract (x - y) (-) Subtraction operator.


Subtracts one numeric expression from another
numeric expression.

Boolean Equal (x = y) (=) Equal operator.


Returns TRUE if two expressions are equal.

Boolean And (x and y) and And operator.


Returns TRUE if each logical expression is TRUE.

Boolean Or (x or y) or Or operator.
Returns TRUE if either of the two logical expressions
is TRUE.

10.2.700 101
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Section Tree View Editor View Expression


Boolean Not (Not x) not Not operator.
Returns TRUE if an expression is false and FALSE if an
expression is true.

Comparison Equal (x = y) = Equal operator.


Returns TRUE if two expressions are equal.

Comparison Greater Than or Equal >= Greater Than or Equal operator.


(x >= y)
Returns TRUE if the first of the two expressions is
greater than or equal to the second expression.

Comparison Greater Than (x > y) > Greater Than operator.


Returns TRUE if the first of the two expressions is
greater than the second expression.

Comparison Less Than or Equal <= Less Than or Equal operator.


(x<=y)
Returns TRUE if the first of the two expressions is less
than or equal to the second expression.

Comparison Less Than (x < y) < Less Than operator.


Returns TRUE if the first of the two expressions is less
than the second expression.

Comparison Not Equal (x <> y) <> Not Equal operator.


Compares two expressions and returns TRUE if they
are not equal.

Condition If x Then y Else z (case when If-Then-Else condition.


then else end)
Evaluates and returns one of the two expressions,
depending on the value of a specified condition.

Condition Case x When y Then case Evaluates a list of conditions and returns one of
z Else k end multiple possible result expressions.
when then
when then
else
end

Other Comment /* */ Comment characters.


Allows adding explanatory text to a procedure
between the /* and */ characters.

Other Begins Begins Begins operator.


Tests a character expression to see if that expression
begins with a second character expression.

Other Matches “* *” Matches operator.


Compares a character expression to a pattern and
evaluates to TRUE if the expression satisfies the pattern
criteria.

102 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

BAQ Constants

The following table displays the BAQ constants you can use within the Calculated Field Editor.

Anytime the server code resolves Today or Now the method


returns the value based on the company time zone setting. If
not set, it will use the app server time zone.

When a BAQ is executed, Today and other dependent


constants, as well as the current date value for current
date-based condition, are calculated one time per query run,
and their values are based on company time zone of the
company from which the BAQ is executed. For Cross-Company
BAQ, it means the value of Today and dependent constants is
calculated based on company time zone of user’s current
company; it is not recalculated for each company from which
the data is retrieved by Cross-Company BAQ.

BAQ Constant Description


CompanyName The Company Name of the company the user is logged into.
CountryCode The Country Code of the company the user is logged into.
CountryGroupCode The Country of Origin Code of the company the user is logged into.
CurComp The Company ID of the company the user is logged into.

This constant is used for


compatibility with queries
written in Epicor 9 after
they were migrated or
imported into Epicor ERP
Version 10.
When building a new BAQ,
use the CurrentCompany
constant.

CurCompName The Company Name of the company the user is logged into.

This constant is used for


compatibility with queries
written in Epicor 9 after
they were migrated or
imported into Epicor ERP
Version 10.
When building a new BAQ,
use the
CurrentCompanyName
constant.

10.2.700 103
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

BAQ Constant Description


CurLangID The language ID of the language being used in the Main Menu of the current
session.

This constant is used for


compatibility with queries
written in Epicor 9 after
they were migrated or
imported into Epicor ERP
Version 10.
When building a new BAQ,
use the CurrentLanguageID
constant.

CurrentCompany The Company ID of the company the user is logged into.


CurrentCompanyName The Company Name of the company the user is logged into.
CurrentEmployeeID The Employee ID linked to the user of the current session.
CurrentLanguageID The language ID of the language being used in the Main Menu of the current
session.
CurrentPlant The Plant ID of the company the user is logged into.
CurrentTime The current system time. Returns seconds elapsed since midnight.
CurrentUserID The User ID of the user of the current session.
Day The day of month of the Current Date.
DayOfWeek Returns the current day number of the current week.
DefUM The default Unit of Measure of the current site.

This constant is used for


compatibility with queries
written in Epicor 9 after
they were migrated or
imported into Epicor ERP
Version 10.
When building a new BAQ,
use the DefaultUM
constant.

DefaultUM The default Unit of Measure of the current site.


DesignMode Indicates the special developer mode for Epicor developers is used.
EmployeeID The employee id linked to the user of the current session.
FirstDayOfMonth The first day of the current month of the Current Date.
FirstDayOfNextMonth The first day of the next month of the Current Date.
FirstDayOfNextWeek The first day of the next week of the Current Date.
FirstDayOfPrevMonth The first day of the previous month of the Current Date.
FirstDayOfPrevWeek The first day of the previous week of the Current Date.
FirstDayOfWeek The first day of this week of the Current Date.

104 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

BAQ Constant Description


GlobalSecurityManager The current session user is a Global Company Security Manager.
LanguageID The language ID of the language being used in the Main Menu of the current
session.

This constant is used for


compatibility with queries
written in Epicor 9 after
they were migrated or
imported into Epicor ERP
Version 10.
When building a new BAQ,
use the CurrentLanguageID
constant.

LastDayOfMonth The last day of the month of the Current Date.


LastDayOfNextMonth The last day of the next month of the Current Date.
LastDayOfNextWeek The last day of the next week of the Current Date.
LastDayOfPrevMonth The last day of the previous month of the Current Date.
LastDayOfPrevWeek The last day of the previous week of the Current Date.
LastDayOfWeek The last day of the current week of the Current Date.
MobileConnect Indicates the Mobile Connect mode is running.
Month The current month of the Current Date.
PlantID The Plant ID of the company the user is logged into.

This constant is used for


compatibility with queries
written in Epicor 9 after
they were migrated or
imported into Epicor ERP
Version 10.
When building a new BAQ,
use the CurrentPlantID
constant.

ProductCode The application product code. The available options include "EX" for Express,
"ST" for Standard, "EN" for Enterprise and "Epicor" for any other product
line.
ProductName The application product name. The available options include Express, Standard,
Enterprise and Epicor.
SecurityManager The current session user is a Security Manager.
Today The Current Date.
Tomorrow The next day after the Current Date.
VersionString Displays the ICE framework assemblies version of the current product. For
example, 3.0.5.0.
Week The current week of the Current Date.

10.2.700 105
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

BAQ Constant Description


WorkstationDescription The description of the Workstation ID specified in Workstation Maintenance.
WorkstationID The ID of the workstation specified in Workstation Maintenance.
Year The current year of the Current Date.
Yesterday The previous day of the Current Date.

Field Attributes Editor

Use the Display Field Attributes Editor to add, edit or remove attributes of the fields that display on your
query.
Each DB field has a set of properties such as format or label. Using the Display Field Attributes Editor, you can
modify the existing properties and create custom ones for the current BAQ. When the BAQ runs, it uses the
field attributes you define.
To access the Editor, on the Display Fields > Column Select sheet, click the Field Attributes Editor button.
In the Editor window, all columns you selected for display are presented in the Tree View on the left. When you
select a field, the grid displays all attributes for that field. These can be:
• Default attributes specified in the system. You can accept the default state or modify these attributes as
needed.
• Custom field attributes you define for the query.

The default attributes do not display for:


• Calculated Fields
• Fields from Inner SubQueries
• External BAQs

Modify Field Properties

This example demonstrates how you can use the Display Field Attributes Editor to modify field properties.

1. First, on the Display Fields > Column Select sheet, identify columns you want to display on the BAQ.

106 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. Notice there are two field properties you can modify directly on the Column Select grid - Label and Format.
In this example, accept the default values on this grid.

3. Click the Field Attributes Editor button.

4. In the Editor, all the columns you selected for display in the Tree View.

10.2.700 107
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

5. In the grid, default (system) attributes of the currently selected field display. The attributes in the default
state are grayed out and cannot be removed from the grid.

The default attributes do not display for:


• Calculated Fields
• Fields from Inner SubQueries
• External BAQs

6. In this example, you override the default Caption and Format properties by modifying the corresponding
entries in Value column. Notice after property is changed, the corresponding Override check box becomes
selected, indicating the default value has changed for the current BAQ.

108 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

If you need to revert the attribute to its original state, you delete the overridden attribute and exit the
Editor window. When you launch the Editor again, the attribute is again set to its original state and the
corresponding check box becomes clear again.

7. Apart from modifying default field attributes, you can create custom ones. To do so, click New.

10.2.700 109
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

8. The new Attribute record is created. From the list, you can select one of the predefined attribute types, or,
you can enter the name of your choice.
Custom attribute names are not case sensitive. Be sure to enter unique names when defining custom
attributes for a SubQuery. Attributes are specific to each table and SubQuery. For example, if your BAQ is
made of two SubQueries referencing the same DB table, different field attributes can be specified for each
SubQuery.
For more info on the list of predefined attributes, review the Extended Property Maintenance topics within
the Application Help.

9. In this example, you create a custom attribute for a user-defined field. Similarly, you can create another
custom attributes you need to use within the current BAQ.

110 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

10. Click Save.

Be aware you can no longer change the custom attribute's


name after you save it. If you need to use another name
for your attribute, delete the record and recreate it.

11. Exit the Editor. Notice the Label (Caption) and Format properties you modified for the Customer ID column
display on the grid.

10.2.700 111
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Advanced Group By Clause Editor

Use the Advanced Group By Clause Editor to build advanced data summarizing expressions.
In BAQ Designer, you can use the following data grouping options:
• Simple Group By mechanism - You can group the query results by specific column(s) by selecting the Group
By check box on the Column Select sheet. This feature, however, has a few limitations - it is only available
for fields selected as Display columns and within the resulting Group By clause, these fields always appear in
the same order as in the Select statement.
• Advanced Summarizing Options - By accessing the Advanced Group By Clause Editor, you can create more
complex summarizing expressions, such as:
• Group BAQ results by fields different from those defined in the SELECT statement.
• Define custom order of columns in a GROUP BY clause.
• Use special GROUP BY operators, such as ROLLUP, CUBE, and GROUPING SETS. These operators are
extensions of the GROUP BY clause. They can generate the same result set as when you use UNION ALL
to combine single grouping queries; however, using one of the GROUP BY operators is usually more
efficient.

Create Group By Expression

112 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

In this example, assume you want to analyze on hand-quantities of specific parts located within several warehouses.
Learn how to use the available Group By operators to get the expected results.

1. Create a new BAQ and place the PartBin table on the canvas.

2. In this example, a filter on the table is applied to only retrieve records for parts 1032x073 and 1032KNUT.

3. For the Display Column(s), select the PartBin_WarehouseCode and PartBin__PartNum columns.

10.2.700 113
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

4. Also, create a calculated field that summarizes on-hand quantities of selected parts.
Use the following calculation:
sum( PartBin.OnhandQty )

5. Now access the Advanced Group By Clause Editor by clicking the button.
Similar to the Calculated Field Editor, the window contains lists of available fields, functions, and operators.
You can add these items to an expression by either double-clicking them or dragging and dropping them
onto the editor window's Expression Editor field.
For the complete list of predefined functions, operators, and BAQ constants, see the Application Help topics.

6. Click Add Row to create a new expression.

114 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

7. At the top of the Functions node, notice the Group By category displays.
The ROLLUP, CUBE, and GROUPING SETS operators found in this category represent advanced aggregation
extensions of the GROUP BY clause.

Function Description
ROLLUP
The ROLLUP operator is useful in generating reports that contain subtotals and totals. It
generates a result set that shows aggregates for a hierarchy of values in the selected
columns.
As a result, one row with a subtotal is generated for each unique combination of values
of (a, b, c) , (a, b) , and (a). A grand total row is also calculated.

CUBE
Generates simple GROUP BY aggregate rows, the ROLLUP super-aggregate rows, and
cross-tabulation rows. CUBE outputs a grouping for all permutations of expressions in the
<composite element list>.
As a result, one row is produced for each unique combination of values of (a, b, c) , (a,
b) , (a, c) , (b, c) , (a), (b), and (c) with a subtotal for each row and a grand total row.
GROUPING
Specifies multiple groupings of data in one query. Only the specified groups are aggregated
SETS
instead of the full set of aggregations that are generated by CUBE or ROLLUP. The results
are the equivalent of UNION ALL of the specified groups. GROUPING SETS can contain a
single element or a list of elements. GROUPING SETS can specify groupings equivalent to
those returned by ROLLUP or CUBE. The <grouping set item list> can contain ROLLUP or
CUBE.

For more information on the above operators, review the available Microsoft® documentation, for example:
• http://technet.microsoft.com/en-us/library/bb522495(v=sql.105).aspx
• http://technet.microsoft.com/en-us/library/ms177673.aspx
• http://blogs.msdn.com/b/craigfr/archive/2007/10/11/grouping-sets-in-sql-server-2008.aspx

10.2.700 115
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

8. In this example, double-click the ROLLUP function. Place you cursor in the middle of empty brackets. For
Group By expression fields, double-click both the PartBin.WarehouseCode and PartBin.PartNum fields,
separated by a comma.
The Group By expression should now read:
ROLLUP( PartBin.WarehouseCode, PartBin.PartNum )

9. Click OK to exit the editor.

10. Click the Test button to retrieve the BAQ results.

11. Notice the total values are summarized by each warehouse and part (aggregate rows), sub-totals rows for
each warehouse with the grand total value displaying at the bottom.

12. Notice how BAQ results change when GROUPPING SETS function is used to construct the GROUP BY clause.
GROUPING SETS( PartBin.WarehouseCode, PartBin.PartNum )

116 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

BAQ results are now grouped by sets of parts and warehouses.

13. Notice how BAQ results change when CUBE function is used to construct the GROUP BY clause.
CUBE( PartBin.WarehouseCode, PartBin.PartNum )

10.2.700 117
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

CUBE outputs a grouping for all permutations of expressions in the composite element list.
The Advanced Data Aggregation case study found at the end of this chapter shows more complex
scenario on how to aggregate results from multiple tables.

Sort Order

The Sort Order sheet is where you define how the data results display when the query runs. You can sort your
data through any combination of columns. You can also select whether the data displays in ascending or
descending order.

You can only add sort fields for the main query or for the
SubQueries using the TOP clause. Otherwise, the BAQ fails on
execution.

1. In the Available Columns section, highlight the column by which you want to sort data.
You can also use keyboard combinations to select multiple fields. You can click one field and then press
and hold the Shift key to select a range of fields. You can also press and hold the Ctrl key and select a
specific group of fields.

The data in this query is now sorted first by Company, then by Sales Order Number, and lastly by Sales Order
Line Number.

118 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. Click the Right Arrow button or drag and drop the column names to the right pane.
The columns are added to the Sort By field.

3. If you need, use the Up and Down Arrow buttons to change the sorting order.

10.2.700 119
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

4. To control if data should be sorted in ascending or descending order, double-click the selected column. The
direction is reflected on the small triangle that displays next to the selected column.

5. To remove a column from the sort list, highlight it and click the Left Arrow button.

6. Once finished, click Save.

7. When the BAQ executes, the results are sorted.

120 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

SubQuery Options

Use the SubQuery Options sheet to define subquery parameters.


A subquery is a query that is nested inside the SELECT statement, or inside another subquery. A subquery can
be used anywhere an expression is allowed. Each Business Activity Query can contain one main subquery, where
Type=TopLevel, and several subqueries of different types to indicate how they correlate with each other.
Subqueries give different advantages for query design, including:
• Support of widely used query criteria, such as IN ({inner subquery}) or EXISTS ({inner subquery})
• Using common table expressions (CTE), including CTE with recursion and UNION ALL, for querying hierarchical
data
• Using CTE and inner subquery in the FROM clause and joins
• Using set operations, like UNION, UNION ALL, EXCEPT, and INTERCEPT

The above set operators are the methods of combining


several result sets. You can create one TopLevel subquery
and combine its result with some other subqueries of this
subquery type, using these SQL standard keywords.

By default, a simple query contains only one subquery with the following attributes:

Field Value
Name SubQuery1
Type TopLevel
Results Row Set All

When you add new subqueries to the BAQ, all subqueries, excluding Inner subqueries, are ordered by the Seq
field. Each query text is generated and these texts are concatenated. No assumption of the subquery order is
made.

10.2.700 121
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Define Main SubQuery

When you create a new BAQ, the main subquery named SubQuery1 is created by default.
To set up the main subquery:

1. Create a new query and specify its main parameters on the General sheet.

2. Navigate to the Query Builder > SubQuery Options sheet.

3. In the Name field, enter the name of the main subquery. In this example, the BAQ returns the list of quotes
from the QuoteHed table. To identify the subquery, you can enter this value in this field.

4. In the Type field, verify TopLevel displays.

Each BAQ can contain only one main TopLevel subquery.

5. In the Result Set Rows field, select how data displays in the subquery results set.
The table below lists the available options:

Keyword Description
All Default value; the SELECT ALL returns all data without restriction.
Distinct SELECT DISTINCT specifies that only unique rows can display in the result set.

122 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Keyword Description
Top SELECT TOP specifies the number of rows or percent of rows to return.
You can specify either the number or percent of rows the result set displays.
WITH TIES specifies that the query result set includes any additional rows that match
the values in the ORDER BY column or columns in the last row returned. This may
cause more rows to be returned. TOP...WITH TIES can be specified only in SELECT
statements, and only if the ORDER BY clause is specified.

DistinctTop SELECT DISTINCT TOP corresponds to using DISTINCT and TOP clauses simultaneously.
The query results set contains top unique rows.

6. When the Top or DistinctTop keyword is selected in the Result Set Rows field, the Top Clause pane becomes
enabled. Also notice the Order By OFFSET - FETCH Clause pane is now disabled.

TOP as well as DISTINCT TOP cannot be combined with


OFFSET and FETCH in the same query expression.

7. In the Rows Number field, enter the number of rows or percent the query results set should return. You
can, for example, have the query return the list of 50 latest quotes for a review.

8. If you select In Percent, the top percent of rows specified in the Rows Number field is returned in the results
set.

9. If you select With Ties, the query result set includes any additional rows that match the values in the ORDER
BY column or columns in the last row returned.

Only select this option in SELECT statements and only if


the ORDER BY clause is specified.

10. The Offset and Fetch fields provide you with an option to fetch only a window or page of results from the
result set. You can use the Offset field to enter the number of rows to skip, before starting to return rows
from the query expression.

10.2.700 123
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

11. The value you enter in the Fetch field specifies the number of rows to return after processing the OFFSET
clause.

The OFFSET/FETCH rowcount expression can be any


arithmetic, constant, or parameter expression that returns
an integer value.

The following limitations exist:


• Using OFFSET/FETCH requires MS SQL Server 2012 or later.
• ORDER BY is mandatory to use the OFFSET and FETCH clause.
• OFFSET is mandatory with FETCH. You can never use ORDER BY … FETCH.
• OFFSET and FETCH cannot be combined with TOP/DISTINCT TOP in the same query expression.

Example You can construct a BAQ against the table of


all employees. By entering 5 in the Offset field, the first
five rows from the sorted result set are skipped. By
entering 10 in the Fetch field, the BAQ returns next 10
rows from the employees table. The resulting query syntax
looks as follows:

select
[EmpBasic].[EmpID] as [EmpBasic_EmpID],
[EmpBasic].[FirstName] as [EmpBasic_FirstName],
[EmpBasic].[LastName] as [EmpBasic_LastName]
from Erp.EmpBasic as EmpBasic
order by EmpBasic.EmpID OFFSET 5 ROWS FETCH NEXT 10 ROWS ONLY

Create SubQuery

When you construct a query, you can add various types of subqueries and indicate how they correlate with each
other.
To define a subquery:

124 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

1. Navigate to the Query Builder > SubQuery Options sheet.

2. On the Active SubQuery toolbar, click New SubQuery.

3. In the Name field, enter the subquery name.


This subquery retrieves the list of orders from the OrderHed table. To identify the subquery, you can enter
this value in this field.

4. In the Type field, select the type of correlation between subqueries. By default, the subquery is set to the
InnerSubQuery type. In this example, combine the current subquery's results with the TopLevel subquery
using the Union operator.
The table below lists all available options you can use for the subquery:

Type Description
TopLevel Default value for a simple query; each BAQ can contain one main TopLevel subquery.
Union Selects related information from two tables, much like JOIN. However, when using
UNION, all selected columns need to be of the same data type. With UNION, only distinct
values are selected.
UnionAll Equal to UNION, except that UNION ALL selects all values.
The difference between UNION and UNION ALL is that UNION ALL does not eliminate
duplicate rows; instead it just pulls all rows from all tables fitting your query specifics
and combines them into a table.

10.2.700 125
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Type Description
Intersect Returns the results of two or more selected queries. However, it only returns the rows
selected by all queries. If a record exists in one query and not in the other, it is omitted
from the results.
Except Returns any distinct values from the query to the left of the EXCEPT operand that are
not also returned from the right query.
CTE A common table expression (CTE) can be thought of as a temporary result set defined
within the execution scope of a single SELECT (or may serve as a subquery, instead of
SELECT).
Common use of CTE is to query hierarchical data. Returning hierarchical data is common
use of recursive queries, for example: displaying employees in an organizational chart,
or data in a bill of materials scenario in which a parent product has one or more
components and those components may, in turn, have subcomponents or may be
components of other parents.

InnerSubQuery Usually added to the WHERE clause of the SQL statement as a nested query inside another
query. Most of the time, a subquery is used when you know how to search for a value
using the SELECT statement but do not know the exact value.

When connecting subqueries using UNION, UNION ALL,


EXCEPT, and INTERSECT, it is necessary to define the same
number and type of display fields in both the subqueries.
Field labels may be different. If this condition is not met,
the BAQ fails on execution. For more information, review
the Select Columns - Set Operator Type SubQueries
topic discussed before.

5. In the Result Set Rows field, select how data displays in the subquery results set.
For more information on the Type and Result Set Rows options, review the previous Define Main SubQuery
topic.

6. Navigate to the Query Builder > Phrase Build sheet.

126 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

7. Add table(s) you need to construct the subquery. Use the techniques defined in the Phrase Build topics to
create the BAQ.

Example You can, for example, create links between


tables and subqueries, use various operators, reference
subqueries when filtering data or creating calculated fields,
and so on.

8. To switch between subqueries, use the Active SubQuery navigational toolbar.

9. When complete, click Save.

10. On the General sheet, in the Query Phrase section, view the resulting SQL statement.

11. In this example, notice the TopLevel subquery displays at the top of the SQL statement, followed by the
second subquery of the Union type.

10.2.700 127
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

12. Navigate to the Analyze sheet and verify the syntax is OK and the BAQ returns expected data.

The Case Studies section at the end of the chapter


provides several step-by-step examples on how to create
BAQs with multiple SubQueries.

128 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Move Item(s) to SubQuery


When designing a BAQ, you can transfer tables and SubQueries placed on the designer canvas between SubQueries.
You can either move the selected item(s) to another SubQuery or create a new one.

1. On the Query Builder > Phrase Build sheet designer canvas, select item(s) you want to move to another
SubQuery.
To select multiple items, hold Ctrl and select items of your choice.

You can move tables that have relations between them.


However, the move operation is not supported when
relations are defined between selected and unselected
items.

10.2.700 129
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Right-click any of the selected items to open the context menu and select Move to SubQuery.

3. On the Move Item(s) To SubQuery window, you can do the following:

a. Move the selected item(s) to another SubQuery (other than current).


To do so, select the Move To Existing SubQuery option and highlight the SubQuery where you want
to move the selected item(s).

b. Move the selected item(s) to a new SubQuery.


To do so, select the Create New SubQuery option and enter the following information:
• In the Name field, accept the default SubQuery name or enter the name of your choice.
• From the Type drop-down list, select what type of SubQuery you want to create. The default option
is InnerSubQuery.

130 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

4. Click OK.
The BAQ Designer switches to the SubQuery you selected. The tables and SubQueries you selected for
transfer display on the canvas, including their relations.

The move operation changes the SubQuery identifier for


all tables, relations and relation fields, selected fields, sort
fields, criteria fields and function call parameters.
However, this process does not parse any expressions like
Calculated fields, advanced GroupBy expressions or
expressions on the right side of criteria. If this is the case,
manual adjustment could be required after the move
operation is performed.

SubQuery List

Use the SubQuery List sheet to view and manage all subqueries you create within the BAQ.
In the grid, all subqueries you create are ordered by the sequence number. Except inner subqueries, the sequence
number defines how partial query texts are concatenated to build the final SQL statement. If a subquery contains
reference to an inner subquery, the text of the inner subquery is generated on demand and inserted where
required.
On the subquery panel, you have the ability to create and remove subqueries, change their sequence value, and
view how data displays in the results set.
To manage subqueries:

1. Navigate to the Query Builder > SubQuery List sheet.

The parameters of subqueries in the grid display in the


read-only mode. For more information on each of these
fields, review the SubQuery Options topic.

2. To create a new subquery, click the New SubQuery button. You must then define its main parameters on
the SubQuery Options list.

3. To remove the subquery from the BAQ, click Remove SubQuery.

10.2.700 131
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

4. To move the selected subquery up in the list, click the Up Arrow button.

5. To move the selected subquery down in the list, click the Down Arrow button.

6. You can use parentheses to group SubQueries and create the following query constructions:
• Addition of Union SubQueries to InnerSubQueries.
• Grouping of Set-Operator SubQueries.
Note when a group for an inner SubQuery is created, the field mapping is shown using this first inner
SubQuery:
Top
Inner <- some separate inner SubQuery
Union <- fields are selected according to the Top field list
Top
(Inner <- groups with next Union
Union)<- Fields correspond to Inner SubQuery

7. Once finished, click Save to refresh the BAQ definition.

Updatable Business Activity Query

Besides using BAQs to display custom views of data, you can also create updatable business activity queries.
These updatable queries have business object methods connected to them, so users can create and edit records
- updating the database through the query itself.
You create updatable BAQs in a similar way to display only BAQs by adding tables, filter criteria, display columns,
and so on. You have some extra steps, however, as you need to define which table contains the updatable fields
and also make sure the business object methods are correctly linked to the updatable fields.
Just like a read-only BAQ, you can link as many tables in relationships as you need. Multiple tables accessed by
each BAQ can be updatable, however, so you can construct updatable BAQs that contain as many updatable
fields as you need. The one limitation is that only one business object involved in each process can contain an
updatable BAQ, but because multiple updatable table combinations are possible, you should be able to create
an updatable BAQ that matches your needs.
Epicor ERP supports connection to the read-only copy of the database, if available, to reduce the workload on
the live database. For example, the Always On availability groups feature of the SQL server allows to configure
a primary read-write database and its several read-only replicas. If necessary, the Use Primary Database execution
setting in the BAQ Designer allows users to ensure that a particular BAQ is executed against a primary read-write
database. Updatable BAQs require assured access to the most up-to-the-second data. Therefore, Updatable BAQs
are always executed against a primary database.
If you are interested in learning more about how SQL Server can be configured to support the read-only
database capability, please refer to the Microsoft® documentation for information on the Always On availability
groups feature of the SQL Server®.

You can place updatable BAQs on smart client dashboards. After you add these dashboards to the Main Menu,
they become custom data entry programs users can launch to both review current data and make any updates
they need. Optionally, you can also use updatable BAQs on mobile device dashboards. Once you create a mobile
dashboard that contains an updatable BAQ, users run this custom entry program on an iPhone, Blackberry, or
other supported mobile device. Users enter data through the mobile device, directly updating the database

132 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

wherever they may be. To build mobile device dashboards, you must purchase a mobile device dashboard license
from Epicor.

To create updatable BAQs, you must have BAQ Advanced


User rights granted in User Account Maintenance. Users having
BPM Advanced User rights are allowed to use the entire BPM
toolset, when designing uBAQ method directive.
Be aware that Advanced BPM User rights are not available to
Epicor Cloud ERP - Multi Tenant users because free-form C#
code could be a security risk for access of data outside of the
tenancy. Most common business requirements for reading and
writing data within the tenancy restrictions can be
accomplished by using the built-in interface.
Furthermore, in order to use BPM Update Processing via
UpdateExt and Advanced BPM Processing (design,
import/export and copy), the BusinessProcessManagement
module must be licensed in your Epicor ERP installation. The
BPM license is not required for database updates through Epicor
Service Connect workflows.
For more information, contact your system administrator.

User Rights

Although you can access most BAQ functionality, to create and modify updatable BAQs, you must have both
advanced BAQ and advanced BPM rights. Because the updatable business activity queries run through BPM
methods, you need to use these advanced features. You activate advanced BAQ and BPM rights on your account
within User Account Maintenance.
To assign updatable BAQ rights to a user account:
Menu Path: System Setup > Security Maintenance > User Account Security Maintenance

1. Use the Detail sheet to find and select the user record you need.

10.2.700 133
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Navigate to the Options sheet.

134 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

3. Select the BPM Advanced User check box.

4. Select the BAQ Advanced User check box.

5. Click Save on the Standard toolbar.

This user account can now access the updatable BAQ features. The next time you log into the application through
this user account, you can use the Update sheets within the Business Activity Query Designer.

General Properties

Use the controls on the General Properties sheet to indicate how users can enter and edit records through the
updatable BAQ. You also indicate which fields are available for data entry.

Updatable Query Settings

Define the main options for your updatable query.


To define the main updatable BAQ properties:

1. Create a new BAQ. To activate the sheets under the Update tab, one the General sheet, select the
Updatable check box.
In this example, an updatable BAQ using the Customer table is used.

When you select this option, the Use Primary Database


option in the Execution Settings is selected automatically
and displays in read-only mode. Updatable BAQs require
assured access to the most up-to-the-second data and
therefore must always be run against a primary read-write
database. The Use Primary Database execution settings
ensures that the Epicor ERP application requests a
connection to a primary database and not a read-only
replica, when the latter is available. For example, read-only

10.2.700 135
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

copies of the primary database may be configured on SQL


servers with advanced availability settings.
If you are interested in learning more about how SQL
Server can be configured to support the read-only
database capability, please refer to the Microsoft®
documentation for information on the Always On
availability groups feature of the SQL Server®.

2. Define the main options for your updatable query. Navigate to the Update > General Properties sheet.

3. Select the Allow New Record check box to indicate users can add new records through this updatable
BAQ.
When this check box is clear, users can only update existing records.

4. If you wish, specify the Label for AddNew value. This value defines what appears on the drop-down menu
next to the New button on the Standard toolbar.
The text you enter here displays as a node on this drop-down menu. Make sure it identifies the purpose of
the new record the users create through this updatable BAQ.

5. Select the Allow Multiple Row Update check box to give users the ability to make changes to two or
more rows in a table at the same time.
If this check box is clear, users are required to save one changed row before they can work on another
row.

136 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

6. To make new actions available for use within an updatable BAQ directive, you need to create action
placeholders by clicking the Define Custom Actions button.

7. The Define Custom Action window displays.

8. To create a new action, click the New button.

9. Enter an ActionID. This identifier defines the custom action within the updatable BAQ.

10. Enter an ActionLabel. This value defines how the action displays on buttons within the dashboard.

11. If you wish to remove a custom action, click the Delete button.

12. Continue to add the custom actions you need. When you finish, click OK.

13. You return to the Update > General Properties sheet.

14. You can also launch the Define Custom Action window from the Actions menu. To do this, from the Actions
menu, select Define Custom Action.

10.2.700 137
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Define Updatable Fields

Use the Query Field List to indicate which Display Column fields the users can update. You can also create or
select default values that automatically populate a field.

1. The Alias field displays the specific name for each column within your updatable BAQ TopLevel SubQuery.

138 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. The Data Type field indicates the kind of data contained within the specific field. Available types:
• nvarchar - Alphanumeric characters
• int - Whole numbers only
• decimal - Numbers which also contain decimal places
• bit - Defines a True/False value; on the interface, logical fields appear as check boxes or radio buttons
• date - Date (month, day, year) values only
• datetime - A date value which also includes the time
• uniqueidentifier- A Globally Unique Identifier value
• bigint - Used when column contains numbers too large for the Integer data type

3. The Updatable column indicates which fields are allowed for data updates. You can specify which fields
you want to update through this BAQ by selecting the corresponding check boxes. You can also use the
Updatable column header check box to set multiple fields at once.

Rows marked as ReadOnly are not allowed for data


updates.

4. Use the Mandatory column to specify which BAQ fields become required. This indicates which fields cannot
be empty when you attempt to save a record to the database.
You can configure the list of mandatory fields manually, by selecting the check box for each of the fields
you need.

5. If you want set multiple fields at once, use the Mandatory column header check box. This control behaves
the same way as for the Updatable column described in step 4.

6. You cannot update a field if it's specified as ReadOnly in the source table. This check box displays for your
information and cannot be modified. If this check box is selected, users cannot change the data that appears
in this column.

7. Use the Initial Expression field to enter a text value that displays in the field before users actually enter
data in it. Use this feature to place some instructional text in the field to help the user understand what
information is required for this field.

8. If you want to create a calculation to determine the initial expression, click the Column Initial Expression
button. This launches the Updatable Field Initial Expression window; use the controls on this window
to create a formula that generates the initial expression you need for a specific field.

• This button becomes enabled when the Allow New


Record check box is selected on the General Properties
sheet, the BPM Update processing method is selected
and a BPM Update Processing Business Object is
specified on the Update Processing sheet; if any
other Processing method is selected, Column Initial
Expression selection is disabled.
• Be sure to use c# syntax when building an expression.
• To verify the expression is available for use within the
uBAQ, use the Check Syntax button. Any errors are
reported in the grid below the Editor pane.

10.2.700 139
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Note the validation process reacts on:


• Empty Expression Statement
• Syntax Error
• Security Issue (non-advanced BPM users)

The following table lists the limitations for Initial Expressions:

Allowed
• Any .net functions that return scalar value of acceptable data type can be used. For
Elements
example, you can specify this initial expression for an integer data type field like
DateTime.Now.Year.
• If you have BPM Advanced User rights you can refer to database table field values.
The expression should results in scalar value of acceptable data type. For example,
this.Db.ABCCode.First().Company.
• BAQ constants can be used.

Not Allowed
• Initial Expression is specified for the fields on the record added to query result table.
Elements
This record is current during expression execution, so reference to another query
result table record is not allowed.
• The order of field initialization is not determined, so reference to another field in a
new record is not allowed.
• The ttResult variable is not allowed in Initial Expressions. It causes errors when the
Check Syntax, BAQ Analyze, or query validation (on save) action is performed and is
not supported by auto-complete. The presence of ttResult is not verified during import
so legacy queries may be imported without any errors.
• Current row fields cannot be used. For example, you cannot specify the
ABCCode_PcntTolerance expression for the ABCCode_StockValPcnt field.
• Only single line statement is allowed, so you cannot use semicolon delimiter and
single line comments.

9. You can also define specific acceptable values that will be available in a specific field. To do this, click the
Advanced Column Editor Configuration button.
This feature is discussed in the following topic.

Updatable Field Editor

Use this window to define the type of data the users will enter through this updatable BAQ field. You can define
text fields, date fields, number fields, drop-down list options, and radio button options through the controls in
this window.
Updatable BAQs use two field format definitions. The format you specify on the Display Fields > Columns
Select sheet defines how a field value displays in the read-only mode, for example, in a grid.
You can define a second format in the Updatable field editor. This way, you can define different formats; for
example, x(10) for display and >>,>>9.99 for editing.
This window is similar to the Query Parameters window described in the previous Phrase Build - SubQuery
Criteria section.

To use the editor:

140 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

1. Use the Tree View to select an updatable field for which you want to define values.

2. Select the Data Type for the parameter from the drop-down list. Available types:
• nvarchar
• integer
• decimal
• date
• dateTime
• bit
• uniqueidentifier
• bigint

3. In the Format field, the default format for this Data Type displays.
If you need, you can edit this value. Make sure the format follows the convention of the database.

4. If this field is required in order for the BAQ to pull in query results, select the Mandatory check box.

5. Use the Editor Type drop-down list to define the editor control the user will have for entering data within
the updatable field. Available options:

Option Description
Common Editor Activates the Editor Default field. Enter a custom text value you need for the
field.
This text appears by default; users can then enter a different value in this field.

10.2.700 141
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Option Description
Radio Button Set Activates the Values Editor sheet. Use this sheet to define the various radio
button options for this field. Users can then select a radio button option from
the values you define in this window.
DropDown List Activates the Data from drop-down list. Use this list to define the source of
the drop-down list options. The field then displays options contained in the
drop-down list.

6. If you select the Common Editor option from the Editor Type drop-down list, the Editor Default field
becomes active. Enter the default value you want within this field. When you use this updatable BAQ in a
dashboard, this value is used to perform field level validation either before changes to a field are saved to
the database or after updates to the field are changed and returned for display on the interface.

7. If you want this field to generate a Business Process Management (BPM) method, select the Raise Events
check box. When you complete your updatable BAQ on the Update Processing sheet, you can see these
new methods within the Updatable BAQ Method Directives window. On the finished Dashboard assembly,
this is used to perform field level validation before proposed changes to the field are committed or to perform
additional updates after the field value changes.

8. If you want the field to have access to a quick search for finding and selecting data entry values, click the
Quick Search button to locate the quick search you need. You create quick searches through Quick Search
Maintenance; these configurable search programs display input criteria to use for a search, display search
result fields, and return the data from the specific field you define. For more information on quick searches,
review the Quick Search section within the Searches chapter.

9. If you select the DropDown List option from the Editor Type drop-down list, the Data from field becomes
active. Use the options from this drop-down list to indicate the source from which the data on this list
populates. Available options:

Option Description
Custom Values
Causes the Values Editor to display controls for creating a new list of values. Use this
functionality to define the various list options this drop-down list will use.
Enter the following information:
• Value - Enter the actual value of the parameter that will be sent to the query.
• Display Text - Enter the text displayed for the user for this value.
• Order - Defines the sequential order of items in the list.

BAQ The Values Editor displays controls for selecting a BAQ. Enter the following information:
• Query ID - search for and select the BAQ you need.
• Display Column - select the column that displays in the lookup list.
• Value Column - defines the name of the column you want to use for the field value.

User Codes Causes the Values Editor to display controls for selecting a specific User Code. User codes
are lists of custom values you define through User Defined Code Maintenance. When
you select a user code, the drop-down list populates with values contained within the
custom user code record. For more information about creating user codes, review the
User Defined Codes Maintenance help topics.

142 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

10. Continue creating values for all of the updatable fields you need. When you finish, click Save.

11. To exit this window, click Close.

Update Processing

In order for your updatable BAQ (uBAQ) to work properly, use the controls on the Update Processing sheet to
select and configure a processing method used to update the target database.
You can select one of the following processing types:

1. Use the Service Connect Workflow method to set up the interaction of business activity query with Epicor
Service Connect (ESC). Database updates are performed using the ESC workflow created directly from the
Business Activity Query Designer.

This method is set by default for external uBAQs.

2. Use the Advanced BPM Update only method to create a BPM directive manually from scratch, or to
customize the directive generated by BPM Update processing. Updatable BAQ directives initiate BPM actions
based on method calls launched from an updatable BAQ.

3. Use the BPM Update method to perform database updates using the special Business Object method
UpdateExt that simulates the standard way of how application manipulates data within business objects.

This method is set by default for regular (non-external)


uBAQs.

Each of these methods is discussed in the following topics.

Epicor ERP and Epicor Service Connect Interoperability

You can use Epicor ERP to cooperate with Epicor Service Connect (ESC). Once configured, you can create or
execute ESC workflows directly from within the Epicor ERP application.
Calls to Service Connect can be performed from within:
• Business Process Management (BPM) directives - Within a BPM workflow, you can use the Call SC Workflow
action to initiate the ESC workflow execution. To establish connection, BPM uses the WCF service exposed
by ESC.

10.2.700 143
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

• Updatable Business Activity Query (uBAQ) - Besides using BAQs to display custom views of data, users
can also enter data directly within business activity queries. These uBAQs can utilize events inside Epicor Service
Connect workflows, so users can create and edit records - updating the database through the query itself.
When the uBAQ is created or is being edited, it attempts to create or update the workflow definition, as well as
the corresponding request and response schemas. In order to call the existing workflow to process events or
apply updates, as well as to create the new workflow, uBAQ uses the BPM Integration WCF Service. The service
is installed when the Integration WCF Services feature is installed on the ESC server. In order to use this service,
uBAQ must authenticate in ESC.
For more details on how to configure both applications, review the Epicor ERP and Epicor Service Connect
Interoperability topics found in the Application help.

Default Epicor Service Connect logon parameters are defined on the Company Maintenance > General Settings
sheet.
Navigate to Company Maintenance.
Menu Path: System Setup > Company/Site Maintenance > Company Maintenance

This program is not available in Epicor Web Access.

1. Select the General Settings sheet.

144 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. In the Server field, enter the enter Full Domain Name of the server where the Service Connect application
is installed.

3. Enter the User name and Password of an Epicor Service Connect user account that has rights to the server.

4. Click the Test Connection button to verify the connection to the Epicor Service Connect server is established.

10.2.700 145
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

5. In the UBAQ Workflow Package field, select the default workflow package where workflows created
from Business Activity Query Designer are placed.

A Workflow Package is the Service Connect equivalent


of a physical folder. It is used to store document processes,
also referred to as workflows in logical groups. A list of
all existing packages displays in the Workflow Packages
node under the Connectivity node of the Epicor Service
Connect Administration Console tree.

At the new workflow creation, you can override this value by selecting a different workflow package than
default.

Configure Service Connect Workflow

Use the following steps to learn how specify the workflow used with the uBAQ, configure workflow design and
run-time credentials.

1. First, specify the ESC server name and run-time credentials you want to save with the query. To do this, click
the Server button.

2. Select one of the following options:


• Use Company Default Server - use this default option to use the ESC server and credentials specified
in Company Maintenance.
• Use Specified Server - use this option to specify custom ESC server parameters:
• Server - enter the Full Domain Name of the server where the Service Connect application is installed.
• Enter the User and Password for the user account that has rights to access Service Connect.

3. Click the Test Connection button to confirm you can access the specified server.
The ESC logon information used when the query activates is now configured within the BAQ.

146 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

4. When you click the Configure button, you are first presented with the Logon To Service Connect dialog.
On this dialog, you can:
• Accept the credentials entered on the Select Epicor Service Connect Server window launched using
the Server button (either company default or custom ones).
• Enter custom ESC credentials you want to use while building the query.

5. By clicking OK, you are presented with the Select Workflow window.

10.2.700 147
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. The Server field displays the FQDN name of the specified server where ESC is installed.

7. The Server URL automatically displays the integration service that handles communication between Epicor
ERP and Epicor Service Connect.
By default, the service URL is https://<server name>/BPMIntegrationWcfService/SCIntegrationWcfService.svc

8. If you want to use an existing workflow, in the Workflows tree view, search for and select a workflow you
want to use.

9. The workflow and package you select display in the Chosen Workflow field.

10. When you click Refresh, the list of packages and workflows is refreshed.

11. When you click the Advanced button, you are presented with the Workflow Context Parameter window.
The information on this window is shared between the BAQ Designer and BPM. The ESC server credentials
you enter allow calling of Epicor services from the Epicor Service Connect side by using imported .Net
references.

12. If you want to create a new workflow, click the Create New button and specify the workflow package and
workflow name.

13. Once complete, in the Select Workflow window, click OK.

14. The following steps discuss how you can create a new workflow / select existing one using the New button.

148 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

15. If the company default ESC server information is entered on the Company Maintenance > General sheet,
clicking the New button invokes the Enter Workflow window.

16. On this window, in the Select a Workflow package field, you can either accept the default workflow
package or select a different package where you want to save the new workflow.

17. In the Enter new Workflow name field, type the name of the workflow to be created.
Good practice is that BAQ and workflow are named the same.

18. Click OK.

19. The parameters you specified now display in the read-only field.

If on the Select Epicor Service Connect Server window


you select to use ESC server credentials other than default,

10.2.700 149
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

clicking the New button launches the Select Workflow


window. The process here is the same as seen in step 5
onwards.

Standard Template Workflow

The standard ESC template workflow and corresponding schemas are created directly from the Business Activity
Query Designer.

If you perform database updates using Service Connect on an


External Business Activity Query, at the beginning of the
workflow creation process, an updatable BAQ is inspected for
a DataSource Type attached to the query.
• If the Application Type field you define on External
Datasource Type Maintenance is set to Prophet 21,
iScala or Eclipse, the workflow is designed to perform
updates specifically against these external applications.
• If the Application Type field you define on External
Datasource Type Maintenance is set to Generic, the
generic workflow is in created Epicor Service Connect. You
can use this workflow to perform updates to any target
database for which you successfully established connection.

Example The following is an example of a standard workflow


called from BAQ.

150 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

The following is the list of events the generic Service Connect workflow handles:
• GetNew - This method generates a new record and adds it to the database table. If your updatable BAQ
allows users to enter new records, when users create new methods they activate this method. A new, blank
row is created within the updatable table, and the user populates the fields linked to this row with new data.
• Update - This method refreshes the information within the database with new information a user has entered
in the updatable BAQ. When you test your updatable BAQ by modifying existing data, this method runs when
you click the Update button. When the updatable BAQ is embedded within a dashboard, this method runs
when the user enters new data and clicks the Save button.
• CustomAction - Use this method to run custom actions you define on the uBAQ.
• FieldUpdate - This method occurs after the user's change to a field is committed. You can use this method
to perform additional processing against the changed row. For example, when you enter a part number, you
want the part description field to populate automatically.
• FieldValidate - This method occurs before the proposed change to a field is committed. You can use this
method to validate proposed changes. For example, you can prevent users from entering an incorrect value
in a certain field such as non-existent state.
You can customize the workflow so it meets your business process requirements. Use the available Epicor
Service Connect documentation to learn how to build workflows which can automate processes, connect
different business entities, applications, or users.

BPM Update Processing

Use this method to perform database updates using the special Business Object method UpdateExt. This update
method governs the whole data transaction process between the updatable BAQ and the related Business Object.
To use BPM update processing:

1. In the Processing Method pane, select the BPM Update radio-button.

10.2.700 151
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. The BPM Update Processing section activates.

3. Click the Business Object button.

4. The Select Business Object window displays. The business objects for the tables on the current BAQ display
by default in this window.

5. Select the business object you want from the Suggested business objects list.

The list of business objects is suggested based on tables,


participating in the query.

6. The Update Method indicates the method used to enter the changes made through the updatable BAQ
to your database. By default the UpdateExt method displays, which is the update method used on all
updatable BAQs.

7. If you need, you can select a different business object by clicking the Select Business Object button.

8. When you have selected the business object you want, click OK.

9. When you select a Business Object and a method, the Tables to update pane displays the hierarchical tree
of all tables, participating in the UpdateExt method.
After you select a BO, uBAQ automatically attempt to synchronize Column Mappings. If uBAQ display list
contains table fields corresponding to table fields from the UpdateExt tables list, mapping between these
fields is automatically created. Within the Tables to update tree, a checkbox displays next to each table for
which such mapping was found.
In the process of field mapping between BO and BAQ, you can select / deselect different tables based on
your needs. Only tables, checked in the tree -view will participate in Column Mapping and used in update.

152 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

10. The two sheets at the bottom display columns are mapped with the following distinction:
• The Input Column Mapping defines how data is pulled from the uBAQ table to the Business Object
table.
• The Output Column Mapping defines how data is pulled to the uBAQ from the Business Object, after
the UpdateExt method executes.
The Column Mapping sheets are discussed on the following topic.

11. When you finish, click Save.

Column Mapping

After you select a BO, uBAQ automatically attempt to synchronize Column Mappings. You can modify this
information to create custom mapping between BAQ and Business Object.
The following list outlines how BAQ Column Mapping works:
• If BO table field is used in either Input or Output Column Mapping, then input mapping for all its primary key
fields must be provided in order to uniquely identify table rows.
• Deletion of an input mapping for a key field is not allowed.
• BO UpdateExt tables are organized in the Tree-view. To update a child table, the primary key values of all
parent tables must be supplied in Input Column Mapping.
These required columns are automatically added when you click the Synchronize button, or when you
regenerate the BPM Directive by saving the BAQ.

10.2.700 153
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

• If BAQ cannot suggest mapping automatically, the right side of Input Column Mapping assignments shows
no mappings. A corresponding error message displays when BPM Directive is regenerated on BAQ save.

1. The Query To Object Column Mapping defines assignments of BAQ fields to the Business Object table
fields.

2. The Table field displays the table name, used on the left side of a mapping assignment.
For Input Column Mapping, this field displays the Business Object table name.

3. The Field field displays the Business Object table field name.

4. The .Net Data Type field indicates .NET data type of the field such as Boolean, Integer or String.

5. When the Required check box is selected, it indicates that users must enter data in this field before a new
record is saved. If they attempt to save the field without entering data in it, an error message displays. The
information in this field is supplied from Business Object, where the specific column is marked as required.

6. When the Key Field check box is selected, it indicates this BO field is part of primary key and input value
is required for UpdateExt functionality.

7. The Expression column displays the equation used to pull data from the updatable BAQ into the Business
Object table.

8. You can use the editor to manually create an expression you want to assign (or map) to the
MapTableName.MapTableField. Click the Expression Editor button to launch the Business Object Update
C# Expression window.

9. The Editor displays the expression used to pull data from the updatable BAQ into the Business Object table.

154 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

10. When you launch the Business Object Update C# Expression from the input mapping, the Add All Mandatory
Fields option becomes available on the Actions menu. This option adds all fields from TopLevel Display
Columns to the output mapping. You must then make sure all empty mapping expressions are filled.

11. To verify the expression is available for use within the uBAQ, use the Check Syntax button. Any errors are
reported in the grid below the Editor pane.
Note the validation process reacts on:
• Empty Expression Statement
• Syntax Error
• Security Issue (non-advanced BPM users)

Make sure the expression you create is written using the


.NET C# syntax. Be aware that no SQL functions and
Operators are applicable on this form. This window is
nearly identical to the Calculated Field Editor. For more
information, review the Create a Calculated Field topic.

12. The Object To Query Column Mapping sheet defines how data is returned to the BAQ from the Business
Object.

10.2.700 155
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

13. For Output Column Mapping, the Table field displays a ttResult variable, corresponding the current row in
BAQ execution results table.

14. The Field field displays the BAQ ttResult field name, containing selected field Alias.

15. You can use the Allow Nulls checkbox to manually specify that result can contain a null value.

16. You can use the Expression Editor button to manually create an expression you want to assign (or map)
to the selected Table.Field. Note that BAQ columns within an expression should be referred as ttResult.Alias
columns.

17. When you launch the Business Object Update Expression from the output mapping, the Add All Result
Fields option becomes available on the Actions menu. This option inspects the BO and adds all fields marked
as required, to the input mapping. You must then make sure all empty mapping expressions are filled.

156 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

18. For both input and output column mappings, you can use the toolbar above the grid to add and remove
rows from mapping and sort columns in an alphabetical order. The Synchronize option inspects all tables
within the BO. If BO tablename and field name exists in the BAQ display field - a new mapping row is
automatically created.

10.2.700 157
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Advanced BPM Processing

Business Objects contain the code that calls a database, sending current data to a custom dashboard for display,
or populating the database with new data. A business object (also called a BO) houses the methods used to
enter, view, and calculate data for a specific function within an application.
Each process a business object can run is called a method; by default each updatable BAQ contains the following
methods:
• GetNew - This method generates a new record and adds it to the database table. If your updatable BAQ
allows users to enter new records, when users create new methods they activate this method. A new, blank
row is created within the updatable table, and the user populates the fields linked to this row with new data.
• Update - This method refreshes the information within the database with new information a user has entered
in the updatable BAQ. When you test your updatable BAQ by modifying existing data, this method runs when
you click the Update button. When the updatable BAQ is embedded within a dashboard, this method runs
when the user enters new data and clicks the Save button.
• Get List - Retrieves the data specified by the query.
• CustomAction - Use this method to run custom actions you define on the uBAQ.
• FieldUpdate - This method occurs after the user's change to a field is committed. You can use this method
to perform additional processing against the changed row. For example, when you enter a part number, you
want the part description field to populate automatically.
• FieldValidate - This method occurs before the proposed change to a field is committed. You can use this
method to validate proposed changes. For example, you can prevent users from entering an incorrect value
in a certain field such as non-existent state.
Each of these methods can be monitored through Business Process Management (BPM) directives. BPM
customization allows using of mostly all BPM Method directive actions and conditions for processing query data.
When you create an updatable BAQ, the application writes a base processing directive for the update method.
The directive uses C# code to update the database according to the settings defined in the Business Activity
Query Designer. These directives can evaluate the data passed into or out of the database, interrupting the
processing when certain conditions you define are met. Various actions, again which you define, then automatically
run in response to the condition. You create these Updatable BAQ Method Directives from within the Business
Activity Query Designer, or, you can access the program directly from the main menu:
Menu Path: System Management > Business Process Management > Updatable BAQ Directives Maintenance

This program is not available in Epicor Web Access.

To following are the ways of using the Advanced BPM processing functionality:

1. Business Activity Query Designer helps users with updating data via a selected business object. For these
purposes, the UpdateExt method is used. This update method governs the whole data transaction process
between the updatable BAQ and the related Business Object (BO). When you select the BPM Update option
on the Update Processing sheet, you activate the BPM Update Processing section to configure data updates.

158 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. You do this by selecting an appropriate Business Object and defining data Mappings between BO's dataset
and query display fields.

3. Click the BPM Directives Configuration to access the Updatable BAQ Method Directives.

4. Based on the information you specified in BPM Update Processing, the BAQ Designer generates the Base
Processing directive against uBAQ.Update method.

10.2.700 159
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

5. This directive is named #BASE# and contains a workflow item with custom C# code, which prepares data
and calls UpdateExt for selected BO.
Access to #BASE# directives is only available to users having Advanced BPM User rights.

In Epicor Cloud ERP - Multi Tenant, this program or


feature may not be available or may operate under certain
restrictions.

160 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

6. Also, Base Processing directive for the GetNew method is automatically generated if the Allow New Record
option is selected on the Update > General Properties sheet. This directive is also named #BASE# name
and it contains C# code with field assignments for new row as defined in Initial Expression column defined
on the General Properties.

When you use BPM Update option to perform uBAQ


updates, do not edit #BASE# directives because any
changes will be discarded once the query is saved in BAQ
Designer.

7. However, the BAQ Designer gives you the ability to modify the directives for any methods. By using the
Advanced BPM Update only option, you can create a BPM directive manually from scratch, or, to customize
the directive generated by BPM Update processing.

8. If you do not specify BPM Update Processing and launch Updatable BAQ Method Directives, then no #BASE#
directives are generated automatically for the GetNew and Update methods. Use this option to customize
the method completely by yourself.

You should always create Base Processing directives


for all updatable query methods you want to call.
Otherwise the error message "There is no BPM
customization attached to Update method of test
updatable query in XYZ company" displays.
The exception to this rule, are GetList and GetNew
methods, which have the base processing functionality
embedded. For these methods, creation of
Pre-Processing and Post-Processing directives is
reasonable.

For more information on how to build a directive and which workflow elements are available for use with
uBAQ directives, review the Business Process Management chapter.

Analyze

Use the Analyze sheet to both analyze and test your query for any possible problems before you use it in the live
application.
Run the data controls on this sheet to verify that the data results you need populate on this grid. If you are not
seeing the results you want, you can return to the Query Builder sheets to modify the query and then test the
results again.
Additionally, the Analyze sheet contains the functionality you use to verify and updatable BAQ can pull in (get)
data, update records, and add new records. You can also use this sheet to test a custom Business Process
Management (BPM) method against the updatable BAQ. After you verify the updatable BAQ can perform all of
the functions successfully, you are ready to place it on smart client and mobile device dashboards. Users can then
enter and update the data they need through this query.

BAQ Designer allows testing update operation on records


belonging to current company only.

10.2.700 161
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Analyze and Test the Query

After you create a query, verify its functionality on the Analyze sheet.
To verify a query:

1. Navigate to the Analyze sheet.

2. Click the Analyze button.


The Query Execution Messages pane displays the response from the server, indicating whether the syntax
is correct.
If the BAQ Designer detects any SQL syntax errors, the Query Execution Messages pane displays the
message corresponding to error. In case of possible SQL injection, the query execution is not allowed and
the Query Execution Messages pane displays the corresponding message. For security reasons the Query
Execution Messages pane does not display any detailed information or guidelines on how to correct the
error, if the query execution disallowed due to possible SQL injection. You can get detailed information from
the App Server log file to analyze and correct the error.

3. To set the maximum number of rows returned by the query, you can select a value from the Rows to Return
list.
You can either select one of the predefined values or you can enter a custom value:
• <empty>
• 10
• 50
• 100
Note the value entered in this field is not saved with the BAQ, it is used for testing purposes only.

162 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

If an empty value is selected, then, by default, the query returns maximum of 10,000 records. This limitation
is only applied on retrieving BAQ results while testing their execution. If you need to turn this limit off, from
the Actions menu, click Execution Settings and set the RemoveTestRowLimit parameter to True.

4. Click the Test button.


The data you are pulling in and displaying through your query displays in the Query Results grid. In this
example, the BAQ retrieves the list of customers from the Customer table.
If the BAQ Designer detects any issue, the Query Execution Messages pane displays "Bad SQL Statement.
Review the server event logs for details" message. Press Analyze button to view the message corresponding
to error.
You can get detailed information from the App Server log file to analyze and correct the error.

5. If the BAQ runs too long, you can cancel its execution using the X button that displays to the right of the
Clear Grid button.

This feature is only available for BAQs executed in an MS


SQL database. The SQL Server account used by your Epicor
installation must be provided with the ALTER ANY
CONNECTION and VIEW SERVER STATE permissions to
cancel query execution.

6. To remove the query results and Query Execution Messages, click the Clear Grid button.

10.2.700 163
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

When using Analyze, Test, and Get List buttons, as well


as during query execution, the tables referenced by the
query are checked.
For standard tables, which belong to Ice or ERP database
schema, it is verified that tables are published through
zData and accessible in the configuration the query is
executed in. For tables, which belong to Extension sets,
if the Extension set is installed in the system, but disabled
or not mapped in the current company, a warning
message displayed in Query Execution Messages pane,
but the query is allowed to proceed. On SaaS installations,
XXXChunk/XXDef tables can not be executed, except
GSM User.
If one of extension tables referenced by a query, which
belongs to unknown Extension set, query execution is
disallowed and modifications are not saved. When query
execution is disallowed, an error message is displayed in
Query Execution Messages pane of the BAQ Designer.

164 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Test the Updatable Query

Before you use verify the updatable BAQ functionality, define what fields users can update and set up a processing
method of your choice. You do both tasks using the sheets under the Update tab.

When you create an updatable Cross-company query, please


note BAQ Designer allows testing update operation on records
belonging to current company only. Also, a Cross-company
updatable BAQ cannot be used to create the mobile application
(dashboard).

1. To set the maximum number of rows returned by the query, you can select a value in the Rows to Return
field.
From the drop-down list, you can either select one of the predefined values or you can enter a custom value:
• <empty>
• 10
• 50
• 100
Note the value entered in this field is not saved with the BAQ, it is used for testing purposes only.
If an empty value is selected then by default, the query returns maximum of 10000 records. This limitation
is only applied on retrieving BAQ results while testing their execution. If you need to turn this limit off, access
Execution Settings from the Actions menu and set the RemoveTestRowLimit parameter to True.

2. Click the Get List button to test whether the updatable BAQ can pull in data from the database.

10.2.700 165
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

3. You are warned this test may launch BPM directives that update the database. Click Yes.

4. If the BAQ runs too long, you can cancel its execution using the X button that displays to the right of the
Clear Grid button.

• This feature is only available for BAQs executed in a


MS SQL database.
• The SQL Server account used by your Epicor installation
must be provided with ALTER ANY CONNECTION and
VIEW SERVER STATE permissions in order to cancel
query execution.

5. The Query Results grid populates with data. You now can test the BAQ to find out if you can update
existing records.

6. In the Query Results grid, double-click on a row.

7. The Fields window displays. This window contains all of the fields you indicated were updatable on the
Update > General Properties sheet. Enter a new value in one of the fields.
In this example, you modify the address of a supplier record.

166 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

8. If an updatable field was selected to raise BPM events within the Updatable field editor, two additional
buttons display next to this field. The V button performs the FieldValidate BAQ method directives; the U
button performs the FieldUpdate BAQ method directives described for the field.

9. Click OK to exit the Fields window.

10. The record you updated is now highlighted within the Query Results sheet.

10.2.700 167
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

11. If you want to save this change to the database, click the Update button.

12. The record is now updated. To verify the update to the database was successful, you can click the Get List
button again to retrieve the updated DB results. You can also open a specific program that should reflect
your changes, for example, Supplier Maintenance and verify your changes there.

13. If you want to add new records to the updatable BAQ, click the Get New button.

This option is only available when you select the Allow


New Record check box on the Update > General Properties
sheet.

14. A blank row displays on the Query Results list. Double-click the empty row.

168 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

15. The Fields window displays. Initially, all the fields are blank Enter the values you need to create a new record.
In this example, you create a new supplier record.

16. In the Fields window, click OK.

17. On the last row of the Query Results grid, the new record displays.

10.2.700 169
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

18. If you want to save this change to the database, click the Update button. The new supplier record is now
created. To verify the update to the database was successful, click the Get List button again to retrieve the
updated DB results.

If uBAQ supports Multiple Row Update set on the Update


> General Properties, then several rows can be edited
before clicking Update button. Otherwise - only one row
can be edited.

19. If you created custom actions for the updatable query and then used the Updatable BAQ Method Directives
program to set up conditions linked to this action, you can test this directive. To do this, first select the
custom action you want from the drop-down list and click the Run Custom button.
If the updatable BAQ directive is set up correctly, the Business Process Management (BPM) condition and
its subsequent actions run as expected.

170 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Where Used

Use the Where Used sheets to review all the items that use the current query. The information on these sheets
helps you decide if you should modify the current query, delete the query, or create a new query.
Be careful if you decide to modify the query: any changes impact other applications that use this query.
If you attempt to delete a query that is in use, a warning message displays verifying whether you want to continue
deleting the query. Typically, you should not delete any query in use unless the BAQ is obsolete or no longer
needed. After you delete the query, you should remove or update the dashboard, BAQ report, or other items
that previously used it.

If several user dashboards use the current query, you should


not change it, but rather create a new shared query that
contains the changes you need. Other users can then decide
if they want to use your new query in their dashboards, reports,
and other items.

To access the information:

1. Navigate to the DashBoard List sheet to review which dashboards use the current query.
Dashboards are flexible, powerful tools that provide easy access to critical information in a real-time
environment. In addition to the standard dashboards provided with the application, you can also create
custom dashboards. Custom dashboards can replace the need for workbenches, trackers, ShopVision reports,

10.2.700 171
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

ad hoc reports, and business intelligence reports. For more information on how to create a dashboard,
review the Dashboards chapter.

2. Navigate to the Quick Search List sheet to review which quick searches use the current query.
The Quick Search functionality is a dynamic tool you use to create configurable searches you can then use
within your own user account or share publicly with other user accounts - improving the productivity of
searches. For examples of how to use this functionality, review the Searches chapter.

3. Navigate to the BAQ Report List sheet to review which BAQ reports use the current query.
Use the BAQ Report Designer to turn a Business Activity Query (BAQ) into a report. Through the BAQ Report
Designer, select a query as the base for a report, and to define the option fields, filters, and sort by options
that display on the report interface. Once you have the report layout complete, add it to the menu for users
to access. For more information on this functionality, review the BAQ Report Designer chapter.

4. Navigate to the Report List sheet to review the report data definitions that use this query as data source.
You can use a business activity query as a data source for report data definition. Report data definition is
used to create and edit the table structure of each report. It defines report's main attributes and identifies
the tables and fields that you can display on the report. For more information on using report data definitions,
review the Report Data Definition topic in Epicor ERP Implementation Guide.

5. Navigate to the Business Activity Query List sheet to see any references of the selected query to another
queries.
You can link a business activity query as a parameter to another query. These parameters can filter data on
the query; define what values from the linked BAQ are used as parameter values. Add parameters to a query
through a criterion you set up within the Business Activity Query Designer. For more information on using
parameters, review the Specified Parameter topic earlier in this chapter.

For a list of all field descriptions used on the Where Used


sheets, refer to the Business Activity Query – Where
Used topics within the application help.

172 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

BAQ Search

Use the BAQ Search sheet to make data from your query available to users searching for related data. Many
standard search forms throughout the application contain a BAQ sheet. This sheet provides users with the access
to BAQs you have identified through the BAQ Search sheet.

You must indicate the query as Shared (on the General sheet)
before users can access this BAQ search in search programs.
You cannot use system queries on the BAQ Search sheet. If
you want to use a system query, create its copy first.

1. Navigate to the BAQ Search sheet.

2. The Available “Like” Columns list contains all the fields you selected for your query on the Query Builder
> Display Fields > Column Select sheet.

3. In this example, the Part_PartNum column is used.

4. First you highlight this column in the list of Available “Like” Columns and then click the Right Arrow button.

5. The column is moved to the BAQ Search "Like" Columns list.


The list contains the items you move over from the Available “Like” Columns list. Users searching for
information similar to the data contained in the items in this list can access your BAQ.

10.2.700 173
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. Click Save.
Since the Part Number field was selected as the Like column for searching, any place you can search for a
part has this BAQ listed and available for searching.

7. To test the BAQ Search, launch Part Maintenance.

8. Click the Part button.

9. In the Part Search window, navigate to the BAQ sheet.

10. The Search Results pane in the search window displays the query information. You can use the BAQ to
search for a specific part.

For examples of how to use this functionality, refer to the BAQ Searches section in the Searches chapter.

Comments

Use this sheet to enter notes to your query.

The comments for system Business Activity Queries display in


read-only format.

174 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Actions

The Business Activity Query Actions menu contains a number of tools you can use. This section describes each
of these tools.

Copy Query

The Epicor application contains system queries that control how users enter and update data throughout the
database. These queries are a great starting point for creating your own modified queries. Although you cannot
change a system query, you can copy a system query, rename it, and modify this copied query as you need.
You use the Copy Query option to duplicate an existing query.

1. Click the Query ID button to search for the query you are going to copy.

2. In the Query Search window, click the Search button and select the query that you are going to copy.

3. In this example, select zContactTracker01.

4. Click OK.

5. Notice the System. No Save. In Use icon displays. The icon indicates the selected query is a system query
that cannot be edited. It also indicates this query is used by a program, report, or owned by another author.

10.2.700 175
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. In this example, the system zContactTracker01 query is used on a quick search. You can find the specific
dashboard and quick search that contains this BAQ on the Where Used sheets.

7. You want to use this query as a base for a new query. From the Actions menu, select Copy Query.

8. In the Query ID field, enter the new name for the copied query. Be sure to enter an identifier that is different
from the ID listed in the Copy From section.

176 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

9. Optionally, you can enter a new Description for the query.

10. Click OK to save the query with the new name.

11. The message displays, indicating the query was copied successfully. Click OK to close the message.

12. The new query now displays for you to modify.

You can now add tables, new display fields, calculated columns, make the BAQ updatable, and so on to the
copied query.

Export BAQ

Use this command to save the query definition. Once you select the query you want to export, you can export it
to a folder you specify during the BAQ export. You typically use this option to create a backup of your BAQ or
if you want to use or analyze the query on another installation. If needed, you can import it back into the
application.

This process only exports the query definition, not the data.
The Business Activity Query Export Process program, discussed
later in this chapter, can export the query data.

1. On the General sheet, select the query you want to export.

10.2.700 177
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Once you have a query in focus, from the Actions menu, select Export BAQ.

3. In the Description field, you can change the current description of the query.

4. Click the browse button next to the File field to find and select the folder that will contain the exported
BAQ. You need to select the directory path and enter the filename - for example,
c:\Users\User\Documents\MyContactQuery.baq.

5. For updatable BAQ utilizing events inside Epicor Service Connect workflows, you can select the Export SC
Credentials check box. The ESC credentials used when the BAQ executes are exported along with the BAQ
definition.

178 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

6. Click the Export button.

7. The Export process messages field details the results of the export.

While exporting the query export file, the query is analyzed


for the Extension Set. If any table or field from the
Extension Set is referenced by the query, dependency
information displays in the Export process messages
field:
Exporting query dependencies information
...
The query referes to tables from extensi
on set(s):
Extension set id: sp/ExtensionTipEx
Provider: spProvider_0
Level: Extensibility
Product: spProduct
Version: 1.1.1.1
Extension set id: zp/ExtensionTip
Provider: zpProvider_0
Level: Productization
Product: zpProduct
Version: 1.1.1.1
Done!

8. If the export is successful, the “Query export finished with success” message displays.

9. Click Close.

Import BAQ

Once you have exported a version of a query, you can use the Import BAQ option from within the Business Activity
Query Designer program to pull the query definition back into the application.
To use the Import BAQ command to import a query:

1. From the Actions menu, select Import BAQ.

10.2.700 179
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Click the Import File button to find and select the BAQ you wish to pull into the application.

You can import multiple BAQs at once. When searching


for queries, hold Ctrl and select the BAQs you want to
pull into the application. If the query you import already
exists in the database, you are presented with the warning
message, asking whether you want to overwrite the BAQ.

3. Enter the New Query ID. In this example, you import the MyContactQuery–Rev2 query.
This field displays in the read-only mode when you import multiple queries.

4. Select the Show in Designer check box to immediately load this query into the Business Activity Query
Designer program.
This option is disabled when you import multiple queries.

5. Click Import to import the query.

In the Business Activity Query Designer a query is imported


only into the current company.

6. The Import process messages field details the results of the export.

While importing the Import file is analyzed for an


Extension Set. Referenced information on Extension Set
is displayed in the Import process messages field. If an
Extension Set of the imported extension table reference
is not enabled or added to the target system, the following
message displays in the Import process messages field:
Importing query dependencies information
...
Warning! Query refers to extension table
s from extension set that is not enabled

180 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

or mapped to current company.


Importing extension set information:
Extension set id: sp/ExtensionTipEx
Provider: spProvider_0
Level: Extensibility
Product: spProduct
Version: 1.1.1.1

Warning! Query refers to extension table


s from extension set that is not enabled
or mapped to current company.
Importing extension set information:
Extension set id: zp/ExtensionTip
Provider: zpProvider_0
Level: Productization
Product: zpProduct
Version: 1.1.1.1

Done!

7. If you are importing an updatable BAQ configured to utilize events inside ESC workflows, the following
dialogs display. First, on the Select Epicor Service Connect Server window, you are asked to specify BAQ
runtime credentials.

For BAQs of different types, the following two dialogs do


not display.

8. All fields on this form are filled with data coming from the exported uBAQ definition. If the query was
exported without ESC credentials, the Use Company Default Server option is selected by default.

9. Click Test Connection and verify the credentials you chose are valid.

10. Click OK to proceed to the following dialog.

11. Secondly, you are presented with the Logon to Service Connect window.
This window only displays if Show in Designer check box is selected while importing the query.
The credentials you enter on this window are specifically used for the WF Design. These credentials are not
saved with the query, they are only stored until the BAQ Designer form is opened. By default, ESC credentials
you selected on the Select Epicor Service Connect Server window are offered.

10.2.700 181
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

12. Click OK to complete the process.

13. If the import is successful, the “Query Import finished with success” message displays.

14. Click Close.

In Epicor SaaS installations (Epicor hosted environments),


a user with Global Security Manager rights (GSM) has
the ability to overwrite a BAQ in another company or
owned by another user. The following rules describe the
import process:
• On BAQ import, the query attempts to be imported
into the original company which is defined in the .baq
query definition.
• If the target company already contains the BAQ, a
GSM user is prompted to overwrite the query.
• If GSM selects Yes on this dialog, the target query
is deleted and the new query definition is imported.
• If GSM selects No, the BAQ import tried to import
the query into the current company and change
authorship to the current GSM user.

• If the same query ID exists in the current company,


additional warning message displays for the user.
• If user clicks Yes, the current query is replaced with
the imported one.
• Selecting No interrupts the import process.

Note the above process does not apply to BAQs visible


across companies; when importing a query of All
Companies type, a GSM user has the same rights as an
ordinal user.

The options/values for tenant and multi-tenant features


are only for Epicor hosted environments. Typically you can
ignore these options. Internal Epicor administrators who
need more information should refer to the Epicor SaaS
Installation Guide.

182 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Change Author

When a query is created, only the author of the query can modify it. To give another user rights to modify a
query they did not create, use the Change Author command to assign a new author to the query. The Change
Author command is only available when you are the author of the query.
To give another user access to your query:

1. From the Actions menu, select Change Author.

2. The Change Author window displays.

3. The name of the current BAQ owner displays in the Author field.

4. Click the drop-down list to select the new author of the query.

5. The new author’s User ID displays within the Change Author window. In this example, you assign AARON
to become the new BAQ author.

10.2.700 183
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. Click OK to confirm your selection.

7. The new Author displays on the General sheet.

8. Notice the Other owner. No Save red icon indicates you no longer can save changes to this query.

Run BPM Designer

To complete the updatable BAQ, use the Run BPM Designer command to set up how the BAQ interacts with the
business object's methods. Business Objects contain the code that calls a database, sending current data to a
custom dashboard for display, or populating the database with new data.

This Actions menu is only allowed if the query in focus is


Updatable.

1. Click on the Actions menu and select Run BPM Designer.

184 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. The Updatable BAQ Method Directives window displays.

3. All of the available updatable BAQ method directives display.

4. You can create three types of method directives.


• Pre-processing directives evaluate data before it is saved to the database. Use pre-processing directives
for validation and other tasks you want run before the data updates your database.
• Base Processing directives substitute the normal operation of the business object with custom code
you create. Epicor recommends you never create base processing directives; only create base processing
directives with your consultant or Directly through Epicor. If your base processing directive does not
work, you will potentially harm the operating functions of your application
• Post-processing directives evaluate data that is saved to the database, but is now being returned to
the interface for display. Use post-processing directives when you want to generate an event based on
the data recently recorded to the database.

5. When you finish creating your updatable BAQ method directives, exit the program.
For more information, review the Updatable Business Activity Query section discussed earlier in this
chapter.

10.2.700 185
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Define Custom Action

Use the Define Custom Action command to create action placeholders available for use with the business activity
query (BAQ).

This Actions menu is only allowed if the query in focus is


Updatable.

1. Click on the Actions menu and select Define Custom Action.

2. The Define Custom Action window displays.

3. To create a new action, click the New button.

186 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

4. Enter an ActionID. This identifier defines the custom action within the updatable BAQ.

5. Enter an ActionLabel. This value defines how the action displays on buttons within the dashboard.

6. If you wish to remove a custom action, click the Delete button.

7. Continue to add the custom actions you need. When you finish, click OK.

The custom actions you add through this functionality are placeholders you can then leverage within the Updatable
BAQ Method Directives program. You use this program to create conditions that monitor these custom actions.
When a user enters data which matches the condition, the condition runs th e specific actions linked to it, like
validating data or displaying an informational message.
For more information, review the Updatable Business Activity Query section discussed earlier in this chapter.

Define Parameters

Use this option to create alternative query parameters. You can then evaluate table or subquery columns against
these parameters when building query criteria. These parameters can be nearly any value you need.
You can also use parameters to display customized method arguments for use in Business Process Management
(BPM) directives.
The query text contains references to arguments using this format: @arg_name

Example

select * from dbo.PartCOPart as PartCOPart


where PartCOPart.CoRevisionNum = @CustomParameter
This argument reference is replaced by the argument value when the query activates.
You access these parameters on Table Criteria or SubQuery Critera, when you

1. From the Actions menu, select Define Parameters.

2. The Query Parameters window displays.

10.2.700 187
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Example You can, for example, create a drop-down list


that is filled with data supplied by a query.

For more information on how to build a query parameter


and use the controls on this window, review The Query
Builder > SubQuery Criteria > Specified parameter
topic discussed earlier in this chapter.

Execution Settings

Use the Execution Settings command to modify execution parameters of the selected BAQ.
You can set up paging parameters to indicate how the BAQ should get a sub-selection of data from a record
set, specify the longest time in which the query can run, or supply SQL statements, clauses, and keywords to
modify the resulting SQL syntax.
If you need to break the returned data into several pages:
• make sure the PageSize is set to a positive number equal to the number of rows you want to display on each
page. Otherwise, if PageSize is set to default 0, the paging is not applied.
• note that paging applies starting from the page number specified in the PageNum setting.

Example If the PageNum is 3, the PageCount is 4, and the


PageSize is 5, the data returned by the query is broken into
4 pages with 5 rows each, and the first record in the results is
table row 11.
If the number of database records is less than the number
assumed by the paging settings (in this example, 30), the

188 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

number of returned pages can be less than the defined


PageCount.

The table below lists the execution values you can define.

Execution Setting Description


Timeout
The value in this field specifies the longest time (in seconds) in which a query can run.
Specifying 0 for this option turns off the query governor, and all queries are allowed to
run indefinitely.

PageSize
The value in this field specifies how many rows per page are retrieved in the result set.
The available values include:
• 0 - Paging is not used.
• Any positive number - Specifies number of rows per page.

PageNum
The value in this field specifies the page number user wants to get. The default value is
1.
Be aware that if you for example, set this value to 10, but the BAQ only returns 3 pages
of data, an empty result set displays.

PageCount The value in this field specifies how many pages of data the query returns. By default,
PageCount is set to 1 meaning that the returned data is displayed on a single page. You
can set this value to any positive number greater than 0.
PagingMethod
The value in this field specifies the method used to retrieve data from the datasource.
The available values include:
• Auto - This is the default paging method. When selected, the DynamicQuery tries to
automatically select the most appropriate paging method, supported by BAQ definition
and database engine.
• Simple - When a query executes, its results return through DbDataReader, but only
required page is loaded to the result table. This paging should work for any database,
so use it explicitly if Auto method does not work for some reason.

NeedTotal
This field specifies if total number of rows in the query is received (without paging). If this
flag is set to True, the ExecutionInfo table in the result dataset, returning from query
contains total number of rows.
The value in this field should be set to False whenever possible to reduce the server
load.

Where
Setting name of additional conditions in SQL notation which are applied against results
table. Only display fields and BAQ/SQL constants be referenced. You can use where
statements of any complexity including and/or concatenations. If ExecutionFilter table
contains any conditions then they will be applied before this ‘where’ condition.
Make sure you reference fields using the BAQ Alias notation in the following format:
TableName_FieldName.

Example ABCCode_Company =
'EPIC06'

10.2.700 189
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Execution Setting Description


Select
Setting name for SELECT. This is comma-delimited list of fields in SQL notation. Use this
setting to narrow set of fields returned by query. Note you can only reference BAQ's
display fields.
Make sure you reference fields using the BAQ Alias notation in the following format:
TableName_FieldName.

Example ABCCode_ABCCode,
ABCCode_Company

Having
Setting name for statement that appears in the HAVING clause in addition to query
settings.
Make sure you reference fields using the BAQ Alias notation in the following format:
TableName_FieldName.

Example ABCCode_StockValPcnt <


90

OrderBy
Setting name for comma-delimited list of fields by which you want sort the query result.
Optional direction can be specified in SQL notation (ASC/DESC).
Make sure you reference fields using the BAQ Alias notation in the following format:
TableName_FieldName.

Example ABCCode_ABCCode DESC

GroupBy
Setting name for comma-delimited list of fields by which you want to sort query results.
Make sure you reference fields using the BAQ Alias notation in the following format:
TableName_FieldName.

Example ABCCode_Company

SQLServerDateFormat
This setting adds SET DATEFORMAT call at the beginning of the query. This setting should
only be used MS SQL Server.
The available options include:
• mdy (month-day-year) - default option
• dmy (day-month-year)
• ymd (year-month-day)

Transaction Isolation
This setting sets transaction isolation level which controls the locking and row versioning
behavior of Transact-SQL statements issued by a connection to SQL Server.
The available options include:
• NotSet - No Transaction Isolation specified by the BAQ engine. When the query
executes, the default Transaction Isolation Level specified in the corresponding DB
provider is used. This option is set by default.

190 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Execution Setting Description


• ReadUncommited - Specifies that statements can read rows that have been modified
by other transactions but not yet committed.
• ReadCommited - Specifies that statements cannot read data that has been modified
but not committed by other transactions.
• RepeatableRead - Specifies that statements cannot read data that has been modified
but not yet committed by other transactions and that no other transactions can modify
data that has been read by the current transaction until the current transaction
completes.
• Serializable - Specifies that statements cannot read data that has been modified but
not yet committed by other transactions. No other transactions can modify data that
has been read by the current transaction until the current transaction completes. Other
transactions cannot insert new rows with key values that would fall in the range of
keys read by any statements in the current transaction until the current transaction
completes.
• Snapshot - Specifies that data read by any statement in a transaction will be the
transactionally consistent version of the data that existed at the start of the transaction.

queryMaxResultSet
Specifies maximum number of rows that will be returned by the dynamic query.

queryTimeOut
By entering a value in this field, you define the database server command timeout before
terminating the attempt to execute a command and generating an error.

Persist in Query
All execution settings can be flagged as persistent or not.
If the check box is clear, any specified settings will apply to the current BAQ session only,
until the BAQ form is closed.
If the execution setting is flagged as persistent, it will be used each time the BAQ runs.
If a BAQ supplies some execution setting on execution, while the same persistent execution
setting exist, then the first one has higher priority.
There are two parameters that are always persistent - QueryMaxResultSet and
queryTimeout; these are stored in the database with the query. All other execution settings
can be persistent or not.

• Within the Epicor Administration


Console > Application Server
Settings, you can define limits that
apply to all BAQs executed by the
application.
• For external BAQs, limits can be
specified in the related external
datasource.
• User can only specify limits for one
particular query. These limits can
exceed application limits only if the
user, who edits and saves a BAQ, is
a Security Manager. Other users can
set only values that do not exceed
maximum values specified in

10.2.700 191
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Execution Setting Description

Application Server Settings or an


external datasource.

RemoveTestRowLimit
This setting controls if the BAQ Designer is allowed to return more than 10000 rows while
testing BAQs.
For performance reasons, this parameter should be set to it's default False value
whenever possible.

This parameter has no affect on another query limits you may specify; it only controls the
data retrieval limit while testing BAQs.

ExecutionTraceLevel
This setting option does not display in the drop-down and needs to be typed in manually.
Add this setting with any value - for example, true, or 1, etc. to make the BAQ return
additional data about query execution. You can use this data for BAQ performance analysis.
The following additional performance counters get included into the query output:
• QueryPreparationTime
• SQLExecutionTime
• DataFetchTime
• TotalRows

You can get the values of these


counters by calling the
DynamicQuery.Execute method via
REST - for example, from the Epicor
REST API interactive help site.

Use Primary Database


When the Always On availability groups feature is activated on the SQL server, you gain the ability to request
that specific queries are routed to the read-only database. If the Use Primary Database option is not selected,
when building the query results, the application will request a connection to a read-only database, if available.
However, if your company does not have a read-only replica of the database, all standard BAQs will be executed
against the main database regardless of whether the Use Primary Database option was selected. This option
is selected automatically for Updatable Business Activity Queries (uBAQs) because they require assured access to
the most up-to-the-second data.
If you are interested in learning more about how SQL Server can be configured to support the read-only
database capability, please refer to the Microsoft® documentation for information on the Always On
availability groups feature of the SQL Server®.

192 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Get Query Execution Plan

Use the Get Query Execution Plan to retrieve and save the .sqlplan execution file. You later open this file in
the SQL Server Management Studio to examine the query execution.

Example You can use this feature to determine what is


causing the problem in the slow running query.

This feature is available for both internal and external MS SQL


queries. This command requires the VIEW SERVER STATE
permission for the IceContext connection.

1. From the Actions menu, select Get Query Execution Plan.

2. In the Save SQL Server Query Execution Plan window, you can specify the name and the location where
you want to save the .sqlplan file.
By default, the file is named using the following format: <QueryID>.sqlplan

10.2.700 193
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

3. Click Save.

4. To the informational message, click OK.

5. Once the file is saved, open it using the SQL Server Management Studio for further analysis.

For more information, refer to the available msdn


documentation.

194 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Change Security Code

Use this action to change the Security Code of system Business Activity Queries (BAQs) and Updatable BAQs
(UBAQs).

This action is available to users with Security Manager rights


when a system BAQ/UBAQ is opened in the Business Activity
Query Designer program.

1. In the Business Activity Query Designer program, open a system BAQ - for example, COM-CustContacts.

2. From the Actions menu, select Change Security Code.

10.2.700 195
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

The Change Security Code dialog window displays.

3. Type in or browse and select the Security Code you wish to apply to the system BAQ/UBAQ.

Click Reset to default to change the Security Code to its default system value.

4. Click OK.
The updated Security Code is applied to the BAQ/UBAQ immediately, you do not need to save the changes
in the program.

Reset Field Attributes Cache

Use this action to remove cached field attributes.


Each database field has a set of properties such as format or label/caption, etc. Unless you manually specify new
attribute values for query fields, the Business Activity Query (BAQ) Engine uses the default system Field Attributes
taken directly from the database. Once these attributes are retrieved, the system temporarily stores them on the
server for one hour. This eliminates the need to request this metadata from the database at each BAQ run.
Use the Reset Field Attributes Cache action to immediately remove the server-side cache that stores system
Field Attributes data and apply changes made to Field Attributes in the database to the query.

196 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Export Query Data

Run the Business Activity Query Export Process to export the query data from your database and store it in a
personal archive directory. This data can then be used on an ASP page, or imported to Microsoft® Excel® for
analysis and publishing.
Use the Business Activity Query Export Process program to export query data through either the .xml or .csv file
formats. You can export this data each time you launch this program. You can also set up the export so that it
automatically runs each time you launch your Startup Tasks.
Menu Path: System Management > Business Activity Queries > BAQ Export Process

This program is not available in Epicor Web Access.

To use this program:

10.2.700 197
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

1. Click the Query ID button to search for and select the query to export.

2. From the Output Format drop-down list, select the export format you want to use. You can choose either
XML or CSV file formats.

3. Enter the Output Filename for the exported query. By default, this file is automatically saved on the server
within the EpicorData > Processes > <UserName> directory - where <UserName> is the name of the
current user logged into the application. The may look as follows: C:\EpicorData\Companies\EPIC
06\Processes\MANAGER. The location of this data directory is specified in System Agent Maintenance.

For Epicor Cloud ERP users, the path is ...\Companie


s\siteID\siteID-<UserName>.

You can override the default output location by exporting the file to a custom location you define. It is
allowed to use:
• Relative paths (root folder level only), for example, temp/filename.csv
• Network paths, for example \\server\share\folder\filename.xml
The correct file extension is attached during each export. If you select that the output will be an .xml file,
the .xml extension is automatically added to the file name.
If you don't have direct access to the server file system, such as with SaaS and Early Access, use the Server
File Download utility. It transfers one file at a time from one of three directories on the server: Company,
User, or Reports to the client. Specify the file type, select the file, and then browse for a path for the
download. This program is found in System Management > Schedule Processes.

4. For CSV output format, you can enter the Text Delimiter. For example, if you place a semi-colon (;) in this
field, this character separates the data in the exported file.

5. For CSV output format, if you want to display field labels in the export file, select the Output Labels check
box.

198 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

6. From the Schedule drop-down menu, select a schedule you want to use.

For more information on creating schedules, review the


System Agent Maintenance topics within the application
help.

Example
You can select the Startup Task Schedule from the
Schedule list and select the Recurring check box. This way
you export this query each time you run your startup tasks.

7. Click the Submit button to submit the schedule for processing.


If you export a query with parameters, the Query Parameters form is displayed. You can specify or change
default parameter values, which will be used along with current settings. If you do not enter parameter
values, the query selection is not allowed.

Results of the BAQ Export Process reports are reported in the System Monitor log.

BAQ Application Server Settings

Within the Epicor Administration Console, several application server settings are available for use with BAQ
functionality. You can restrict how business activity queries generate results. This can help you avoid performance
issues caused when BAQs process large amounts of data. You can also indicate if BAQ database calls should be
recorded in the server log.

1. You launch the Epicor Administration Console from your server machine. Depending on your operating
system, you launch this tool in different ways:
• If you are on Windows SQL Server 2008 R2, click Start > All Programs > Epicor Software > Epicor
Administrative Tools > Epicor Administration Console.
• If you are on Windows SQL Server 2012, press the <Windows> + F button to display the Charms bar;
from the Apps screen, select Epicor Administration Console.

10.2.700 199
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. From the tree view, expand the Server Management node and Epicor Server node.

3. Select the application server you need to monitor.

4. Now from either the Action menu or the Actions pane, select Application Server Settings.

5. For the BAQ Query Max Result Rows field, leave the default setting at 0, indicating there is no row limit.
If you have a BAQ that is returning a large number of rows and is affecting performance, enter a value
(number of rows) in this field to limit the number of rows returned. This is similar to using the TOP clause
in SQL.
If you do limit rows, you may not see a record you are expecting. Instead of entering a value here, consider
adding or adjusting criteria to your BAQ to make it more efficient.

6. Now in the BAQ Query Timeout field, enter how many seconds can elapse before the application server
stops the query.
By entering a value in this field, you define how long each BAQ is allowed to run. When a query attempts
to generate results and reaches this time limit, the application server stops the query and sends the user a
time out message.
The default value is 0, indicating there is no limit. By entering 900, you allow queries to run 15 minutes
before they time out.

When you change the above application server settings,


you will cause the application server to restart. Be sure to
change these settings during a period of the day when
few users are logged into the Epicor application.

200 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

7. Within the Standard Logging information, select the BAQ Logging check box to record Business Activity
Query (BAQ) database calls.
Each time user activity activates a BAQ, the application server log records which query was called and how
long it took this BAQ to gather the data results.
By selecting this check box, you enable the following trace flag in the trace.config configuration file:
<add uri="trace://ice/fw/DynamicQuery" />
As a result, the server log records the following information:

Node Description
QueryID Displays a BAQ ID.
CompanyID A company, under which the BAQ is executed.
SQLExecTime Time spent on executing query's SQL statement on an SQL server.
DataFetchTime Time in milliseconds spent on reading result from an SQL Server and
preparing Result dataset.
PagingMethod If paging is used, displays the name of a paging method. (Simple, Partition,
Offset, Auto)
PageNumber If paging is used, displays the number of requested page.
PageSize If paging is used, displays the size of a page.
TotalTime Total time in milliseconds spent on query processing, including
preparation, execution, fetching data and finalization.
TotalRows Displays the number of rows in a result set.
RowLimitReached Presented if BAQ Query Max Result Rows setting is enabled in Application
Server Settings. If a query result set hits this limit; this node displays the
current limit setting value.

Example

<Op Utc="2013-08-15T08:48:28.9994569Z" act="Ice:BO:DynamicQuery/DynamicQuer


ySvcContract/Execute" dur="20.9593" cli="fe80::35a2:7247:6cab:d0e9%11:53737
" usr="manager" tid="17" pid="11176">
<BAQ QueryID="udfield" />
<BAQ Company="EPIC03" />
<BAQ SQLExecTime="12.2756" />
<BAQ DataFetchTime="3.0597" />
<BAQ PagingMethod="Simple" />
<BAQ PageNumber="1" />
<BAQ PageSize="2" />
<BAQ TotalTime="19.4385" />
<BAQ TotalRows="2" />
</Op>

You can evaluate the server log using the Performance


and Diagnostic Tool. For more information on how to test
the performance of your system, review the Performance
Diagnostic Guide.

8. Click Apply to confirm you changes.

10.2.700 201
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

BAQ Info Zones

A BAQ (Business Activity Query) info zone is an embedded query you can link to a specific field on a program
interface. When you activate a BAQ info zone, it displays as a linked tooltip window. The data that populates
this window depends on both the business activity query and the current value, if any, within the linked field.
After you create or modify the BAQ to use for the BAQ info zone, you link the BAQ to a specific field by either
using Extended Property Maintenance or embedding the BAQ info zone in a customization. When you launch
the program that contains the customized field, you see a BAQ info zone indicator on the field. You can then
modify the color used to display this indicator and define a shortcut key combination that activates the BAQ
zone. You define these personalization features in the Options window; you can access this window from the
Tools menu.

Activate a BAQ Zone

To activate a BAQ zone:

1. If a field is linked to a BAQ zone, a zone indicator displays next to the field.

2. Hold your mouse over the zone indicator; a tooltip window displays.

202 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

3. This BAQ zone window populates with data. The BAQ zone uses both the query and the field value, if any,
to generate its data results. In this example, the Part Number field has a zone indicator that displays a
graphic file for the selected part (1032KNUT).

For more information about creating BAQ zones, review


the Epicor ICE User Experience and Customization Guide.
The Customization Utilities chapter contains a BAQ Zones
section that describes how to create and customize
program interfaces to display these zones.

BAQ Field Security

Business Activity Queries honor existing Field Security settings.


Some of the database table fields can be censored, meaning that their value is either partly or fully unavailable
to the current user due to the applied field security settings. Access to a field can be denied to a user, Security
Group, or even to the whole Company. Fields are also classified as censored if data masking is applied. In both
cases, access to field data is either prohibited or restricted.
A Business Activity Query (BAQ) returns null values for the fields that are not available to the current user. This
rule also applies to censored fields that are referenced by calculated fields or selected as display fields in a subquery.
A BAQ returns masked values for the fields with enabled data masking.
A BAQ fails to execute if the censored fields are used in a top-level query or a subquery for:
• Defining table or subquery criteria - for example, if a filter condition is applied to a censored field or a
calculated field that references a censored field in a table from the top-level query or a subquery.
• Establishing relations - for example, if a censored field or a calculated field that references a censored field
is used for creating a relationship between tables or subqueries on a top-level query or subquery level.

BAQ Best Practices

This section contains a series of best practice methods to help you develop BAQs. If you follow these suggestions,
you will have more success creating both display-only and updatable BAQs.
Fewer Tables, Better Performance
Carefully consider how many tables you need to join in your business activity query. The functionality has few
restrictions, so, if you wish, you can create incredibly complex queries. The more tables you join on the query,
however, the slower performance the query has during runtime.
If you wish to see a lot of data at once, create a series of smaller BAQs and then display them together on the
same dashboard. If you need to create a very complex view of your data, however, consider building an executive
dashboard instead. Both the dashboard and executive dashboard features use BAQs as building blocks for
gathering and displaying data, but contain additional, more efficient functionality for publishing and subscribing
values between tables. Because of this, it is often better to have a series of smaller BAQs you can manipulate
through a dashboard, rather than one huge BAQ that requires a lot of processing time to pull in its data.
To learn more, review Chapter 5: Dashboards and Chapter 7: Executive Dashboards.
Start Small and Test Often

10.2.700 203
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Begin your complex query project by starting small with just one or two tables. You can then analyze the results
to find out if you are pulling in the desired data at each step through the database. You can then add more
complexity by adding another table and testing the results. By adding and testing each table and subquery, you
verify the results as you build the complex BAQ. Always be sure to build a complex BAQ in sections and then
frequently check the results. If you do not, you may pull in undesirable data, and it will be difficult for you to
determine which table is causing the problem.
Too Much Data
If you are getting more rows in your results than you expect, you may need to filter the second, using a field on
the first table. For example, you want to create a BAQ that shows when a specific operation is scheduled to run.
Because the database contains operations scheduled as What-If operations and others scheduled as actual
operations, you may get duplicate results. If you filter the JobOperDtl (job operation detail) table by using the
ResourceID field on the ResourceTimeUsed table, only resources assigned to operations in the actual schedule
appear in your BAQ results.
Use Calculated Fields
If you have similar data placed in different columns because of different record types, use a calculated field to
total these amounts for display within a single column. For example, if you are creating a query to review labor
in your manufacturing center, each employee will log time as indirect labor and direct labor. To find out the total
amount of labor, use a calculated field that contains a formula for totaling the indirect and direct labor values.
Outer Joins – When to Use
The Outer Join table relationship is useful in situations where you want to see everything from the first table and
find out what records are not linked to these records in the second table. For example, you want to see which
customers have recently ordered products from your company. To do this, you build a query that outer joins the
Customer table with the OrderHed (sales order header) table. All the customer records appear alongside all of
the sales order records. You can then see in the BAQ the customers that currently do not have sales orders placed
with your company.
Sorting Performance
Sorting data by a selected column is a powerful feature, but be aware that some significant processing time may
be required to display the reordered results. This situation is especially true when you sort a large amount of
data. The query tool has to first return all of the records into memory before it can re-order their sequence through
the selected column. All of this processing occurs on the server, so the data calls need to move across the network
before they arrive at your client workstation. So if you sort on a large amount of data, be patient – the reordered
results are on their way.

Case Studies

This section of the chapter explores some step-by-step case studies. Each case study explores a different aspect
of the business activity query (BAQ) functionality.

Labor Summary BAQ

This BAQ generates a summary of each shop employee’s total labor and burden hours. During this case study,
you join the Employee Basic (EmpBasic) table from Shop Employee Maintenance with the Labor Detail (LaborDtl)
table from Labor Entry. You then filter the results against a specific date and create calculated fields to generate
the total labor and burden hours.

204 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Define the Query

To define the query:

1. Click New.

2. In the Query ID field, enter EMPHours.

3. In the Description field, enter Labor Summary.

4. Select the Shared check box to indicate other users within the current company can use this query.

5. Navigate to the Query Builder > Phrase Build sheet.

10.2.700 205
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. In the Filtering field, enter emp.

7. The Erp.EmpBasic table displays. Drag and drop it onto the grid.

8. Click the Connected Only Tables button. This limits the tables so that only tables linked to the EmpBasic
table display on this list.

206 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

9. The Erp.LaborDtl table displays. Drag and drop it onto the grid. The two tables automatically link.

10. You want to filter the labor data based on a cutoff payroll date. Highlight the Erp.LaborDtl table.

10.2.700 207
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

11. The Table Criteria sheet automatically displays.

12. Click New. A row displays in the Criteria grid.

13. From the Field list, select PayrollDate.

14. From the Operation list, select Greater Than or Equal (>=).

15. From the Filter Value list, select the specified constant option.

16. Click the specified word.

17. The Specify a Value window displays. In the Value field, enter the date you need.

18. Click OK.

19. On the Standard toolbar, click Save.

Select and Create Columns for Display

Select the columns on both the tables you want to view in your results.

1. Navigate to the Display Fields > Column Select sheet. Use this sheet to define what columns display on
the query results.

208 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. Click the Sort Columns Alphabetically button.

3. Expand the EmpBasic node and move Name into the Display Column(s) area.

4. Select the Group By check box to group BAQ results by each employee.

5. Add two calculated fields to the query results. Click the Calculator button.

6. The Calculated Field Editor window displays.

10.2.700 209
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

7. Click New.

8. In the Field Name field, enter LaborHrs.

9. From the Data Type list, select decimal. This indicates the field accepts decimal places within its values.

10. You are creating a calculated field that totals each employee’s labor hours. In the Functions area, expand
the Aggregate node.

11. Select the Sum(x) option. Notice the function syntax displays in the Editor field. This function adds together
all values the query finds in a specific column. In this query, it totals the labor hour values linked to each
shop employee record.

12. In the Fields area, expand the LaborDtl node and double-click LaborHrs.

13. Click Save.

14. Repeat these steps to create another calculated field that totals burden values for each shop employee. Use
the Sum(x) function and select the BurdenHrs field.

15. Click Save.

16. Close the Calculated Field Editor.

17. Notice your calculated fields are included within the Display Column(s) section. If you wish, click inside the
Label column to modify the text that displays for each column.

210 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

18. You are ready to test the query. Navigate to the Analyze sheet.

10.2.700 211
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

19. Click the Test button.

Because you created calculated fields, the total labor and burden hours for each employee displays in the Query
Results grid.

Not Clocked Out BAQ

This BAQ displays all the employees who are currently clocked in but not clocked out on operations. During this
case study, you join the Labor Head (LaborHed) table to the shop employee (EmpBasic) table, and then filter the
results by employees that still have an active labor transaction running within the database. You also sort the
results by employee.

212 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Define the Query

To define the query:

1. On the Standard toolbar, click New.

2. In the Query ID field, enter NoClockOut.

3. In the Description field, enter Employees Not Clocked Out.

4. Select the Shared check box to indicate other users within the current company can use this query.

5. Navigate to the Query Builder > Phrase Build sheet.

10.2.700 213
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. Search for and place the Erp.LaborHed and Erp.EmpBasic tables on the canvas.

7. These tables have a relation defined in the schema, so they automatically link.

8. You want to filter the employee data based on the employees who are still clocked into the application.
Highlight the Erp.LaborHed table.

9. The Table Criteria sheet automatically displays.

10. Click New. A row appears in the Criteria grid.

214 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

11. From the Field list, select ActiveTrans.

12. From the Operation list, select Equal To (=).

13. From the Filter Value list, select the specified constant option.

14. Click the specified word.

15. The Specify Value window displays. In the Value field, enter Yes. This indicates only employees who are
currently clocked in display in this query.

16. Click OK.

Select Columns for Display

Select the columns on both the tables you want to view in your results.

1. Navigate to the Display Fields > Column Select sheet.

10.2.700 215
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Click the Sort Columns Alphabetically button.

3. Expand the EmpBasic node.

4. Move the following columns from the Available Columns area to the Display Column(s) area:
• EmpBasic_Name
• EmpBasic_EmpID

5. Expand the LaborHed node.

6. Move the following columns from the Available Columns area to the Display Column(s) area:
• LaborHed_ActualClockinDate
• LaborHed_ActualClockInTime
• LaborHed_ActualClockOutTime
• LaborHed_ActLunchInTime
• LaborHed_ActLunchOutTime
• LaborHed_ActiveTrans

7. Navigate to the Display Fields > Sort Order sheet.

216 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

8. You want the results to sort by each employee’s name. Expand the EmpBasic node.

9. Move EmpBasic.Name to the Sort By column.

10. Click Save.

11. You are ready to test the query. Navigate to the Analyze sheet.

10.2.700 217
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

12. Click the Test button.

All the employees who are currently clocked into the database display in the Query Results grid.

Simple Updatable BAQ

This case study demonstrates how to create a simple updatable query to create or update supplier records.

Define the Query


To define the query:

1. Click New to create a new query.

218 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. In the Query ID field, enter Supplier.

3. In the Description field, enter Supplier Update.

4. Select the Shared and Updatable check boxes.

5. Navigate to the Query Builder > Phrase Build sheet.

6. In the Filtering field, enter ven.

10.2.700 219
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

7. Select Erp.Vendor table and move it on the designer canvas.

8. Navigate to the Display Fields > Column Select sheet.

9. Expand the Vendor table to display the fields.

10. Move the following fields into the Display Column(s) section and change the field labels as follows:
• Vendor_Company
• Vendor_VendorID
• Vendor_Name
• Vendor_VendorNum
• Vendor_Address1
• Vendor_City
• Vendor_State
• Vendor_ZIP
• Vendor_Country

Define Basic Processing Details

1. Navigate to the Update > General Properties sheet.

220 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. Verify the Allow New Record check box is selected.

3. Select the Allow Multiple Row Update check box.

4. Click the Updatable column header check box to mark all fields in the grid as updatable.

5. Navigate to the Update > Update Processing sheet.

10.2.700 221
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. Click the BPM Update option.

7. Click the Business Object button.


The Select Business Object window displays.

8. In the Suggested business objects section, select the Erp.Vendor object and click OK.

9. In the Tables to update pane, ensure the Vendor table is becomes selected.

10. Click Save.

Update and Create Supplier Records

1. Click the Get List button to test whether the updatable BAQ can pull in data from the database.

222 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. You are warned this test may launch BPM directives that update the database. Click Yes.

3. The Query Results grid populates with data. You now can test the BAQ to find out if you can update
existing records.

10.2.700 223
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

4. In the Query Results grid, double-click on a row.

5. The Fields window displays. This window contains all of the fields you indicated were updatable on the
Update > General Properties sheet. In the Fields window, enter a new value in one of the fields.
In this example, you modify the address of a supplier record.

6. Click OK to exit the Fields window.

7. The record you updated is now highlighted within the Query Results sheet.

224 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

8. If you want to save this change to the database, click the Update button.

9. The record is now updated. To verify the update to the database was successful, click the Get List button
again to retrieve the updated DB results. You can also open a specific program that should reflect your
changes, for example, Supplier Maintenance and verify your changes there.

10. If you want to add new records to the updatable BAQ, click the Get New button.

This option is only available when you select the Allow


New Record check box on the Update > General Properties
sheet.

11. A blank row displays on the Query Results list. Double-click the empty row.

10.2.700 225
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

12. The Fields window displays. Initially, all the fields are blank Enter the values you need to create a new record.
In this example, you create a new supplier record.

13. In the Fields window, click OK.

14. On the last row of the Query Results grid, the new record displays.

226 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

15. If you want to save this change to the database, click the Update button.

16. The new supplier record is now created. To verify the update to the database was successful, click the Get
List button again to retrieve the updated DB results.

If uBAQ supports Multiple Row Update set on the Update


> General Properties, then several rows can be edited
before clicking Update button. Otherwise - only one row
can be edited.

10.2.700 227
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Advanced Updatable BAQ

In this case study, design an updatable query to view and update sales order header data.
Throughout this example, explore various tools such as client-server tracing, raising BPM events using updatable
columns and calling Business Object methods from within BPM directives. You also understand the concept of
using directive level variables, to pass and receive data from Business Object calls.

Create New BAQ

1. Click New to create a new query.

2. In the Query ID field, enter SOHeaderUpdate and press Tab.

228 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

3. In the Description field, enter Sales Order Header Update.

4. Select the Shared, All Companies and Updatable check boxes.


These value indicate the query allows data entries, it's definition is visible to another companies within the
database and is available to other users within the current company.

5. Select the Query Builder > Phrase Build tab.

6. Search for and place the following tables on the designer canvas:
• Erp.OrderHed
• Erp.Customer
• Erp.ShipTo

7. Now specify relationships between the tables. Accept the default relationship between the Erp.OrderHed
and Erp.Customer tables.

8. When the Ship To customer is selected on the order header, you want to display the information directly
from the Ship To table. To do so, first delete the relationship between the Erp.Customer and Erp.ShipTo
tables.

9. Now click the Add Connection icon.

10.2.700 229
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

10. Create a link between the Erp.OrderHed and Erp.ShipTo tables.

11. Select the newly created link between the two tables.

230 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

12. On the Table Relationships pane, create new relationship between the two tables using the following
fields:

OrderHed field or any expression ShipTo field or any expression


Company Company
CustNum CustNum
ShipToNum ShipToNum

Select Display Columns


In this task, select the fields you want to display on the query.
Before you start designing a BAQ, it is a good practise to familiarize with the database schema and fields you
want to include in the query. To do so, you can use the Field Help feature - a quick reference tool that provides
a brief field description and the technical property reference for selected fields.

1. Navigate to the Display Fields > Column Select sheet.

10.2.700 231
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Select the following fields in this order and move them to the list of Display Column(s).
To easily locate the below fields, you can sort columns alphabetically.

• OrderHed_Company
• OrderHed_OrderNum
• Customer_CustID
• Customer_Name
• Customer_Address1
• Customer_Address2
• Customer_City
• Customer_State
• Customer_Zip
• OrderHed_CustNum
• OrderHed_BTCustNum
• OrderHed_ShipToCustNum
• OrderHed_PONum
• OrderHed_ShipToNum
• ShipTo_Name

232 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

• ShipTo_Address1
• ShipTo_Address2
• ShipTo_City
• ShipTo_State
• ShipTo_Zip
• OrderHed_NeedByDate
• OrderHed_RequestDate
• OrderHed_FOB
• OrderHed_ShipViaCode
• OrderHed_TermsCode
• OrderHed_DiscountPercent

3. Notice the Customer and Ship To table fields share the same labels. In order to distinguish between them
on a dashboard, modify the Ship To field labels in the following way:

Alias Label
ShipTo_Name ShipTo Name
ShipTo_Address1 ShipTo Address
ShipTo_Address2 ShipTo Address2
ShipTo_City ShipTo City
ShipTo_State ShipTo State/Prov
ShipTo_Zip ShipTo Postal Code

Select Updatable Fields


Select the fields you want to update through this query.

1. Navigate to the Update > General Properties sheet.

10.2.700 233
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Verify the Allow New Record check box is automatically selected.


This function allows creation of new order header records through this updatable BAQ.

3. In the Label For Add New field, enter New Order.


This optional value defines what displays on the drop-down menu next to the New button on the Standard
toolbar. The text you enter here displays as a node on this drop-down menu.

4. Now specify for which fields you want to allow data updates by selecting the Updatable check box. In this
example, select the following fields:
• Customer_CustID
• OrderHed_CustNum
• OrderHed_BTCustNum
• OrderHed_ShipToCustNum
• OrderHed_PONum
• OrderHed_ShipToNum
• OrderHed_NeedByDate
• OrderHed_RequestDate

234 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

• OrderHed_FOB
• OrderHed_ShipViaCode
• OrderHed_TermsCode
• OrderHed_DiscountPercent

Specify Update Processing Method


Now specify which method to use for database updates. In this example, use the special Business Object method
named UpdateExt to update the database. This method simulates the standard way of how Epicor ERP application
manipulates data within Business objects.

1. Navigate to the Update > Update Processing sheet.

2. Verify the BPM Update Processing method is selected by default.

3. Click the Business Object button.

4. On the Select Business Object window, the application suggests several Business Objects you can use to
perform database updates.

5. From the list, select Erp.SalesOrder.

6. Click OK to close the window.

7. At the bottom, notice the Query To Object Column Mapping sheet. This sheet defines how data is pulled
from the uBAQ to the Business Object table.

Notice that by default, BO table columns are populated


through query results of an internal ttResults table. For
example, query results of the ttResult.OrderHed_CustNum
field populate data in the OrderHed_CustNum field.

10.2.700 235
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

8. The Object To Query Column Mapping sheet defines the opposite mapping, it specifies how data is
returned to the BAQ from the Business Object.

9. Save the query.

Analyze Tracing Log


In this task, launch the Sales Order Entry form and find out which Business Object methods are called, when
certain updates are made on the form. You will later configure the query to replicate the same behavior.
First, use the Tracing Options window to set up a tracing log that captures all the calls that the user interface
(client) makes to the application server. When you activate this log, any business logic calls sent to the server are
automatically recorded within this log.
Navigate to Sales Order Entry.
Menu Path: Sales Management > Order Management > General Operations > Order Entry
The CRM menu path is: Customer Relationship Management > Order Management > General Operations >
Order Entry

1. First, investigate what happens when you enter a customer ID on the form. Click New > New Order.

236 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. In the Customer field, enter Addison and press Tab.


Notice that certain changes happened on the form. The client has made a call to the server and verified the
customer Dalton exists. The business logic also determined what customer number is linked to that Customer
ID and eventually, it brought back the default information for that customer such as Sold To address, Ship
To address, Ship Via, Terms Code and so on.

3. To analyze the client - server activity, launch the Tracing Options Form. In this example:
• If you use the application with the Modern Home Page style, launch the Tracing Options Form from
the Application Bar at the bottom of the Home Page.

10.2.700 237
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

• If you use the application with the Kinetic Home Page style, launch the Tracing Options Form by selecting
Tracing Options from the overflow menu at the top right corner of the Home Page.

4. On the Tracing Options Form, select the Enable Trace Logging check box.
By selecting this option, all calls made by the user interface to the server now automatically record within
the tracing log.

238 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

5. Click Apply.

6. Navigate back to the Sales Order Entry form. In the Customer field, delete Addison and type Dalton.
Then press Tab.

10.2.700 239
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

7. Navigate back to the Tracing Options Form and click View.

8. The tracing log displays in Notepad.


Notice each method call made from the client is recorded in the <TracePacket> tags. As you analyze the
log, you can ignore the GetRows and GetRowsKeepIdle methods. These methods are system checks
regularly sent to the server by the client.
Verify the following methods were called and review input parameters used by each of the methods.

MethodName Parameters
OnChangeofSoldToCreditCheck
<parameter name="iOrderNum"
type="System.Int32"><![CDATA[0]]></parameter>
<parameter name="iCustID"
type="System.String"><![CDATA[DALTON]]></parameter>
<parameter name="cCreditLimitMessage"
type="System.String"><![CDATA[]]></parameter>
<parameter name="lContinue"
type="System.Boolean"><![CDATA[False]]></parameter>
<parameter name="ds" type="SalesOrderDataSet">

ChangeSoldToID <parameter name="ds" type="SalesOrderDataSet">


ChangeCustomer <parameter name="ds" type="SalesOrderDataSet">

Each Business Object method uses parameters to provide the expected behavior. Notice the above methods
use the same dataset (ds) parameter called SalesOrderDataSet. Later in this workshop, you replicate this
behavior by calling these methods from within a BPM workflow.

240 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

9. Now examine what happens when you change the default ShipTo location. Launch the Tracing Options
Form again and click Clear Log.

10.2.700 241
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

10. Change the ShipTo location to Plant2 and notice the address changes.

11. Switch back to the Tracing Options Form and click View.

242 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

12. In the log, verify the ChangeShipToID method was called. You can ignore other system methods, if present
in the log. Notice the method again uses a single ds (dataset) parameter called SalesOrderDataSet.

MethodName Parameter
ChangeShipToID <parameter name="ds" type="SalesOrderDataSet">

10.2.700 243
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

13. The last process you want to track down is selection of the Need By date and automatic assignment of the
Ship By date. Invoke the Tracing Options Form and Clear Log.

14. In the Need By field, which is OrderHed.NeedByDate, select today's date.

244 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

15. Notice the Need By date you selected becomes the default Ship By date. This DB field is
OrderHed.RequestDate.
This date is used as the default date for all sales order lines.

16. View the Tracing Log. Verify the method that was called this time was ChangeNeedByDate. This method
uses two parameters - ds (dataset) SalesOrderDataSet and a TableName parameter of string type. Notice
the TableName parameter is set to OrderHed.

MethodName Parameters
ChangeNeedByDate
<parameter name="ds" type="SalesOrderDataSet">
<parameter name="cTableName"
type="System.String"><![CDATA[OrderHed]]></parameter>

10.2.700 245
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

17. On the Tracing Options Form, clear the Enable Trace Logging check box.

18. Click OK.

Use Updatable Field Editor


In this task, define additional properties for selected updatable columns.

1. In BAQ Designer, navigate to the Update > General Properties sheet.

246 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. Click the Advanced Column Editor Configuration... button.

3. The Updatable Field Editor window displays.

10.2.700 247
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

4. Since you want the uBAQ to perform additional actions after values in certain field change, you need to
specify which fields will raise BPM events. In this example, select the Raise Events check box for the following
fields:
• Customer_CustID
• OrderHed_ShipToNum
• OrderHed_NeedByDate

5. For the Terms Code field, you want to allow users to use a drop-down menu and select one of the available
codes customers will pay for an order.
In the left pane, select OrderHed_TermsCode.

6. In the Editor Type field, select Dropdown List.

7. In the Data from field, accept the default option Custom Values.

8. In the Values Editor pane at the bottom, define what values you want to display on the drop-down list.
Use the Add Value icon to create new records.

9. Enter the following data:

Value Display Text Order


1/10 1/10 Net 30 1
2/10 2/10 Net 30 2
COD Cash on Delivery 3

10. Click Save and exit the Updatable Field Editor.

248 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Tour Updatable BAQ Method Directives


In this task, review Business Object methods used by the updatable BAQ.

1. Navigate back to the Update > Update Processing sheet.

2. Click the BPM Directives Configuration button.

3. The Updatable BAQ Method Directives window displays.

10.2.700 249
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

4. Expand the Methods node.


Note that each Business Objects contains a code that calls a database, sends current data to a custom
dashboard for display, or populates a database with new data. Each Business Object houses the methods
used to enter, view, and calculate data for a specific function within the Epicor application.

Each process a business object can run is called a method;


by default, each updatable BAQ contains the following
methods:
• GetNew - This method generates a new record and
adds it to the database table.
• Update - This method refreshes the information within
the database with new information a user has entered
in the updatable BAQ.
• Get List - This method retrieves the data specified by
the query.
• CustomAction - Use this method to run custom
actions you define on the uBAQ.
• FieldUpdate - This method occurs after the user's
change to a field is committed. You can use this
method to perform additional processing against the
changed row. For example, when you enter a part
number, you want the part description field to
populate automatically.
• FieldValidate - This method occurs before the
proposed change to a field is committed. You can use
this method to validate proposed changes. For

250 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

example, you can prevent users from entering an


incorrect value in a certain field such as non-existent
state.
You can monitor each of these methods through BPM
directives.

5. Based on the information you specified on the BPM Update Processing tab, the BAQ Designer generates
the Base Processing directive against Update method. To see the code automatically generated by uBAQ:

6. Expand Ice.EPIC06/SOHeaderUpdate.Update > Base Processing and click on the directive named
##BASE##.

7. Click the Design button.

8. The BPM Workflow Designer displays.

9. In the workflow, click on the DefaultImpl custom code action.

10. Click on the // <autogenerated> ... link in the Actions pane.

11. The Enter Custom Code window displays. Notice the code governs the update process by preparing data,
specifying which columns were selected as updatable, calling UpdateExt method and so on.

12. Exit the Enter Custom Code window and close the BPM Workflow Designer without saving any changes.

13. In the Methods Tree-view, notice the Base Processing directive was also generated for the GetNew method.
This directive was generated as you allowed creating new records through this BAQ by selecting the Allow

10.2.700 251
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

New Record option on the Update > General Properties sheet. This directive is also named #BASE# name
and it contains a C# code with field assignments for new rows.

It is important to understand that when you use the BPM


Update processing method to perform uBAQ updates,
you should not modify the auto-generated #BASE#
directives. Once the query is saved in the BAQ Designer,
these directives are automatically recompiled and any
changes made to them are discarded.
If you need to customize the directive generated by BPM
Update processing, use the Advanced BPM Update
processing method.

Create New Directive


In this task, start building a new Base Processing directive for the FieldUpdate method. Recall this method is
used when you need to perform additional processing against a modified row.

1. In the Updatable BAQ Method Directives window, select the FieldUpdate method.

252 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. From the New menu, select New Base Processing.

You should always create Base Processing directives for


any updatable query methods you want to call.

3. For Directive Name, enter ColumnEvents.

4. Click Design to launch the BPM Workflow Designer.

10.2.700 253
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

5. When you build a complex updatable query, a common practise is to test if BPM is able to identify a certain
event was called. This can be done as follows.
In the BPM Workflow Designer, place the Show Message action on the surface below the Start item.

6. Connect Start to Show Message.

7. Select the Show Message action and click designed.

8. In the Message Template window, in the Name field, enter Test.

9. Delete the default text in the Editor pane and enter Field Name =.

10. Click Insert.

11. From the context menu, select Parameter > fieldName.

12. Click OK to exit the window.

254 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

13. Click Save and Exit to close the Designer.

14. Click the Enable check box to activate the directive.

10.2.700 255
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

15. Save the record.

16. Exit Updatable BAQ Method Directives.

Test Events
Now verify raising of BPM events works.

1. In the BAQ Designer, navigate to the Analyze sheet.

256 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. Click the Get List button to retrieve the existing data.

3. Double-click on any existing row to launch the Fields window. This window contains all of the fields you
indicated were updatable.

4. Notice, that for Customer_CustID, OrderHed_ShipToNum and OrderHed_NeedByDate fields that were
selected to raise BPM events, two additional buttons display. The V button performs the FieldValidate BAQ
method directives; the U button performs the FieldUpdate BAQ method directives described for the field.

These two buttons only display in the BAQ Designer.


When the BAQ is used on a dashboard, these methods
execute automatically.

5. To verify raising of events works, in the Customer_CustID field, enter a customer other than current. For
example, enter Dalton, Addison or Barriston.

6. Click U to fire the FieldUpdate method.

7. Notice the Information Message displays and the field that raised the event, in this case, Customer_CustID
is identified.
You will later use this logic to create several branches within the BPM workflow based on which field called
an event.

8. Click OK to the message and close any other potential messages reported by the method.

10.2.700 257
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

9. Exit the Fields Window.

10. Navigate back to the Workflow Designer. On the Update > Update Processing sheet and click the BPM
Directives Configuration button.

11. Select the ColumnEvents directive.

12. Click Design to launch the BPM Workflow Designer.

258 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

13. Since you verified raising of events works, delete the Show Message action.
Remain in the workflow.

Configure Customer ID Condition


In this task, start building a workflow branch that simulates the process when Customer ID is changed on the
Sales Order Header.

1. First, you need to make sure certain actions are performed only when a CustomerID is changed. To do so,
place the Conditon element below the Start item. Leave an extra space between the Condition and the
Start for another workflow item created later in the process.

10.2.700 259
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Now configure the Condition. In the pane at the bottom, click New and select the pre-built condition
statement:
The specified argument/variable is equal to the specified expression

3. Click the first specified.

4. Select the fieldName argument.

5. Confirm your selection by clicking OK.

6. Click the second specified parameter.

7. In the Specify C# Expression window, enter "Customer_CustID".

8. Click OK to close the Editor.

9. In order to quickly identify the purpose of each workflow item, you can customize it's name. Double-click
the Condition name heading and type Cust ID?.

260 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Configure BO Call
By analyzing the Sales Order tracing log, you found out that three methods - OnChangeofSoldToCreditCheck,
ChangeSoldToId and ChangeCustomer are called when a CustomerID is changed. Revisit the Analyze Tracing
Log topic, if needed. Now call these methods from within the workflow. Start the process by configuring the
OnChangeofSoldToCreditCheck method.

1. Place the Invoke BO Method action below the Cust ID? Condition. This action is found in the Callers
category.

2. The action statement reads:


Invoke specified BO method with specified parameters
Click the first specified to launch the Choose BO Method window.

10.2.700 261
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

3. For Business Object, select Sales Order.

4. Search for and select the OnChangeofSoldToCreditCheck method.

5. Click the second specified to launch the Setup Method Parameters window.

6. Notice the two in (input) parameters pass data into the method. These are required parameters the method
call expects. In both cases, you will supply this data from the internal ttResults table the uBAQ uses.

7. For the iOrderNum parameter, invoke the Binding drop-down list and select expr: specified expression.

8. Click the link to launch the launch the Specify C# expression window. Use this window to compose an
expression assigned to this parameter.

262 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

9. Expand the Temp-tables > ttResults node.

10. Double-click on the OrderHed_OrderNum field. Verify the Editor pane now reads
ttResultsRow.OrderHed_OrderNum.

11. Click OK to exit the Specify C# expression window.

12. Similarly, create another expression for the iCustID parameter and set it to ttResultsRow.Customer_CustID.

10.2.700 263
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

13. Now specify the two out (output) parameters which return data from the method call. Business Object
methods do not require any data from the parameters of this direction.
In this example, for both the cCreditLimitMessage and IContinue parameters, select [ignore].

14. Notice the last parameter of this method named ds (dataset). This parameter uses the INPUT-OUTPUT
direction, which indicates the method receives data from this parameter and potentially returns the updated
data into the variable of the same type. Also, notice the required type is SalesOrderTableSet.

It is important to understand that this variable of TableSet


type is not available in the uBAQ at this moment.
Therefore, you need to create a new variable of this type,
so it becomes available for use within the current directive.

15. For the ds SaledOrderTableSet parameter, click Binding and select create new variable.

16. In the Create new variable window, notice the type of variable required by the Sales Order BO defaults
in. In this case, the type is Erp.Tablesets.SalesOrderTableset.
For Name, enter SalesOrderTS.

17. Click OK in both Create New Variable and Setup Method Parameters windows.

18. To identify which method is called through this action, change the Invoke BO Method heading to Credit
Check.

264 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Fill TableSet Variable


At this stage, the newly created SalesOrderTS variable is empty and no data is prepared for the Business Object
method call. To add data into the directive-level variable of Tableset type, use the Fill Table By Query workflow
action.

1. In this example, the TableSet variable prepares data for all Business Object Methods used across the workflow.
Click the Fill Table By Query action and place it right below the Start item.

2. In the Actions pane, view the statement:


Use the designed query to insert data into the specified table with specified
mapping

3. First, design a BPM query. Click designed to launch the Compose Query window.

4. For Query Name, enter FillSOTableSet.

10.2.700 265
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

5. When you construct the query, you can reference both in-memory tables, known by the Business Object,
such as ttResults and standard database tables such as ERP.OrderHed.
As data is currently in the ttResults table, place this table on the canvas.

6. To finalize the query, click the Display Fields tab and select the columns you want to display in the result
set.

266 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

7. Select the following columns:


• OrderHed_Company
• OrderHed_OrderNum
• Customer_CustID
• OrderHed_CustNum
• OrderHed_BTCustNum
• OrderHed_ShipToCustNum
• OrderHed_PONum
• OrderHed_ShipToNum
• OrderHed_NeedByDate
• OrderHed_RequestDate
• OrderHed_FOB
• OrderHed_ShipViaCode
• OrderHed_TermsCode
• OrderHed_DiscountPercent
• RowMod

At the bottom of the record, all temp tables contain a


column called RowMod. This column defines if a record
has been Added, Updated, Changed, or Deleted.

10.2.700 267
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

8. In the Compose Query window, click OK.

9. Now select the target in-memory table where data from the BPM Query will be inserted. In this example,
you select the directive level variable of the TableSet type you created for this directive.
In the Action phrase, click specified.

10. From the Table drop-down list, scroll down and select SalesOrderTS.OrderHed.

11. Click OK to close the Select Table window.

12. To complete the action, configure how records are mapped to the in-memory table.
Click the specified mapping link.

268 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

13. The Setup Table Mapping window displays, presenting all fields available within the SalesOrderTS.OrderHed
variable.

14. Click the Bind Automatically button. As the result, BPM Query display fields with the matching name and
type are automatically mapped to the corresponding target table columns.

15. In the Setup Table Mapping window, click OK.

16. Connect Start to Fill Table By Query.

10.2.700 269
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

17. Connect Fill Table By Query to the CustID ? condition.

18. Connect the Cust ID ? condition to Credit Check action.

The directive-level variable is now ready for use within the workflow.

Add Remaining Customer Change Methods


Incorporate two additional methods that are called when a CustomerID is changed on the Sales Order Entry form
- ChangeSoldToID and ChangeCustomer.

1. First, configure the ChangeSoldToID method. Place the Invoke BO Method action below the Credit Check
action.

270 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. Click the first specified to launch the Choose BO Method window.

3. Search for and select the Erp.SalesOrder.ChangeSoldToID method.

4. Click OK to exit the Choose BO Method dialog.

5. Click specified to launch the Setup Method Parameters window.

10.2.700 271
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. Notice this method uses a single parameter of SalesOrderTableset type. Click Binding and select the previously
created var: SalesOrderTS variable.

7. Click OK to exit the Setup Method Parameters window.

8. Change the Invoke BO Method action heading to Change Sold To.

272 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

9. Similarly, configure the ChangeCustomer method. Place the Invoke BO Method action below the Change
Sold To action.

10. Click the first specified to launch the Choose BO Method window.

11. Search for and select the Erp.SalesOrder.ChangeCustomer method.

12. Click OK to exit the Choose BO Method dialog.

13. Click specified to launch the Setup Method Parameters window.

10.2.700 273
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

14. Same as above, this method uses a single parameter of SalesOrderTableset type. Bind this parameter to the
var: SalesOrderTS variable.

15. Click OK to exit the Setup Method Parameters window.

16. Change the Invoke BO Method action heading to Change Customer.

274 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

17. Connect the Credit Check action to Change Sold To.

18. Connect the Change Sold To action to Change Customer.

Update ttResults Table


Recall that the purpose of the Fill table by Query action is to create new rows in the SalesOrderTS.OrderHed
variable. To complete the workflow, you need to get these modified rows back from the variable and update
the existing rows in the internal ttResults table. Also, recall the query results of the ttResult table eventually update
the BO's OrderHed table. This way, the updated data becomes available for display and use by the client.
To update the existing ttResult table rows, use the Update Table By Query action:

1. Place the Update Table By Query action below and to the right of the Change Customer method call
action.

10.2.700 275
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. In the Actions pane, view the statement:


Use the designed query to update all rows of specified table with specified
mapping

3. Design a BPM query. You can then use the query rows to update the information within a target table. Click
designed to launch the Compose Query window.

4. For Query Name, enter UpdateResults.

276 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

5. As modified data is currently in SalesOrderTS.OrderHed table, place this table on the canvas.

6. You also need to retrieve data back from two additional tables used on the query. Place the following tables
on the canvas:
• Erp.Customer
• Erp.ShipTo

7. Delete the automatic link between the Erp.Customer and Erp.ShipTo tables.

8. Manually create the relationship between the SalesOrderTS.OrderHed and Erp.Customer tables using
the following fields:

SalesOrderTS_OrderHed field Customer field


Company Company
CustNum CustNum

10.2.700 277
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

9. Create new relationship between the SalesOrderTS.OrderHed and Erp.ShipTo tables using the following
fields:

SalesOrderTS_OrderHed field Ship To field


Company Company
CustNum CustNum
ShipToNum ShipToNum

278 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

10. Click the Display Fields tab and select the following columns to be included in the result set:
• SalesOrderTS_OrderHed_Company
• SalesOrderTS_OrderHed_OrderNum
• SalesOrderTS_OrderHed_CustNum
• SalesOrderTS_OrderHed_PONum
• SalesOrderTS_OrderHed_ShipToNum
• SalesOrderTS_OrderHed_RequestDate
• SalesOrderTS_OrderHed_FOB
• SalesOrderTS_OrderHed_ShipViaCode
• SalesOrderTS_OrderHed_TermsCode
• SalesOrderTS_OrderHed_DiscountPercent
• SalesOrderTS_OrderHed_NeedByDate
• SalesOrderTS_OrderHed_BTCustNum
• SalesOrderTS_OrderHed_ShipToCustNum
• Customer_CustID
• Customer_Name
• Customer_Address1
• Customer_Address2
• Customer_City
• Customer_State
• Customer_Zip

10.2.700 279
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

• ShipTo_Name
• ShipTo_Address1
• ShipTo_Address2
• ShipTo_City
• ShipTo_State
• ShipTo_Zip

11. Click OK to close the Compose Query window.

12. Now select the target in-memory table where data from the BPM Query will be inserted. In the Action phrase,
click specified.

280 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

13. From the Table drop-down list, verify ttResults (queryResultDataSet.Results) defaults in.

14. Click OK to close the window.

15. Now configure how records are mapped to the ttResults table. Click the specified mapping link.

10.2.700 281
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

16. Click the Bind Automatically button to map fields from the variable to the results table.

17. In the Setup Table Mapping window, click OK to close it.

18. Change the action heading to Update ttResults.

282 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

19. Connect the Change Customer method call action to Update ttResults.

Build ShipTo Change Workflow Branch


In this task, build a workflow branch that simulates change of ShipTo location on the Sales Order Entry form.

1. First, make sure this workflow branch executes when the ShipTo number is changed. To do so, place the
Conditon element to the right of the Cust ID? condition.

10.2.700 283
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Select the pre-built condition statement:


The specified argument/variable is equal to the specified expression

3. Click the first specified parameter and select fieldName.

4. Confirm your selection by clicking OK.

5. Click the second specified parameter.

284 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

6. In the Specify C# Expression window, enter "OrderHed_ShipToNum".

7. Click OK.

8. Change the condition heading to Ship To?.

9. Connect the Cust ID? False exit point to the Ship To? condition.

10. Recall the method you need to use to replicate the behavior is ChangeShipToID. Place the Invoke BO
Method action below the Ship To? condition.

11. Click the first specified to launch the Choose BO Method window.

12. Search for and select the Erp.SalesOrder.ChangeShipToID method.

13. Click the specified to launch the Setup Method Parameters window.

10.2.700 285
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

14. For a single parameter used by the method, click Binding and select the previously created SalesOrderTS
variable.

15. Click OK to exit the Setup Method Parameters window.

16. Change the Invoke BO Method action heading to Change Ship To.

286 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

17. Connect the Ship To? True exit point to the Change Ship To action.

18. Again, you need to send data from the SalesOrderTS variable to the ttResults table. To do so, connect the
Change Ship To action to Update ttResults.

Build Ship By Date Assignment Workflow Branch


In this task, build the last workflow branch that handles assignment of a Ship By date, when a Need By date is
selected.

1. Create another condition to check if the Need By date field is updated on the form. Place the Conditon
element below and to the right of the Ship To? condition. Configure the Condition as follows:

2. Select the pre-built condition statement:


The specified argument/variable is equal to the specified expression

3. Click the first specified parameter.

4. In the Select an Argument/Variable window, select fieldName.

5. Confirm your selection by clicking OK.

6. Click the second specified parameter.

10.2.700 287
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

7. In the Specify C# Expression window, enter "OrderHed_NeedByDate" and confirm.

8. Change the condition heading to Need By?.

9. Connect the Ship To? False exit point to the Need By? condition.

288 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

10. Recall the method that gets called is ChangeNeedByDate. Place the Invoke BO Method action below the
Need By? condition.

11. Click the first specified to launch the Choose BO Method window.

12. Search for and select the Erp.SalesOrder.ChangeNeedByDate method.

13. Click specified to launch the Setup Method Parameters window.

10.2.700 289
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

14. For the ds (dataset) parameter used by the method, click Binding and select the previously created
SalesOrderTS variable.

15. For the iTableName parameter, invoke the Binding drop-down list and select expr: specified expression.
Recall this parameter requires the OrderHed table name passed in. Create a C# expression; in the Editor
pane, enter "OrderHed".

16. Now that both parameters are configured, click OK to exit the Setup Method Parameters window.

290 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

17. Change the Invoke BO Method action heading to Change Need By.

18. Connect the Need By? True exit point to the Change Need By action.

19. Send data from the SalesOrderTS variable to the ttResults table. To do so, connect the Change Need By
action to Update ttResults.

Complete the Directive

1. The workflow is now ready for testing. Click Save and Exit to close the BPM Workflow Designer.

10.2.700 291
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Save the directive.

292 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

3. Exit Updatable BAQ Method Directives.

Test BAQ Results


In this task, verify the query works as expected.

1. In the BAQ Designer, select the Analyze tab.

2. Click the Get List button and verify the query retrieves existing order headers.

3. Now test raising of events. Click Get New.

4. Double-click the empty row at the bottom of the Query Results grid to invoke the Fields window.

5. In the Customer_CustID field, enter Dalton and press Tab.

10.2.700 293
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. Click the U (update) button to call Field Update event.

7. Verify the operation completes successfully. To the message, click OK.

8. Notice the default information for the customer Dalton, such as Customer Number, Ship To location and
Terms Code default in.
Now test raising of another event. In the OrderHed_NeedByDate field, select today's date.

294 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

9. Click the U button and verify the OrderHed_RequestDate automatically fills in.

10. Close the Fields window by clicking OK.

11. Now test if you can create the new sales order record. Click Update and verify the operation succeeds.

10.2.700 295
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

12. Lastly, test the Ship To location change. Click Get List and double-click the new order line to invoke the
Fields window.

296 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

13. In the OrderHed_ShipToNum field, enter a non-existent ShipTo location. For example, enter Plant123.

14. Click the U button and verify the Invalid Ship To error message displays.

15. Now enter a valid ShipTo location for the customer Dalton by changing the value to Plant2.

10.2.700 297
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

16. Click the U button and verify the Field Update operation completes successfully.

17. Exit the Fields window and notice the ShipTo address on the grid is changed.

298 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

18. Save the query.

The query is now ready for users, for example, on a dashboard.


This case study demonstrates how you can create or update a sales order header record using a BAQ. However,
you can apply the same process on any other action, for example, to update sales order lines.
Try to avoid building very complex updatable queries that simulate each and every action a user performs on
a smart client form. Instead, try to make your BAQs simple and understandable to your users.
Also, it is often better to have a series of smaller BAQs you can manipulate through a dashboard, rather than
one huge BAQ that requires a lot of processing time to pull in its data.

Using Inner SubQueries

In this case study, create a BAQ that counts open, closed, and total amount of orders per customer. Create two
SubQueries that count open and closed orders and group them together by customer. The information obtained
by the Inner SubQueries is presented by the TopLevel SubQuery.

Create Open Orders SubQuery


The first SubQuery you create counts open orders by customer.

1. Click New.

10.2.700 299
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. In the Query ID field, enter OrderCount.

3. In the Description field, enter Order Count per Customer.

4. Select the Shared check box.

5. Navigate to the Query Builder > Phrase Build sheet.

6. In the filtering field, enter ord.

300 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

7. From the list, select the Erp.OrderHed table and drag and drop it onto the canvas in the center pane.

8. Verify the Table Criteria sheet at the bottom is in focus.

9. Click New.

10. From the Field list, select OpenOrder.

11. In the Operation column, verify Equal To (=) defaults.

12. From the Filter Value list, select the specified constant option.

13. Click the word specified.


The Specify Value window displays.

14. In the Value field, enter True and click OK.


This limits the query selection to open orders.

Select Columns

1. Navigate to the Display Fields > Column Select sheet.

2. Expand the OrderHed node.

3. Double-click CustNum to add the OrderHed_CustNum field to the list of Display Column(s).

4. Select the Group By check box to indicate you want to group open orders by customer.

5. Click the Calculator icon.

10.2.700 301
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

The Calculated Field Editor window displays.

6. In the Field Name field, enter CountOpen and press Tab.

7. From the Data Type list, select int.

8. In the Functions area, expand the Aggregate node.

9. From the Aggregate listing, select Count(x).


Selecting the function displays the function syntax in the Editor field. In this query, the field counts the
amount of open orders.

10. To indicate you want to count all open order records, inside the brackets, enter * (asterisk).

11. Verify the Editor pane displays the following:


count( * )

12. Click Save and exit the Calculated Field Editor.

13. Navigate to the Query Builder > SubQuery Options sheet.

14. For SubQuery1 you just created, from the Type list, select InnerSubQuery.
This indicates this SubQuery becomes a nested query inside the TopLevel BAQ you create later.

302 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

15. Click Save.

Create Closed Orders SubQuery


The second SubQuery you create counts closed orders by customer.

1. On the Active SubQuery toolbar, click Add Subquery.

2. On the Query Builder > SubQuery Options sheet, accept the following defaults:

Name Type
SubQuery2 InnerSubQuery

3. Navigate to the Query Builder > Phrase Build sheet.

10.2.700 303
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

4. In the filtering field, enter ord.

5. From the list, select the Erp.OrderHed table and drag and drop it onto the canvas in the center pane.

6. In the Specify Table Alias window, click OK.

The BAQ Designer must create the table alias for the
OrderHed table since it is already used in the previous
SubQuery.

7. Verify the Table Criteria sheet at the bottom is in focus.

8. Click New.

9. From the Field list, select OpenOrder.

10. In the Operation column, verify Equal To (=) defaults.

11. From the Filter Value list, select the specified constant option.

12. Click the word specified.


The Specify Value window displays.

13. In the Value field, enter False and click OK.


This limits the query selection to closed orders.

304 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Select Columns

1. Navigate to the Display Fields > Column Select sheet.

2. Expand the OrderHed1 node.

3. Select CustNum to add OrderHed1_CustNum to the list of Display Column(s).

4. Select the Group By check box to indicate you want to group closed orders by customer.

5. Click the Calculator icon.

6. Click New.

7. In the Field Name field, enter CountClosed and press Tab.

8. From the Data Type list, select int.

9. In the Editor pane, manually add the calculation that counts all closed orders.
count( * )

10. Click Save and exit the Calculated Field Editor.

Create TopLevel SubQuery


Create the main SubQuery that displays the BAQ results using both inner SubQueries.

1. On the Active SubQuery toolbar, click Add Subquery.

2. Navigate to the Query Builder > SubQuery Options sheet.

3. For SubQuery3, from the Type list, select TopLevel.

10.2.700 305
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

4. Navigate to the Query Builder > Phrase Build sheet.

5. Search for and add the Erp.Customer table onto the canvas in the center pane.

6. Click the SubQueries button to display the list of available SubQueries.

7. Drag and drop both SubQuery1 and SubQuery2 onto the canvas.

8. Click the Add Connection (chain links) icon.


The cursor turns into a cross-hair.

9. Click the Erp.Customer table and drag a line to the SubQuery1 table, then release.

10. Verify the Table Relations sheet at the bottom displays.

306 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

If not, select the sheet.

11. Click the Add Row button.

12. From the Customer field or any expression list, select CustNum.

13. From the SubQuery1 field or any expression list, select OrderHed_CustNum.

14. Repeat steps 8 - 13 to create a connection between the Erp.Customer and SubQuery2 tables.

15. Click Save.

Select BAQ Display Columns

1. Navigate to the Display Fields > Column Select sheet.

10.2.700 307
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Expand the Customer node and move the Name field to the list of Display Column(s).

3. Expand the SubQuery1 node and move the Calculated_CountOpen field to the list of Display Column(s).

4. Expand the SubQuery2 node and move the Calculated_CountClosed field to the list of Display Column(s).

5. Click the Calculator icon.


The Calculated Field Editor window displays.

6. In the Field Name field, enter Total and press Tab.

308 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

7. From the Data Type list, select int.

8. In the Fields pane, expand the Available Tables > SubQuery1 node.

9. Double-click Calculated_CountOpen to add the field to the Editor pane.

10. In the Editor pane, click + (plus).

11. In the Fields pane, expand the Available Tables > SubQuery2 node.

12. Double-click Calculated_CountClosed to add the field to the Editor pane.


Verify the Editor pane displays the following calculation:
SubQuery1.Calculated_CountOpen + SubQuery2.Calculated_CountClosed

13. Click Save and exit the Calculated Field Editor.

Test the BAQ

1. Navigate to the Analyze sheet.

10.2.700 309
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Click Test.

The BAQ displays open, closed, and total amount of orders per customer.

Combine Results Sets Using Union

This case study demonstrates how to build a BAQ that displays total value breakdown of sales for a given day.
This BAQ provides information on total values of:
• Quotes entered in the sales pipeline.
• Orders booked in the system.
• Invoices sent to customers.

310 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

You accomplish this task by creating a BAQ comprised of three SubQueries and combining their results into one
dataset.

Create TopLevel BAQ

1. On the Standard toolbar, click New.

2. In the Query ID field, enter SalesValue.

3. In the Description field, enter Total Value of Quotes, Orders, Invoices by Date.

4. Select the Shared check box.

5. Navigate to the Query Builder > Phrase Build sheet.

10.2.700 311
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. Drag and drop the following tables onto the designer canvas:
• Erp.QuoteHed
• Erp.Customer

7. Navigate to the Display Fields > Column Select sheet.

312 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

8. Move the following columns to the Display Column(s) list.

Column Name
QuoteHed_Company
Customer_Name
QuoteHed_QuoteNum
QuoteHed_EntryDate

9. For each of the above columns, select the Group By check box.

10. Click the Calculator icon.


The Calculated Field Editor window displays.

11. Click New and enter these field values:

Field Value
Field Name SubQueryName
Data Type nvarchar
Label Document Type
Editor pane 'Quotes'

12. Click Save.

10.2.700 313
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

13. Click New.

14. Enter these field values:

Field Value
Field Name QuoteSum
Data Type decimal
Label Total Value

15. In the Functions area, expand the Aggregate node and double-click Sum(x).

16. In the Fields section, expand the Available tables > QuoteHed node and double-click QuoteAmt.
Verify the Editor displays the following calculation:
sum( QuoteHed.QuoteAmt )

17. Click Save and exit the Calculated Field Editor.

18. Move the Calculated_SubQueryName column up and make it the first column in the list.

314 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

19. Navigate to the Analyze sheet and click Test.


Verify the query returns the list of quotes.

Create Order View SubQuery

1. Navigate to the Query Builder > SubQuery Options sheet.


You first change the name of the TopLevel SubQuery in focus.

10.2.700 315
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. In the Name field, enter QuoteHed.

3. Click Save.

4. On the Active SubQuery toolbar, click Add Subquery.

5. In the Name field, enter OrderHed.

6. From the Type list, select Union.

316 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

7. Navigate to the Query Builder > Phrase Build sheet and drag and drop the following tables on the designer
canvas:
• Erp.OrderHed
• Erp.Customer

Since the Customer table is already used in the BAQ definition, accept the proposed table alias.

Example
By default, the table name defaults to Customer1.

8. Navigate to the Display Fields > Column Select sheet and move the following columns to the Display
Column(s) list:

Column Name
OrderHed_Company
Customer1_Name
OrderHed_OrderNum
OrderHed_OrderDate

10.2.700 317
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

9. For each of the above columns, select the Group By check box.

10. Click the Calculator icon.


The Calculated Field Editor window displays.

11. Click New and enter these field values:

Field Value
Field Name SubQueryName1
Data Type nvarchar
Label Document Type
Editor pane 'Orders'

318 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

12. Click Save.

13. Click New.

14. Enter these field values:

10.2.700 319
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Field Value
Field Name OrderSum
Data Type decimal
Label Total Value

15. In the Functions pane, expand the Aggregate node and double-click Sum(x).

16. In the Fields pane, expand the Available tables > OrderHed node and double-click OrderAmt.
Verify the Editor pane displays the following calculation:
sum( OrderHed.OrderAmt )

17. Click Save and exit the Calculated Field Editor.

18. Move the Calculated_SubQueryName1 column up and make it the first column in the list.

Recall the number and the order of the columns is the


same as specified in the TopLevel SubQuery.

19. Click Save.

320 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Create Invoice View SubQuery

1. Navigate to the Query Builder > SubQuery Options sheet.

2. On the Active SubQuery toolbar, click Add Subquery.

3. In the Name field, enter InvcHed.

4. In the Type field, select Union.

5. Navigate to the Query Builder > Phrase Build sheet and drag and drop the following tables onto the
designer canvas:
• Erp.InvcHead
• Erp.Customer
Accept the proposed Customer table alias.

6. Navigate to the Display Fields > Column Select sheet and move the following columns to the Display
Column(s) list.

Column Name
InvcHead_Company
Customer2_Name
InvcHead_InvoiceNum
InvcHead_InvoiceDate

7. For each of the above columns, select the Group By check box.

8. Click the Calculator icon.


The Calculated Field Editor window displays.

9. Click New and enter these field values:

Field Value
Field Name SubQueryName2
Data Type nvarchar

10.2.700 321
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Field Value
Label Document Type
Editor pane 'Invoices'

10. Click Save.

11. Click New.

12. Enter these field values:

Field Value
Field Name InvoiceSum
Data Type decimal
Label Total Value

13. In the Functions pane, expand the Aggregate node and double-click Sum(x).

14. In the Fields pane, expand the Available tables > InvcHead node and double-click InvoiceAmt.
Verify the Editor pane displays the following calculation:
sum( InvcHead.InvoiceAmt )

15. Click Save and exit the Calculated Field Editor.

16. Move the Calculated_SubQueryName2 column up and make it the first column in the list.

322 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

17. Click Save.

Create Query Parameter


Create a Query Parameter to filter the data using an alternative parameter value you define. In this example, you
would like to filter results by date. When you launch the BAQ, the parameter value displays for input.

1. From the Actions menu, select Define Parameters.

The Query Parameters window displays.

2. In the Parameter Name field, enter Date.

10.2.700 323
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

3. From the Data Type list, select date.

4. Accept the default values and click Save.

5. Close the Query Parameters window.


You now define which BAQ fields you want to filter by date.

6. Navigate to the Query Builder > Phrase Build sheet.

7. On the design canvas, click the Erp.InvcHead table.

8. At the bottom of the screen, verify the Table Criteria sheet displays.

324 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

9. Click the Add Row button.

10. From the Field list, select InvoiceDate.

11. In the Operation column, verify Equal To (=) defaults.

12. From the Filter Value list, select the specified parameter option.

13. Click the word specified.


The Select Parameter window displays.

14. Verify the Date parameter you created is highlighted and click Select.

15. Repeat steps 7 - 14 to apply the same filter to the OrderHed and QuoteHed SubQueries. To switch between
SubQueries, use the Active SubQuery toolbar.
Use the table below for reference:

Table Field Operator Filter Value


Erp.OrderHed OrderDate = @Date parameter
Erp.QuoteHed EntryDate = @Date parameter

16. Once finished, click Save.


You can now test the BAQ execution.

Test the BAQ

1. Navigate to the Analyze sheet.

10.2.700 325
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Click the Test to invoke the Parameters window.

3. Enter the Date for which you want to retrieve records.

4. Click OK.

5. The grid populates with records.

6. Right-click anywhere in the grid and select Show Group By and Show Summaries.

7. Drag the Document Type column to the pane above the grid.

8. In the Total Value header, click the Sigma (∑) icon.

326 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

9. In the Select Summaries window, select Sum.

10. Click OK.

11. You BAQ results are now broken down by Quotes, Orders, and Invoices with their total values for a given
day.

10.2.700 327
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Advanced Data Aggregation

This case study demonstrates how you can use the advanced Group By expression to view total value of sales
orders and quotes per country and customer.
In order to gather correct aggregate results from more than one table in the query, the following approach is
used:
• Each table combination and aggregate calculation is performed within individual inner SubQueries.
• The whole query results are presented using the Top Level Subquery.

Create Order View SubQuery

1. Create a new Business Activity Query.

2. Select the SubQuery Options sheet.

3. For Type, select InnerSubQuery.

4. Place the Erp.Customer and Erp.OrderHed tables on the canvas.

328 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

5. Accept the default relation between the tables but for the Join Type, select Right Join.
This eliminates customers who have not placed any orders to appear on the list of query results.

6. In this example, a filter is placed on the Customer table to only retrieve records from Mexico and Canada.

10.2.700 329
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

7. For the Display Column(s), select the Customer_Country and Customer_CustID columns.

330 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

8. Now create a calculated field that summarizes the total amount of orders placed by customers. Click the
Calculated Field Editor button.

9. Click New and for the Field Name, enter TotalOrder.

10.2.700 331
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

10. For Data Type, select decimal.

11. In the Editor pane, create the following calculation to summarize order values:
sum( OrderHed.OrderAmt )

12. Save the record.

13. Access the Advanced Group By Clause Editor by clicking on a button found at the bottom of the screen.

332 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

14. Similar to the Calculated Field Editor, the window contains lists of available fields, functions, and operators.
You can add these items to an expression by either double-clicking them or dragging and dropping them
onto the editor window's Expression Editor field. Click Add Row to create a new expression.

10.2.700 333
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

15. At the top of the Functions node, notice the Group By category displays.
The ROLLUP, CUBE, and GROUPING SETS operators found in this category represent advanced aggregation
extensions of the GROUP BY clause.

Function Description
ROLLUP
The ROLLUP operator is useful in generating reports that contain subtotals and totals. It
generates a result set that shows aggregates for a hierarchy of values in the selected columns.
The resulting SQL syntax may look similar to the following:
SELECT a, b, c, SUM ( <expression> )
FROM T
GROUP BY ROLLUP (a,b,c);
As a result, one row with a subtotal is generated for each unique combination of values of
(a, b, c) , (a, b) , and (a). A grand total row is also calculated.

CUBE
Generates simple GROUP BY aggregate rows, the ROLLUP super-aggregate rows, and
cross-tabulation rows. CUBE outputs a grouping for all permutations of expressions in the
<composite element list>.
The resulting SQL syntax may look similar to the following:
SELECT a, b, c, SUM (<expression>)
FROM T
GROUP BY CUBE (a,b,c);
As a result, one row is produced for each unique combination of values of (a, b, c) , (a, b)
, (a, c) , (b, c) , (a), (b), and (c) with a subtotal for each row and a grand total row.
GROUPING
Specifies multiple groupings of data in one query. Only the specified groups are aggregated
SETS
instead of the full set of aggregations that are generated by CUBE or ROLLUP. The results
are the equivalent of UNION ALL of the specified groups. GROUPING SETS can contain a
single element or a list of elements. GROUPING SETS can specify groupings equivalent to
those returned by ROLLUP or CUBE. The <grouping set item list> can contain ROLLUP or
CUBE.
The resulting SQL syntax may look similar to the following:
SELECT a, b, SUM (<expression>)
FROM T
GROUP BY GROUPING SETS ((a),(b))

For more information on the above operators, review the available Microsoft® documentation, for example:
• http://technet.microsoft.com/en-us/library/bb522495(v=sql.105).aspx
• http://technet.microsoft.com/en-us/library/ms177673.aspx
• http://blogs.msdn.com/b/craigfr/archive/2007/10/11/grouping-sets-in-sql-server-2008.aspx

In this example, expand Functions > Group By and double-click the ROLLUP function. This function
generates an output that presents subtotals and totals.

16. For Group By expression fields, from the Customer table, select Customer.Country and Customer.CustID
fields, separated by a comma.
The Group By expression should now read:
ROLLUP( Customer.Country, Customer.CustID )

334 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

17. Click OK to exit the editor.


The first SubQuery is now prepared.

Create Quote View SubQuery


Similarly, create another SubQuery to display the total value of quotes per country and customer.

1. Navigate to the SubQuery Options sheet, and Add New SubQuery.

2. For Type, select InnerSubQuery.

3. Place the Erp.Customer and Erp.QuoteHed tables on the canvas.

10.2.700 335
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

4. Accept the default relation between the tables. Same as for orders, for the Join Type, select the Right Join
to eliminate customers for whom no quotes have been created yet.

5. Again, from the Customer table, apply a filter to only retrieve customers from Mexico and Canada.

336 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

6. Same as before, for the Display Column(s), select the Customer_Country and Customer_CustID columns.
Create another calculated field named Total Quote that summarizes the total amount of quotes placed by
customers. This time, the expression should read:
sum(QuoteHed.QuoteAmt)

10.2.700 337
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

7. Click the Advanced Group By Clause Editor button to aggregate results for this SubQuery.

8. Create the same ROLLUP expression using the Country and Customer ID columns, separated by a comma.
The Group By expression should read:
ROLLUP( Customer1.Country, Customer1.CustID )

338 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

9. Click OK to close the editor.


Now, the second SubQuery is prepared.

Create TopLevel Subquery

1. Navigate to the SubQuery Options sheet, and Add New SubQuery.

10.2.700 339
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. For Type, verify TopLevel displays.

3. This TopLevel SubQuery will display combined results from both previously created SubQueries. Select the
Query Builder > Phrase Build sheet and click the SubQueries button.

340 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

4. Place both inner SubQueries on the canvas.

5. Now it's time to select which fields will be displayed by the query. In this example, values in the Customer
ID and Coutry fields will be constructed using the SQL COALESCE syntax. The expression you create evaluates
the arguments in order and returns the current value of the first expression that initially does not evaluate
to NULL.
Click the Calculated Field Editor button.

10.2.700 341
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. Click New and enter a Field Name, for example, Cust ID.

342 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

7. For Data Type and Format, use the default database attributes for this field - nvarchar x(10).

8. Now enter a label, for example, Customer ID.

9. In the Editor pane, type coalesce (). Inside the brackets, place function arguments. In the Fields pane, search
for and select both Customer ID fields from inner SubQueries. Remember to separate parameters by a
comma. The whole expression should read:
coalesce(SubQuery1.Customer_CustID, SubQuery2.Customer1_CustID)

10. Click New and create another calculated field to display values in the Country column. Make sure the
expression looks as follows:
coalesce(SubQuery1.Customer_Country, SubQuery2.Customer1_Country)

11. Click Save and exit the editor.

12. Now to the list of Display columns, add both calculated fields from inner SubQueries that aggregate total
values of orders and quotes.

10.2.700 343
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

13. One additional step is required when building this query. Create SubQuery criteria to provide equality of
Customer ID and Country fields. Also, you need build separate conditions to make sure SQL null value in
one field is not equal to null value in another field. These null values will appear in total lines produced by
the ROLLUP aggregation.
The criteria for the TopLevel Subquery should look as follows:

344 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

14. Save the Query.

Test the BAQ


The BAQ is now ready for testing.

1. Navigate to the Analyze sheet and click Test.

2. Notice the total values are summarized by each customer (aggregate rows), sub-totals rows for each country
with the grand total value displaying at the bottom.

3. Now let's test how query results change using the GROUPPING SETS operator. In both inner SubQueries,
modify the Group By expression as follows:
GROUPING SETS( Customer.Country,Customer.CustID )

10.2.700 345
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

4. As a result, data is now grouped by sets of customers and countries.

5. Lastly, let's test how BAQ results change when the CUBE function is used to construct the GROUP BY clause.
Modify both expressions as follows:
CUBE( Customer.Country,Customer.CustID )

346 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

6. Notice the CUBE operator outputs a grouping for all permutations of expressions in the composite element
list.

10.2.700 347
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Intersect and Except SubQuery Type

You can use the UNION, EXCEPT, and INTERSECT operators to combine more than one SELECT statement to
form a single result set. The UNION operator returns all rows. The INTERSECT operator returns all rows that are
in both the result sets. The EXCEPT operator returns the rows that are only in the first result set but not in the
second one.
In the previous case study - Combine Results Sets - you learned how to use the UNION operator to combine
results of multiple SubQueries into a single result set. In this case study, learn how to intersect the results of two
SubQueries and use the EXCEPT operator to retrieve the query result set where data exists in the first SubQuery
and not in the second one.

Create TopLevel BAQ

1. Click New.

2. In the Query ID field, enter CustomerOrders.

3. In the Description field, enter Orders By Customer.

4. Select the Shared check box.

5. Navigate to the Query Builder > Phrase Build sheet.

348 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

6. Place the following tables on the designer canvas:


• Erp.OrderHed
• Erp.Customer

7. Highlight the Erp.Customer table.

8. The Table Criteria sheet automatically displays.

9. Click Add Row.


A row appears in the Criteria grid

10. Create the following criteria. To set the Filter Value, use the specified constant option.

And/Or ( Not Field Operation Filter Value )


Country = USA constant
Or Country = CANADA constant

11. Navigate to the Display Fields > Column Select sheet.

10.2.700 349
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

12. Move the following columns from the Available Columns area to the Display Column(s) area:
• Customer_CustID
• Customer_Country
• OrderHed_OrderNum

13. Click Save.

14. You are ready to test the query. Navigate to the Analyze sheet.

350 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

15. Click the Test button.

16. In this example, the BAQ returns order records from customers based in the USA or Canada.

Create Intersect SubQuery

1. Navigate to the Query Builder > SubQuery Options sheet.

10.2.700 351
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. On the Active SubQuery toolbar, click Add Subquery.

3. From the Type list, select Intersect.

4. Navigate to the Query Builder > Phrase Build sheet.

352 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

5. Place the following tables on the designer canvas:


• Erp.OrderHed
• Erp.Customer
Accept the new field Aliases of tables already used in the TopLevel SubQuery.

6. Highlight the Erp.Customer table.

7. The Table Criteria sheet automatically displays.

8. Click Add Row.


A row appears in the Criteria grid.

9. Create the following criteria. To set the Filter Value, use the specified constant option.

And/Or ( Not Field Operation Filter Value )


Country = GERMANY constant
Or Country = CANADA constant

10. Navigate to the Display Fields > Column Select sheet.

10.2.700 353
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

11. Move the following columns from the Available Columns area to the Display Column(s) area:
• Customer1_CustID
• Customer1_Country
• OrderHed1_OrderNum

12. Click Save.

13. You are ready to test the query. Navigate to the Analyze sheet.

354 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

14. Click the Test button.

15. In this example, the BAQ returns order records from customers based in Canada.

Use the INTERSECT operator to return only values that


match within both data sets, as shown in the following
illustration.

10.2.700 355
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Use Except SubQuery Type

1. Navigate to the Query Builder > SubQuery Options sheet.

2. For SubQuery2, from the Type list, select Except.

3. Click Save.

4. Now test how the BAQ results change. Navigate to the Analyze sheet.

356 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

5. Click Test.

6. In this example, the BAQ returns 285 order records from customers based in USA.

The SQL EXCEPT operation is used to combine two SELECT


statements and returns rows from the first SELECT
statement that are not returned by the second SELECT

10.2.700 357
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

statement. This means EXCEPT returns only rows not


available in the second SELECT statement.

Common Table Expression Query

A Common Table Expression (CTE) can be thought of as a temporary result set defined within the execution
scope of a single SELECT (or may serve as a SubQuery, instead of SELECT). Returning hierarchical data is a common
use of recursive queries.

Example You can construct a query displaying employees in


an organizational CTE chart.

A CTE query contains three SubQueries in this order:


• Anchor Common Table Expression - This SubQuery is the starting point that acts as the base to enable the
process of recursion in the CTE. It provides the base data for the rest of the process for fetching the data.
• UnionAll SubQuery - This SubQuery references the Anchor Common Table Expression. After the anchor
query executes, the result set is generated by the anchor query as an input for the recursive query and is joined
with the recursive query to generate new results. Then, a new result set is created and is again joined with
the recursive query, and further results are generated. This process continues until all the records are processed,
which means until further joins return no data.
• TopLevel SubQuery - Pulls data from a Common Table Expression and displays BAQ results.

Create CTE SubQuery


In this example, the query result displays the data in a bill of materials scenario in which a parent product has
one or more components, and those components may, in turn, have subcomponents or may be components of
other parents. The BAQ uses a part number as a query parameter.
First, you specify parameters of the anchor CTE query.

1. Click New.

358 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. In the Query ID field, enter IndentBOM.

3. In the Description field, enter BOM Listing.

4. Select the Shared check box.

5. Navigate to the Query Builder > SubQuery Options sheet.

6. From the Type list, select CTE.

7. Navigate to the Query Builder > Phrase Build sheet.

10.2.700 359
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

8. Place the Erp.PartMtl table onto the canvas in the center pane.

9. Click Save.

Create Query Parameter


Create a Query Parameter to filter the data using an alternative parameter value you define. In this example, you
would like to filter results by part numbers. When you launch the BAQ, the parameter value displays for input.

1. From the Actions menu, select Define Parameters.


The Query Parameters window displays.

2. In the Parameter Name field, enter PartNum.

360 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

3. From the Data Type list, select nvarchar.

4. In the Format field, enter x(50).

5. Accept the default values and click Save.

6. Close the Query Parameters window.

7. You now define which BAQ fields you want to filter by the parameter you specified. Navigate to the Query
Builder > Phrase Build > SubQuery Criteria sheet.

10.2.700 361
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

8. From the Table list, select PartMtl.

9. From the Field list, select PartNum.

10. In the Operation column, verify the Equal To (=) defaults.

11. From the Filter Value list, select the specified parameter option.

12. Verify the PartNum parameter you created is highlighted and click Select.

13. Click Save.

Select Columns

1. Navigate to the Display Fields > Column Select sheet.

362 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. Move the following columns from the Available Columns area to the Display Column(s) area:
• PartMtl_Company
• PartMtl_PartNum
• PartMtl_RevisionNum
• PartMtl_MtlSeq
• PartMtl_MtlPartNum
• PartMtl_QtyPer
• PartMtl_RelatedOperation
• PartMtl_PullAsAsm
• PartMtl_ViewAsAsm
• PartMtl_PlanAsAsm
Now you are ready to build the BOM Level hierarchy calculated field and Indentation calculated field.

3. Click the Calculator icon to display the Calculated Field Editor.

4. Click New.

10.2.700 363
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

5. In the Field Name field, enter Hierarchy and press Tab.

6. From the Data Type list, select int.

7. In the Label field, enter BOM Level.

8. In the Editor, enter 0.

This is how you establish the start - anchor of the


recursion: parts with BOM Level 0 are on this level.

9. Click New.

364 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

10. In the Field Name field, enter Ind1 and press Tab.

11. From the Data Type list, select nvarchar.

12. In the Editor pane, enter the following code that calculates the indentation level of subassembly parts:
cast ( substring('........',1 ,(Hierarchy + 1) ) + PartMtl.MtlPartNum
as nvarchar(25))

13. Click Save.


Now you are ready to configure the UnionAll recursive SubQuery.

Define UnionAll SubQuery

1. Navigate to the Query Builder > SubQuery Options sheet.

10.2.700 365
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. On the Active SubQuery toolbar, click Add Subquery.

3. In the Name field, accept the default of SubQuery2.

4. From the Type list, select UnionAll.

5. Navigate to the Query Builder > Phrase Build sheet.

366 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

For SubQuery2, you use the PartMtl table again, but this time you join it with CTE SubQuery1.

6. Place the Erp.PartMtl table and SubQuery1 on the canvas.


Accept the new Aliases the BAQ creates.

7. To switch tables and subqueries, use the buttons above the list of tables.

8. Create a manual connection between the two tables using the Add Connection (chain links) button.

9. Use the following fields to create an inner join between the tables:

SubQuery1 field = PartMtl1 field


PartMtl_MtlPartNum = PartNum
PartMtl_Company = Company

10. Click Save.

Select Columns

1. Navigate to the Display Fields > Column Select sheet.

When using SubQueries of the Union, UnionAll, Intersect,


or Except type, the number and the order of the columns
must be the same in all SubQueries.

2. Move the following columns from the Available Columns area to the Display Column(s) area:
• PartMtl1_Company
• PartMtl1_PartNum
• PartMtl1_RevisionNum

10.2.700 367
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

• PartMtl1_MtlSeq
• PartMtl1_MtlPartNum
• PartMtl1_QtyPer
• PartMtl1_RelatedOperation
• PartMtl1_PullAsAsm
• PartMtl1_ViewAsAsm
• PartMtl1_PlanAsAsm
Now you are ready to build the calculated field to increment the BOM Level hierarchy.

3. Click the Calculator icon to display the Calculated Field Editor.

4. Click New.

5. In the Field Name field, enter Hierarchy2 and press Tab.

6. From the Data Type list, select int.

7. In the Label field, enter BOM Level.

8. In the Editor pane, enter Calculated_Hierarchy + 1.

This is how you increment the hierarchy. As the SubQuery


goes down through the assemblies, each subassembly is
placed on the respective BOM Level.

9. Click New to create another calculated field. The Indentation you create references the UnionAll SubQuery
Aliases. Otherwise, it is similar to the one created within the CTE SubQuery.

368 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

10. In the Field Name field, enter Ind2 and press Tab.

11. From the Data Type list, select nvarchar.

12. In the Editor pane, enter the following code that calculates the indentation level of subassembly parts.
cast ( substring('........',1 ,(Hierarchy2 + 1) ) + PartMtl1.MtlPartNum
as nvarchar(25))

13. Click Save.


Now you are ready to configure the TopLevel SubQuery.

Create TopLevel SubQuery

1. Navigate to the Query Builder > SubQuery Options sheet.

10.2.700 369
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. On the Active SubQuery toolbar, click Add Subquery.

3. In the Name field, accept the default of SubQuery3.

4. From the Type list, select TopLevel.

5. Navigate to the Query Builder > Phrase Build sheet.

In the TopLevel SubQuery3, you display data from the CTE SubQuery1.

370 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

6. From the list of SubQueries, select SubQuery1 and place it on the canvas. Accept the new Alias the BAQ
creates.

7. Navigate to the Display Fields > Column Select sheet.

8. Move all the columns from the SubQuery11 to the Display Column(s) area

9. Click Save.
You are now ready to test the query.

Test the BAQ

1. Navigate to the Analyze sheet.

10.2.700 371
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Click the Test to invoke the Parameters window.

3. In this example, in the PartNum field, enter DCD-200-ML.

4. Click OK.

5. The grid populates with data.

372 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

6. To display the hierarchy, group the BAQ results by the BOM Level and Indentation (Ind1) columns.

10.2.700 373
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Now the BAQ results are broken down by levels. The BOM Level 0 displays the parent part - in this case
DCD-200-ML with its subassemblies showing on their respective levels within the Bill of Material.

BAQ Combo

Use this customization tool to create a drop-down list which displays information from a selected business activity
query (BAQ).
After you customize the form and draw the BAQCombo, indicate the specific BAQ and the ValueMember column
which holds the data. You then define the DisplayMember column the customization uses to display the data
during run time on the form.
Note you can create updatable BAQs which allow users to enter data directly into a business object. On the
updatable BAQ, you can define one of the updatable columns to use a BAQCombo. Users can then enter data
through this drop-down list.

Define the Query


Define the source query:

374 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

1. In the Business Activity Query Designer, click the New button.

2. In the Query ID field, enter CustomerParts.

3. In the Description field, enter Parts Listing.

4. Select the Shared check box to indicate other users within the current company can use this query.

5. Click the Query Builder > Phrase Build tab.

10.2.700 375
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. Add Erp.OrderDtl and Erp.Customer tables on the designer canvas.

7. Navigate to the Display Fields > Columns Select sheet.

8. Click Calculated Field Editor to add new calculated field.

9. In the Calculated Field Editor, click New. In this example, you create a query that displays the list of customers
and part numbers from the OrderDtl table.

376 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

10. In the Field Name field, enter the name of the field, for which you create the calculation. In this example,
enter CustomerPart.

11. From the Data Type drop-down list, select the data type generated by this calculation. In this example,
select nvarchar.

12. Extend the Format field value to display x(60).

13. For the Label, that displays above this calculated field's column header on the BAQ grid, enter Cust Part.

14. In the Editor pane, create the following calculation:


Customer.CustID + ': ' + OrderDtl.PartNum

15. Click Save and exit the editor.

16. Navigate to the Analyze sheet.

10.2.700 377
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

17. Click the Test button and verify the BAQ results.

Customize the Form


In this example, customize the Sales Order Entry form by adding the BAQ Combo.

1. Access the Sales Order Entry with the Developer Mode feature turned on.

378 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. From the Tools menu, select Customization.

3. In the Customization Tools Dialog, from the Tools menu, select Toolbox.

4. From the Toolbox, select BAQCombo.

10.2.700 379
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

5. Draw the combo inside the form and enter the following information.

6. For the DynamicQueryID, enter the BAQ you created - CustomerParts.

7. Set the DisplayMember property to the column you want to display in the drop-down. In this example,
enter Calculated_CustomerPart.

8. Set the ValueMember property to the column you want to be stored in the Epibinding field you select. In
this example, you again select Calculated_CustomerPart.

Data and display values may be different or the same.

9. Set the AutoWidth property to False.

10. Set the AutoWidthOption property to ControlWidth. This will set the drop-down be the size of the control
- in this case, Calculated_CustomerPart.

11. Set the Epibinding property to the column you want to store data value defined in the ValueMember
property.
In this example, you set a custom field OrderHed.ShortChar01 which was previously added to the data
model.
For more information on how to create user defined fields using Extended User Defined Table Maintenance,
see the Add User Defined Fields topics find in the Customization User Guide.

12. You can also add the EpiLabel to the form to describe the combo you added.

380 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

13. Save the customization and exit the form.

14. Re-open Sales Order Entry using the customization you created.

10.2.700 381
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

15. The BAQ combo now displays all BAQ results. You next configure the BAQ to filter the results based on the
customer selected on the Sales Order header.
For more information on how you can customize the Epicor ERP application, see the Customization User
Guide.

Add the BAQ Markup


For this task, disable the Developer Mode.

1. Navigate back to the Business Activity Query Designer with the CustomerParts query in focus.

382 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. On the Query Builder > Phrase Build sheet, select the Customer table on the canvas.

3. Verify the Table Criteria sheet is selected.

4. Click Add Row.

5. For the criteria Field, select CustID.

6. In the Operation field, verify = (Equals) displays.

7. From the Filter Value drop-down list, select the specified constant option.

8. Click on the specified link to display the Specify a value window.

10.2.700 383
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

9. In the Value field, enter the following:


[EpiBinding:OrderHed.CustomerCustID]

The open and closing brackets "[]" indicate the constant


is using the BAQ Markup Language. You can use the BAQ
Markup Language on the BAQ Criteria to filter on dynamic
values based on the context where the BAQ is being
consumed. Using the BAQ Markup syntax, you can add
criteria to a BAQ that will be substituted at runtime.
In general, the Markup syntax looks as follows:
[Token:Value].
The Token attribute within the brackets defines the type
of replacement to perform, and the value can be either:
• Like - For example you can use
[Like:Customer.CustID] syntax to find the first data
column of the currently selected data view that has
the matching Like value. Typically, use this markup
when the BAQ will be re-used on several UIApps where
the Like value will be found.
• EpiBinding - For example, you can use [EpiBinding:
OrderHed.CustomerCustID] syntax to find the data
value of the currently selected row of the data view
and column described by the EpiBinding. Typically, use
this markup when the BAQ will be used on a specific
UIApp where the EpiBinding is known.
• Current Value - This option is primarily used for
InfoZone BAQs, where the InfoZone was added to a
UI control that is "unbound". As a result of being
unbound, the data value is not accessible via either of
the previous two options. When you need to retrieve
a value from an unbound control and use it for an
InfoZone BAQ criteria, use the [Current:Value] syntax.
The second Value, separated from the first using the
colon ":", describes either the Like value, the actual
EpiBinding string, or the Current Value.
In this example, at runtime, the value from
OrderHed.CustomerCustID will replace this markup string
in the BAQ criteria.

10. Click OK.

11. The BAQ is now complete. Save and exit the query.

384 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Test the Results

1. Activate the Developer Mode and launch the customized Sales Order Entry form again.

2. Search for and select a collection of orders by several customers.

3. As you navigate and change rows, the combo is re-filtered by the current customer.

10.2.700 385
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

Another way of using BAQ combos are parent/child user-defined tables, for example UD100 and UD100A.
For example, you can use the EpiRetrieverCombo to select the data from the parent table and bind that
data to a specific table column (Epibinding). You can then use a BAQ Combo and use the Epibinding
markup syntax to filter the query results using the value selected in the EpiRetrieverCombo. For more
information, review the User-Defined Tables topics in the Customization User Guide.

Transforming Legacy First/Last Table Modifiers

This topic discusses how to modify a legacy BAQ utilizing First or Last table modifiers to make it compatible with
E10 syntax.
In previous Epicor 9 version, you can use the following table modifiers to control which data is retrieved from
each table:
• Each – All the rows of data within this table are pulled into the query; these rows are not sorted.
• First – Only the first row of the linked table that matches the criteria is returned.
• Last – Only the last row of the linked table that matches the criteria is returned.
When importing or migrating a legacy BAQ having First/Last modifiers into Epicor ERP version 10, adjustments
in BAQ Designer are needed in order to get the same results.
Typically, the same query results can be accomplished by using:
• If First/Last table modifier was used on the parent (first) table in E9, then this behaviour can be accomplished
by sorting data (Asc, Desc) and using the TOP N clause in the Toplevel Subquery

386 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

• If First/Last table modifier was used on any subsequent (child table), then this behaviour can be accomplished
in two ways:
• If you want to retrieve one or more fields from a table, create a SubQuery with parent-child tables. Add
column sorting and use the TOP N clause to retrieve number of rows of your choice. You then add reference
fields into Subquery's display fields.
• If you want to retrieve a single field from a table, create a SubQuery with a child table. Add Group By
fields involved in relation between parent and child tables. You then add a Calculated field with Min/Max
function against a field to determine the First/Last record you want to retrieve. You then reference this
field in the SubQuery's display fields.

The above techniques are discussed in the following examples.

Example 1
The below legacy query returns the list of all customer along with their latest sales order numbers recorded in
the system. Notice the last table modifier placed on the OrderHed table retrieves the most recent order number.
As the left outer join is used to define relationship between tables, the BAQ also displays customers who have
not yet placed an order.

The BAQ output looks as follows:

10.2.700 387
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

This method shows how to retrieve a single record using the Calculated Field. To get the same results in Epicor
ERP 10:

1. Create a TopLevel SubQuery and place the ErpCustomer table on the canvas.

388 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

2. Create another SubQuery of InnerSubQuery type and place the OrderHed table (child table) on the canvas.

10.2.700 389
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

3. Add Group By fields you will use in relation between parent and child tables.

4. Create a Calculated Field to retrieve the maximum sales order number.

390 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

5. Switch to the TopLevel SubQuery and place the SubQuery2 on the canvas.

10.2.700 391
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. Create relationship between the tables.

7. Select TopLevel SubQuery Display Columns.

8. Verify the BAQ results.

392 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

Example 2
The below legacy query returns the most recent part revision for the selected part. Notice the last table modifier
placed on the PartRev table retrieves the latest revision.

10.2.700 393
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

The BAQ output looks as follows:

394 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

In this example, learn how to get the same BAQ results in Epicor ERP 10 by sorting data and using the SQL TOP
N clause:

1. In the TopLevel SubQuery, place the Erp.Part table on the canvas and apply the table filter.

10.2.700 395
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. Create another SubQuery of InnerSubQuery type. Place the Erp.Part and Erp.PartRev tables on the canvas.

396 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

3. For the Erp.Part table, create identical Table Criteria as in the TopLevel SubQuery.

4. Select Inner SubQuery display columns you will later use to create relationships and display data in the
TopLevel SubQuery.

5. Sort Inner SubQuery data by the RevisionNum column in the descending order. This puts the latest revision
at the top of query results.

10.2.700 397
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. Now define the SELECT TOP clause and specify you want to return a single row.

398 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

7. Switch to the TopLevel SubQuery and place the SubQuery2 on the canvas.

8. Create relationship between the tables.

9. Select TopLevel SubQuery display columns.

10.2.700 399
Chapter 1 | Business Activity Queries Epicor ICE 3.2 Tools User Guide

10. Click Test and verify the BAQ results.

400 10.2.700
Epicor ICE 3.2 Tools User Guide Business Activity Queries | Chapter 1

10.2.700 401
Chapter 2 | External Business Activity Queries Epicor ICE 3.2 Tools User Guide

Chapter 2: External Business Activity Queries

Use the External Query functionality to create a connection to external (non-Epicor) data sources. This feature is based
on accessing external data via ODBC connections and provides the mechanism for retrieving, updating and displaying
information from an external database using the SQL language. Working with external data source looks similar to
ordinal query design and execution. The data you retrieve using the external query can be used in additional dashboard
renderings, like dashboard applications, mobile framework, Epicor Sharepoint Publisher and so on.
To use the functionality, you need an ODBC connection to an external server configured on the machine where the
application server is hosted. This connection must also be specified when you create the query. Through the External
BAQ Designer, you can browse and select tables from an external data source in the same way as when data is pulled
from the Epicor database.
The process of creating an external BAQ involves the following:
• Establish a connection to an external datasource using the ADO .NET DB provider available on the machine and
compose a connection string to access the external database management system.
• Set up security restrictions to schema and data coming from an external datasource.
• Modify external datasource metadata specified in the source database as required.
• Enable the external datasource you create in the company you work with.
• Build an external Business Activity Query and use it as a datasource for reports, dashboards, trackers and so on.
• Expose the data to users using the Epicor Everywhere™ Framework tools.
This chapter describes how to set up and configure connection to an external datasource. The process of building a
query is nearly identical to ordinal BAQ design. For more information on how to construct a query, see the Business
Activity Queries chapter.

External Datasource Type Maintenance

Use External Datasource Type Maintenance to set up security restrictions to schema and data from an external
datasource.
On the Data Filtering, you can set up restrictions to limit the data displayed by the query. You can create a
single criterion that pulls in the data you need. You can also create a combined criteria by linking your criterion
with And or Or statements.

Example You can create a datasource type to only display


records for a specific company. Typically, you can use data
filtering to prevent users from accessing particular data.

On the Schema Filtering sheets, you can apply a filter on a schema level by selecting which tables and columns
you want to display in External Business Activity Query Designer.

Example To narrow down the datasource output you can set


up the datasource type to display tables for a specific schema
name or hide all columns starting with a specific string.
This way, you can prevent users from accessing sensitive data,
such as financial operations and so on.

402 10.2.700
Epicor ICE 3.2 Tools User Guide External Business Activity Queries | Chapter 2

Create New Datasource Type


Here's how you can create a new datasource type:
Navigate to External Datasource Type Maintenance.
Menu Path: System Management > External Business Activity Query > External Datasource Types

This program is not available in Epicor Web Access.

1. Click New.

2. In the Datasource Type field, enter a unique identifier of a datasource type.

3. The Application Type field is used to control any specific logic or flow that is related to specific applications
associated with the datasources.
• Generic - Use this default option to create a datasource type for any type of target databases. Using
this type, the whole communication between the application and external data source is performed using
the .ADO.Net datasource.
• Prophet21 - Use this option when you integrate the Epicor ICE framework with Prophet 21(P21)
application.
• Eclipse - Use this option when you integrate the Epicor ICE framework with Epicor Eclipse application.
• iScala - Use this option when you integrate the Epicor ICE framework with Epicor iScala application.

The Epicor ICE (Internet Component Environment) is the


software framework for Epicor ERP software (both as
integrated with the Epicor ERP product and as the
standalone ICE Extend platform for other Epicor products).

4. In the Description field, enter a brief text to describe the purpose of the datasource type.

5. The Owning Company displays the company inside which the current DataSource Type was created. You
cannot change this value; only users within the Owning Company can modify this record.

6. Click Save.

Datasource type records are available for use in all


companies within an on-premise installation. For

10.2.700 403
Chapter 2 | External Business Activity Queries Epicor ICE 3.2 Tools User Guide

Multi-Tenant installation (Saas solutions), datasource types


are available to all companies within a Tenancy.

Create New Filter Group

The first step to filter data coming from an external datasource is to create a new security group.

1. Navigate to the Detail > Data Filtering sheet.

2. Click New Group.

3. In the FilterGroupName field, enter a unique name for the security group.

Example Company_ID

4. In the Description field, enter a brief description of the security group.

Add New Definition

The below steps discuss how to create a filter to limit the data the external datasource displays through BAQ.
To complete the data filtering:

1. On the Detail > Data Filtering sheet, in the lower pane, click the New Filter button.
A new row displays on the grid.

404 10.2.700
Epicor ICE 3.2 Tools User Guide External Business Activity Queries | Chapter 2

2. In the FilterName field, enter a name for the definition or accept the default value.

Example Filter1.

3. In the TableName field, enter a name of the table used in the criterion.
You can accept the default value of --any table --, which means that any table within the datasource should
be checked for some field. It is also possible to use wildcard characters to limit the list of tables used to filter
the data.

4. In the FieldName field, enter a name of the field the rule will valuate.

Example Company_id

5. In the DefaultConstant field, select a BAQ constant from the drop down list or manually enter the constant
value.

Example
• BAQ constants - CurrentCompany, CurrentUserID
• Manually entered constants - "Company1", "True"

10.2.700 405
Chapter 2 | External Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. When you need to apply a filter based on the values of more than one criterion, use the And/Or field to
define the criteria string clause.

7. If you want this criterion to evaluate a Not criterion value, select the Not check box.

Example a column NOT IsNull

8. If needed, use the Left Parenthesis and Right Parenthesis fields () to insert parenthesis to the clause.

9. If you want to change the sequence through which filters run, highlight a filter on the grid and click either
the Move Up or Move Down buttons.

10. When you finish building the criterion, click Save.

Apply Table Filter

The below steps discuss how to limit which tables display for selection when you design a new query using BAQ
Designer.
To apply a filter on the table level:

1. Navigate to the Schema Filtering > Table Filtering sheet.

2. Click New Table Filter.


A new row displays on the grid.

3. In the SchemaName field, enter a name of the database schema used in the criterion.
You can accept the default value of --any schema -- to display or hide tables for any schema within the
selected datasource. It is also possible to use wildcard characters to limit the list of schemas used in the filter.

Example dbo, ice%

406 10.2.700
Epicor ICE 3.2 Tools User Guide External Business Activity Queries | Chapter 2

4. In the TableName field, enter a value to limit which tables become available for selection creating a BAQ
using the datasource.
You can accept the default value of --any table --, to apply a filter on all tables within the selected database
schema. It is also possible to use wildcard characters to limit the list of tables used to filter the data.

Example You can decide to only display tables for a


specific schema, for example, dbo. Another example
would be to hide tables due to security restrictions, for
example to apply a filter on all tables starting with fin%,
gl%, ap% and so on.

5. When you need to apply a filter based on the values of more than one criterion, use the And/Or field to
define the criteria string clause.

6. If you want this criterion to evaluate a Not criterion value, select the Not check box.

7. If needed, use the Left Parenthesis and Right Parenthesis () fields to insert parenthesis to the clause.

8. If you want to change the sequence through which filters run, highlight a filter on the grid and click either
the Move Up or Move Down buttons.

Apply Column Filter


The below steps discuss how to limit which rows of the external table(s) display for selection when you design a
new query using BAQ Designer.

1. Navigate to the Schema Filtering > Column Filtering sheet.

2. Click New Column Filter.


A new row displays on the grid.

10.2.700 407
Chapter 2 | External Business Activity Queries Epicor ICE 3.2 Tools User Guide

3. In the SchemaName field, enter a name of the database schema used in the criterion.
You can accept the default value of --any schema -- to display or hide selected tables and columns for any
schema within the selected datasource. It is also possible to use wildcard characters to limit the list of schemas
used in the filter.

Example dbo, ice%

4. In the TableName field, enter a value to limit which tables and respective fields become available for
selection.
You can accept the default value of --any table --, to apply a filter on schema or column level only. To limit
tables and respective fields from displaying in BAQ Designer, you can use SQL Server wildcard characters,
such as % or _ (underscore).

5. In the FieldName field, enter a value to limit which columns become available for selection in BAQ Designer.
To limit certain fields from displaying in BAQ Designer, you can use SQL Server wildcard characters, such as
% or _ (underscore).

Example You can hide a bank account number field for


all tables that exist in the external datasource.

6. When you need to apply a filter based on the values of more than one criterion, use the And/Or field to
define the criteria string clause.

7. If you want this criterion to evaluate a Not criterion value, select the Not check box.

8. If needed, use the Left Parenthesis and Right Parenthesis () fields to insert parenthesis to the clause.

9. If you want to change the sequence through which filters run, highlight a filter on the grid and click either
the Move Up or Move Down buttons.

External Datasource Maintenance

Use External Datasource Maintenance to create a connection to an external database management system.
When you create a new datasource, first specify a datasource name, concise description and select an available
DataSource Type. Datasource types are created in External DataSource Type Maintenance. You can use
datasource type to apply security restrictions to schema and data.
To connect to an external datasource, you must compose a connection string. First, select one of the ADO.Net
providers available on the server. ADO.NET is the .NET technology; an object-oriented set of libraries for interacting
with data sources. There are several data providers you can use to communicate with different data sources. To
create a data source using the iScala datasource type, selecting of ADO.Net provider is disabled, you only create
a connection on the Distribution tab.

Any custom ADO.Net provider can be installed on the server


and used to create a Business Activity Query (BAQ). Each .NET
Framework data provider that supports a factory-based class
registers configuration information is stored in the

408 10.2.700
Epicor ICE 3.2 Tools User Guide External Business Activity Queries | Chapter 2

DbProviderFactories section of the machine.config file on


the local computer.

Example The following displays the SQL client data provider


reference in the machine.config file:

<system.data>
<DbProviderFactories>
<add name="SqlClient Data Provider"
invariant="System.Data.SqlClient"
description=".Net Framework Data Provider for SqlServer"
type="System.Data.SqlClient.SqlClientFactory, System.Data,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
/>
</DbProviderFactories>
</system.data>
The following table outlines some of the data providers you can use to query an external database:

Description
.NET Framework data provider

.NET Framework Data Provider for SQL Provides data access for Microsoft SQL Server version 7.0 or later.
Server Uses the System.Data.SqlClient namespace.
.NET Framework Data Provider for OLE DB For data sources exposed by using OLE DB (Object Linking and
Embedding Database). It uses the System.Data.OleDb namespace.
.NET Framework Data Provider for ODBC For data sources exposed by using ODBC (Open Database
Connectivity). It uses the System.Data.Odbc namespace.
.NET Framework Data Provider for Oracle The .NET Framework Data Provider for Oracle supports Oracle client
software version 8.1.7 and later, and uses the
System.Data.OracleClient namespace.

Create an External Datasource


Navigate to External Datasource Maintenance.
Menu Path: System Management > External Business Activity Query > External Datasources

This program is not available in Epicor Web Access.

1. Click New.

10.2.700 409
Chapter 2 | External Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. In the Datasource field, enter a unique identifier that best describes the external datasource.

3. In the Description field, enter a description of the external datasource.

4. In the Datasource Type field, select a type you wish to use in your external datasource.
Datasource types are created in External DataSource Type Maintenance. You can use datasource type to
describe security restrictions applied to schema and data from an external datasource.

5. The Owning Company field displays the company in which the current external datasource was created.
This value displays in a read-only format.

6. In the ADO. Net provider field, select a provider available on the server.
A provider you select is used for connecting to a database, executing commands, and retrieving results. In
this example, SqlClient Data Provider is selected.

For iScala integration this button is disabled, as this type


of integration uses the WCF Service. You set up
connection parameters with iScala exclusively on the
Distribution sheet.

7. For OleDB, ODBC and SQL providers, build the connection string by entering adapter properties on the
Key properties tab.
For the remaining ADO. Net providers, build the connection string using the DB Connection and Advanced
Properties tabs.

410 10.2.700
Epicor ICE 3.2 Tools User Guide External Business Activity Queries | Chapter 2

8. In this example, first enter a Data Source; specify a server name and instance name.

9. Then specify an Initial catalog (DB name) you want to connect to.

10. If you want to connect to an external datasource using the Windows security, set the Integrated Security
property to True. This means the credentials of the account running the Epicor Application Pool are used
for authentication. If the account does not have required permissions to access the SQL Server database,
use the SQL Server credentials to log in.

11. If you want to connect to the database using server credentials, enter a valid User ID and Password.

12. Note that for security purposes, the information about the current password is not exposed to any user.

13. Apart from the default connection parameters offered by the selected .NET provider, the following Epicor
specific keys are available for use when building a connection string.

Key Example Description


SimpleSQL=False This property controls how SQL statement is generated by the BAQ engine. Data
providers vary by SQL language dialect they understand. BAQ engine was
developed to work with MS SQL Server and uses features absent in simple data
providers, like MS Access. Typically, set this field to True, if data provider reports
problems understanding SQL instructions.
SkipLoadErrors=True; Sets NULL for the value that cannot be loaded in the field (such as zero-date for
Oracle, as conversion of 0 to date is not supported by .Net)
AliasMaxLength=30; Sets the maximum possible length of field aliases.
UseFieldAlias=True; When used, field aliases will match field names. Standard way of building aliases
using tableid_fieldname format will be suppressed. If duplicate alias entries
occur, digits in ascending order will be placed at the end of aliases.
SqlDialect=Oracle; When used, this parameter is primarily used by the ODBC provider to build SQL
query according to target relational database management system (RDBMS)
syntax. The available values include: Oracle, MySql and Mssql2000.

14. When setting up connection parameters, on the Advanced Properties sheet you can specify detailed
properties for Windows supported .NET providers, such as ODBC, OLE DB and SQL client. The list of driver
properties vary based on selected ADP. NET provider. For more information on specific driver properties,
refer to the Microsoft® Developer Network at http://msdn.microsoft.com/en-US/.

10.2.700 411
Chapter 2 | External Business Activity Queries Epicor ICE 3.2 Tools User Guide

15. The Connection string pane contains initialization information that is passed as a parameter from a data
provider to a data source. The syntax depends on the data provider, and the connection string is parsed
during the attempt to open a connection.

412 10.2.700
Epicor ICE 3.2 Tools User Guide External Business Activity Queries | Chapter 2

16. Use the Test Connection button to verify the connection to an external datasource is successful.

Use the Distribution sheet


Use the Distribution sheet to configure the token server settings required to establish connection between Epicor
ICE and external system's framework. On this sheet you can also restrict how external business activity queries
generate results.

This sheet is only enabled, if an external datasource is


configured to use an iScala, Eclipse or Prophet 21 Datasource
Type.

To configure the external system:

10.2.700 413
Chapter 2 | External Business Activity Queries Epicor ICE 3.2 Tools User Guide

1. Select the Distribution sheet.

2. The External System pane fields vary based on the selected Datasource Type.

3. In the iScala Server field, enter the full domain name of the iScala server (or the name for which https
binding of IIS hosting iScala WCF services is configured).
For Prophet 21 and Eclipse integration this field displays the Token server URL field. Enter the URL of the
server that validates calls from ICE framework against external application.

4. For Client ID, enter the user name to be used by BAQ engine to authenticate in external system.

5. In the Client secret field, enter the password configured in external system for the above user.

For more information on how to integrate Epicor ICE with


external systems, review the available ICE Extend
documentation found on EpicWeb.

6. After you enter the Username and account password, you can select how to impersonate the user:
• never
• always
• always; fail if not associated

Impersonation mode Description


never The query is executed using default iScala user independent of Epicor user and
Domain and Username fields settings.
always BAQ Engine transfers information from Domain and Username of the current
Epicor user to iScala. If one or both fields are not filled or mapping from the
transferred current Epicor user to iScala internal user is not found, the query is
executed using default iScala user.

414 10.2.700
Epicor ICE 3.2 Tools User Guide External Business Activity Queries | Chapter 2

Impersonation mode Description


always; fail, if not BAQ Engine transfers information from Doamin and Username fields of the current
associated Epicor user to iScala. If one or both fields are not filled or mapping from the
transferred current Epicor user to iScala internal user is not found, the error occurs
and the query is not executed.

By default, for datasources, created in previous versions,


never mode is selected. By default, for new datasources
always mode is selected.

7. You can set the maximum number of rows the external query is allowed to return. To do so, enter a value
in the Query Maximum Row Count field.

Example You limit the query to return maximum of 500


rows.

8. The Query Execution TimeOut (Sec) value specifies the longest time (in seconds) in which a query can
run, when executed by the datasource in focus. Specifying 0 for this option indicates all queries are allowed
to run indefinitely.

Example By entering 180 in the field you indicate the


database server may attempt to execute queries for
maximum of 3 minutes. After this period the process is
terminated and the user launching the query receives an
error message.

Query Limits apply to all external queries executed by the


selected datasource regardless of the Datasource Type it
uses.

Export Datasources

Use the Export Datasources functionality to make your external datasources available to users at another
location.
When you export a datasource as a .baqds file, users outside your network can then import this definition onto
their client machines and establish connection to an external datasource. You can also use this functionality to
archive your datasource definition.
To export datasources:

1. Search for and select datasource(s) you want to export.

10.2.700 415
Chapter 2 | External Business Activity Queries Epicor ICE 3.2 Tools User Guide

2. From the Actions menu, click Export Datasources.

3. By default, all selected datasources, related datasource types and company settings are selected for export.

4. You can customize the exports list using the check boxes that display next each item.

5. Click Export to File.

6. Enter a File name and select a location of the exported *.baqds file.

7. Click Export.

8. View the Export process messages pane and verify the process is complete.

9. Click Close.
The exported datasource(s) definition is now available to other users.

416 10.2.700
Epicor ICE 3.2 Tools User Guide External Business Activity Queries | Chapter 2

Import Datasources

Use the Import Datasources functionality to import previously exported datasources and datasource types into
your environment.
To import external datasources:

1. From the Actions menu, select Import Datasources.

2. Click Import from File.

3. Search for and select the exported *.baqds file.

4. You can customize the list of imported items by selecting a check box next to each datasource, datasource
type and company settings you want to import.

5. Click Import.

10.2.700 417
Chapter 2 | External Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. View the Import process messages pane and verify the process is complete.

7. Click Close.
Verify the connection to an external is successful. If necessary, click Configure button to modify Database
Connection Parameters.

32 Bit vs 64 Bit ODBC

When you create an ODBC connection, it is important to understand which kind of Data Source Name (DSN) you
should use on the system. On an x64 system, you can create an ODBC connection (DSN) on the 32-bit side of
the system as well as on the 64-bit side.
The Epicor ICE3 framework used by Epicor ERP and BAQ takes bitness into account, when a user works with
BAQ External Data Sources and executes external queries. BAQ distinguishes 32bit and 64bit ODBC datasources
to provide compatibility between bitness of IIS process and of underlying ODBC driver dll file. Hence, if the
application utilizing the Epicor ICE 3 framework is running in the 64bit mode, it doesn't see 32bit DSNs, and vise
versa.

1. To configure 32bit ODBC datasources, you can call ODBC Data Source Administrator tool using this command
line:
%windir%\SysWOW64\odbcad32.exe

2. In order for BAQ to see and consume 32 bit ODBC datasources, in Internet Information Services (IIS) Manager,
select ERP10/ICE3 application pool.

3. Click Advanced Settings.

418 10.2.700
Epicor ICE 3.2 Tools User Guide External Business Activity Queries | Chapter 2

4. For Enable 32-Bit Applications property, select True.

5. To configure 64bit ODBC datasources, call ODBC Data Source Administrator tool using this command line:
%windir%\system32\odbcad32.exe

10.2.700 419
Chapter 2 | External Business Activity Queries Epicor ICE 3.2 Tools User Guide

6. In ERP10/ICE3 application pool, for Enable 32-Bit Applications property, select False.

Microsoft does not support the side-by-side installation of 32- and 64-bit Microsoft Office or their
dependent components. If you need to have both MS Office ODBC driver variants on the same machine,
install the needed driver using the "/passive" command line parameter.

External Datasource Metadata Maintenance

Use the External Datasource Metadata Maintenance to modify column properties of data coming from an
external datasource.
In External Business Activity Designer, column properties such as format, label or description display according
to the underlying metadata specified in the source database. When there is no metadata specified for a table,
External Business Activity Designer automatically determines all required column properties.
In External Datasource Metadata Maintenance, you can manually change properties of columns you want to
include in your Business Activity Query.

420 10.2.700
Epicor ICE 3.2 Tools User Guide External Business Activity Queries | Chapter 2

First, select a Datasource Type for which you want to modify metadata and select one of the datasources
attached to the Datasource Type. The datasource you select provides a list tables you can select to modify
metadata.

Example
You want to create an updatable Business Activity Query (BAQ)
that displays the list of customers. Because you typically contact
your customers via email, you want to make sure the email
address field for each customer is filled. In External Datasource
Metadata Maintenance, you select a Datasource Type and a
Sample Datasource that provides the data for the query. You
will then search for a customer table that holds the information
you need. On the Field Detail sheet, highlight the email address
field and select the Required check box. When you create an
updatable BAQ and use it on a dashboard, users will not be
able to change the existing customer information or create a
new customer record unless they enter a value in the email
address field.

Retrieve External Tables


Use the following steps to retrieve tables for which you want to modify column properties from an external
datasource.
Navigate to External Datasource Metadata Maintenance.
Menu Path: System Management > External Business Activity Query > External Datasource Metadata

This program is not available in Epicor Web Access.

To retrieve external table:

1. In the Datasource Type field, search for an existing datasource type.

10.2.700 421
Chapter 2 | External Business Activity Queries Epicor ICE 3.2 Tools User Guide

Datasource types are created in External DataSource


Type Maintenance. You can use datasource type to
describe security restrictions to schema and data of an
external datasource. Each external datasource that
provides the connection to an external database system
must be assigned to an existing datasource type.

2. The Owning Company inside which the selected DataSource Type was created, along with the Type
description display for your information only.

3. In the Sample Datasource field, select an external datasource associated with the selected datasource type,
for which you want to create metadata.

External datasource provides connection to an external


database system. Each datasource must be assigned to
an existing datasource type.

4. Click Test Connection to verify the connection to an external system is established.

5. To the Connection Successful message, click OK.

6. Click Tables.

7. In the External Tables window, search for a table or multiple tables for which you want to modify column
properties.

422 10.2.700
Epicor ICE 3.2 Tools User Guide External Business Activity Queries | Chapter 2

You can narrow down the list of tables you want to retrieve by entering a value in the Table Name
Starts with field and selecting a database schema.

8. In this example, select the DimCustomer table.

9. In the External Tables window, click OK.

10. The table you select display as a node in the Tree View on the left side of the form.

10.2.700 423
Chapter 2 | External Business Activity Queries Epicor ICE 3.2 Tools User Guide

To modify table metadata, selecting a table is not


necessary. If you accept a default value of -- any table
in the database --, then any metadata changes you make
apply to the whole database. You can, for example, create
metadata for the Company column by adding a custom
description. All database tables using the Company
column will use the column description you create.

Use Table List


Use the Table List sheet to review the list of external tables you retrieved from an external datasource.

1. Navigate to the Table List sheet.

2. The grid displays the Customer table you retrieved form an external datasource.

3. You can enter a value in the Description field to create custom table description.
In this example, enter List of Customers.

424 10.2.700
Epicor ICE 3.2 Tools User Guide External Business Activity Queries | Chapter 2

You cannot modify the rest of the fields; they display for your information only.

Modify Field Properties


Use the following steps to manually change properties of columns you want to include in your Business Activity
Query.

1. In the Tree View, expand the table and select a field you want to modify.

2. In this example, select the EmailAddress field.

3. The Fields > Field Detail sheet is automatically selected, presenting the existing properties of the selected
field.

4. In the Description field, you can explain the field's purpose and provide other helpful information.
In this example, enter Customer Email Address.

5. The Field Table defines the column's title when used on a query or a dashboard.
In this example, enter Email.

6. The Format displays the layout for the characters within the field. This value can be displayed in either
schema or alphanumeric format. You can change this value if necessary.

7. By selecting the Required check box you indicate the field cannot be empty. When users attempt to save
a new or existing record within the query and this field is blank, they will not able to save the record until
they enter a value in this field.

8. If you want to prevent users from changing the data in this field, select the Read Only check box.

10.2.700 425
Chapter 2 | External Business Activity Queries Epicor ICE 3.2 Tools User Guide

9. To view the list of all fields of the selected external table, navigate to the Fields > Field List sheet.

10. View the metadata information you entered for the EmailAddress field.
You can use this sheet to modify properties of multiple fields at once, for example, to make certain fields
mandatory, change their label and so on.

11. Once complete, click Save.

Enable External Datasources

Before you can use the created datasource to build an External Business Activity Query, you must authorize it for
the current company.
Use the BAQ External Datasources sheet within Company Maintenance to enable external datasources for the
company. On this sheet, you can also configure which of the available filters (from the Datasource Type associated
with the each of the chosen External Datasources) to use, or skip when External BAQs are executed in this
company. Using this approach, different companies can user the same External Datasource/Datasource Type but
bypass or execute the filters differently.
Navigate to Company Maintenance.
Menu Path: System Setup > Company/Site Maintenance > Company Maintenance

This program is not available in Epicor Web Access.

1. Select the BAQ External Datasources sheet.

426 10.2.700
Epicor ICE 3.2 Tools User Guide External Business Activity Queries | Chapter 2

2. In the Datasources grid, based on Company Visibility and Owning Company, all datasources on the server,
or within the Tenancy (SaaS installations) appear as available for enabling.

3. Select the Enabled check box for each datasource you want to make available within the current company.

Only the authorized datasources become available for use


in External BAQ Designer.

4. The Company field displays the Owning Company of each datasource. Note each record can only be
modified from its Owning Company.

5. If you want to skip security checking for the selected datasource, in the Datasources grid, select the Skip
Filter check box. Once selected, Filter Groups and Filter Definitions specified for the datasource are ignored.

6. If you wish to skip security checking for a specific group defined for the selected datasource, in the Filter
Groups grid, select the Skip Filter check box.

Example
In the External Datasource Type Maintenance, you
can create multiple filter groups. The selected external
datasource retrieves the required data based on
datasource type settings. For example, you can filter the

10.2.700 427
Chapter 2 | External Business Activity Queries Epicor ICE 3.2 Tools User Guide

external data by a specific company and parts you want


to display in a dashboard. In the future, a request may
occur to display the information in the dashboard for all
companies. In such case, you can use the Skip Filter check
box to ignore the filtering for the selected group.

7. If the selected filter group uses a Default constant to filter the data, you can use the Filter Definitions grid
to override this constant.

8. The current value of the selected constant displays in the Constant Value field.
In this example, the current company value is EPIC06.

9. If you want to override this constant by applying a custom value, clear the Use Default check box and enter
a custom constant in the Value field, for example, EPIC03.

Design External Business Activity Query

External Business Activity Query provides the mechanism for retrieving, updating and displaying information from
an external database using the SQL language. It serves as an interface you use to create custom SQL text. The
query text is then sent to the database server using the selected .NET provider, where it is executed. The information
you retrieve serves as a data source for reports, dashboards or searches.
Navigate to External Business Activity Query.
Menu Path: System Management > External Business Activity Query > External Business Activity Query

This program is not available in Epicor Web Access.

1. Click New.

428 10.2.700
Epicor ICE 3.2 Tools User Guide External Business Activity Queries | Chapter 2

2. In the Query ID field, enter a unique identifier for your query.

A Query ID can only contain letter characters, digits,


dashes, or underscores. It cannot begin or end with a
dash or an underscore.
If you enter any restricted character, an error message
displays.

3. In the Description field, enter a concise explanation for the query.

4. Notice the Author field displays the name of the user who created the current business activity query. Other
users cannot modify the current query. If you need to assign author rights to another user, use the Actions
> Change Author option.

5. The Owning Company displays the company inside which the current external BAQ was created. You
cannot change this value; only users within the Owning Company can modify this BAQ.
If the All Companies check box is selected, then companies within the same organization as the Owning
Company can view and use the query. If the System BAQ check box is selected, the Owning Company field
is blank. This indicates the current BAQ is available to all companies within the current organization.

6. If you want to make this query is available to all users, select the Shared check box.

7. The All Companies check box controls whether the current BAQ Definition is visible to all companies on
the same database server. When the Epicor application uses multiple companies contained within a single
database, the BAQ usage and visibility is applied regardless of multi-company direct configuration. For
companies hosted on different databases, this check box initiates the Service Bus processing, when it is
configured to synchronize BAQs to external companies.
If the custom BAQ is created from a Company that is running under a multi-tenant license, the definition
becomes visible to all companies within the same Tenancy as the Owning Company.
The options/values for tenant and multi-tenant features are only for Epicor hosted environments. Typically
you can ignore these options. Internal Epicor administrators who need more information should refer to
the Epicor SaaS Installation Guide.

The following rules apply to usage of BAQs visible across companies:


• The BAQ definition can only be updated from the original company, but is available for review and
execution in other companies. To modify the BAQ definition in other companies, you need to create a
copy of the BAQ.
• The BAQ ID of queries having the All Companies property must be unique across all companies.
• When you create a BAQ visible across companies in Company A, and Company B uses a local BAQ with
the same ID, a warning message displays. A user is informed that in Company B, the local BAQ is used
and the BAQ created in Company A will not be available for use.
• Likewise, when you create a local BAQ in Company A and a BAQ visible to all companies, having the
same ID, already exists in the Company B, a warning message displays. A user is informed that the local
BAQ will take precedence over the All Companies BAQ. The same principle is true for the BAQ import
process.

The local BAQ always take precedence over the BAQ


visible to all companies, when the naming conflict
occurs.

10.2.700 429
Chapter 2 | External Business Activity Queries Epicor ICE 3.2 Tools User Guide

To see in which companies (outside the current company), references to the BAQ were created, use the
Where Used tabs.

8. The System BAQ check box indicates whether the current BAQ is installed with the Epicor ERP application.

This option only applies to ordinal BAQs, External BAQs


are not delivered with ERP10 application.

9. If you want to update the external database using this query, select the Updatable check box.

10. Cross-Company functionality controls the ability to bring back results across multiple companies.

You can only use this option with ordinal BAQs, this
feature is not supported in External BAQs.

11. In the External Datasource name field, select an external datasource available for the current company.

12. Click Test Connection to verify your connection to an external database is established.

13. To the connection message, click OK.

14. You continue design the query in the same way as in Business Activity Query Designer.
The External BAQ Designer UI is almost identical as Business Activity Query Designer that is designed to work
with MS SQL Server 2008 and higher. All criteria filters, function lists in calculated fields, expressions,
supported SubQueries and SubQuery types are not modified in External BAQ UI.
A user designing an external query should only use those External BAQ Designer features which are supported
by the foreign Database Management System it uses.

Example

430 10.2.700
Epicor ICE 3.2 Tools User Guide External Business Activity Queries | Chapter 2

For more information on how to construct a business activity query, see the Business Activity Queries
chapter.

Update External Datasource

This topic provides general guidance for using an External Updatable Business Activity query to update an external
database.
When you pull external data into the Epicor ERP, you may as well want to be able to update this data in the
application and submit the changes back to the external datasource.
The implementation involves several processes that are described in more detail in the respective topics of this
guide and later in this topic. You first need to define your external datasource in the application and connect to
it - please refer to the External Datasource Maintenance on page 408 topic for details on this process. You then
need to create an External BAQ against your external database and make that BAQ updatable - the Design
External Business Activity Query on page 428. Finally, you need to add your custom update code specific to the
type of the external datasource you interact with.

1. Launch External Business Activity Query Designer.


Menu Path: System Management > External Business Activity Query.

2. In the Main Menu, click New to create a new query.

3. Define the general properties: Query ID, Description, and External Datasource; Select the Updatable
check box.

4. Navigate to the Query Builder > Phrase Build sheet.

10.2.700 431
Chapter 2 | External Business Activity Queries Epicor ICE 3.2 Tools User Guide

5. Select external database table(s) that contain data you need to pull and add them to the canvas.

6. On the Display Fields > Column Select, choose the columns from the previously specified tables that you
wish to display in the results grid.

7. On the Update > General Properties sheet, define the Updatable Query Settings per your needs.
If want to be able to update several records at once, make sure you select the Allow Multiple Row Update
option.

8. In the Updatable Columns grid, mark the field(s) you need to update as Updatable.

9. Open the Update Processing sheet.

10. In the Processing method section, select the Advanced BPM Update only and click the BPM Directives
Configuration button.
The Updatatble BAQ Method Directives window pops up.

11. With the Update method selected, in the Main Menu, go to New > New Base Processing.
The Base Processing > Detail sheet opens for editing.

12. Enter a Directive Name and Description, then click Design.


The BPM Workflow Designer launches.
At this stage, you can, for example, add an Execute Custom Code widget to the flow or use an Invoke
Function widget to call a Custom Code Function. Either way, use the below boilerplate code to define your
custom update logic:
//Get query results and trim them to just the updated columns

var resultQuery = queryResultDataset.Results


.Where(row => !row.Unchanged());

//Define the results processing logic

foreach (var ttResult in resultQuery)


{
//Define your update action here
}

13. Save your workflow and close the Designer.

14. Enable and save the directive; close the Updatable BAQ Method Directives window.

15. Save the query.

If you need help setting up the integration with a specific external datasource, please contact the Epicor's
Professional Services team for assistance.

432 10.2.700
Epicor ICE 3.2 Tools User Guide BAQ Report Designer | Chapter 3

Chapter 3: BAQ Report Designer

Use the BAQ Report Designer to turn a Business Activity Query (BAQ) into a SQL Server Reporting Services (SSRS) report.
You create a personalized BAQ through the Business Activity Query Designer. You then use the BAQ Report Designer
to select the BAQ as the base for a report, and to define the option fields, filters, and sort by options that appear on
the report interface. The reports you create through this tool are flat reports, which means they only pull data from
the table(s) defined on the selected BAQ. If you need to pull data from multiple queries (and so multiple tables), use a
Dashboard report to expand the amount of data to include. Dashboard reports are discussed in the Dashboards chapter.
To design and format the report, you use either Microsoft SQL Server Report Builder or Crystal Reports (provided for
backward compatibility with older reports). Once you complete the report layout, you can add it to the menu for users
to access. Then launch Report Style Maintenance to create a report style or styles for it. The style determines which
companies can access the BAQ report and other key options. You can also design a routing rule for each BAQ report.
Routing rules help you streamline reporting for specific business needs. They can be simple rules that define an alternate
report style users run when they need to print a report using a unique format, or complex rules that divide, or break,
the report run into multiple dataset partitions which they can link to separate rendering workflows for generating,
printing, previewing, and sending the report output.

This chapter focuses on designing the report interface in the


application and provides an example of working with the Microsoft
SQL Server Report Builder. See the application online help for more
information about program features supporting Crystal reports.
Likewise for more information on report style and routing rules,
review the reporting courses, the Reports and Routing Rules sections
in the application help, and/or the Reporting Tools chapter in the
Implementation User Guide.

BAQ and BAQ Report Datasets

A BAQ report is based on a selected existing BAQ and includes four standard datasets.
Before you create a report, you must first define the BAQ you are going to use. You can use an available BAQ
or create a new BAQ in the Business Activity Query Designer. The BAQ you use must contain the Company column
that is necessary to join the standard tables in the datasets (using the Company ID), and, most importantly, the
BAQReportParameter table. Once you identify the BAQ for your report, you use the BAQ Report Designer to
create a new BAQ report.
Each BAQ report contains four tables that display as the report's datasets in the Report Builder:
• Company – This table defines your Company ID and Company Name values, ensuring the BAQ is synchronized
with your company's data.
• RptLabels – The Epicor application uses this table for the standard text labels that display on the reports. This
table contains all the language versions of the current report. These report labels generate the field labels, so
each field on the report can display in a different language by matching the Label Name for each item.
• BAQReportParameter – The information written to this table originates from the parameter information
entered on the report user interface (UI). This information is used for two purposes: to display the parameters
on the report, and, when designing the report, to control sorting, summary, grouping, and so on.
• BAQReportResult table – This table contains the specific data pulled from the database that matches the
query parameters.

10.2.700 433
Chapter 3 | BAQ Report Designer Epicor ICE 3.2 Tools User Guide

Standard BAQ Report Interface

There are several standard BAQ reports, delivered with the application, that were created using the BAQ Report
Designer program.
Use the following steps to review the form (application interface) of the standard BAQ report Rebate Contract
Transactions. Being familiar with the BAQ report interface will help you when creating a new BAQ report later
in this chapter.

1. Navigate to the Rebate Contract Transaction Report form.


Menu Path: Financial Management > Rebates, Promotions and Royalties > Reports > Rebate Contract
Transactions

2. On the Selection sheet, the Report Options section displays fields for entering report parameters. In this
example, options include Start Invoice Date, End Invoice Date, Start Transaction Date, and End
Transaction Date. These options were defined when the BAQ report was created.

3. The Filter Summary section displays four filters - Part, Product Group, Customer, and Rebate. The
available filters also were defined when the BAQ reports was created.

434 10.2.700
Epicor ICE 3.2 Tools User Guide BAQ Report Designer | Chapter 3

4. To access the Filters, select the Filter sheet.

5. On the Filter sheet, click the Part button to search for and select a part or group of parts.

6. The selected parts display in the Part List.

7. Return to the Selection sheet.

10.2.700 435
Chapter 3 | BAQ Report Designer Epicor ICE 3.2 Tools User Guide

8. The Filter Summary section displays Some Selected in the text box next to the filtered field.

If you have not selected any records for filtering, the


application assumes all records are selected.

9. Use the Sort By field to choose how you want the information in the report sorted when it prints. In this
example, the report is sorted by Customer and then by Invoice Date. The available sorting criteria also were
defined when the BAQ reports was created.

10. By default, all reports contain the remaining fields for Report Style, Schedule, Archive Period, and User
Description.

11. Click the Print Preview button on the standard toolbar to display the report on your screen. PDF is the
default display for the Standard - SSRS report style.

12. Use the Generate Only button to generate each report as an electronic file to view and print later. The
generated report is available to preview and print for a period of time you define on the report window.

13. Click the Generate for Design button on the standard toolbar to modify BAQ reports. The generated
report appears on the System Monitor. From here you launch the Design and Test SSRS program that enables

436 10.2.700
Epicor ICE 3.2 Tools User Guide BAQ Report Designer | Chapter 3

you to download the SSRS Report Data Definition to a local working copy and interact with SSRS Report
Builder.

BAQ Report Options

Use this action to define options for Crystal Reports.

1. Navigate to the BAQ Report Designer.


Menu Path: System Management > Business Activity Queries > BAQ Report Designer

This program is not available in Epicor Web Access.

2. From the Actions menu, select BAQ Report Options.

3. In the BAQ Report Options dialog box, you can see the Crystal Report Options that are retained for
compatibility with previous application releases.

4. In the Crystal Report Executable field, browse for or enter the path to the Crystal Reports .exe file.
The system will launch Crystal Reports when you choose to design your report using this program.

10.2.700 437
Chapter 3 | BAQ Report Designer Epicor ICE 3.2 Tools User Guide

5. Use the Local Reports Directory field to define the directory you use to save your BAQ Report (.rpt) files.
When you create reports within the BAQ Report Designer, they automatically save to this location. Later
when you launch Crystal Reports, you can navigate to this directory path and open the .rpt file. You may
then modify the layout of this report.

6. If you select the Copy Report Locally option, the BAQ Report Designer creates a duplicate copy of each
BAQ report. This file is then a backup copy for the report.

7. Click Apply if any changes were made, then close this dialog box.

Create a BAQ Report

This example demonstrates how to create a BAQ report based on an existing BAQ, design the report layout in
the SSRS Report Builder, save the report (.rdl) on the SSRS Report Server, and add the report to the application
menu. Advanced users can design both BAQs and SSRS reports that address complex data reporting requirements.

You must have access to the SSRS Reporting Services


Configuration Manager, Report Manager, and Report
Builder for your SQL Server report server. Your access to these
tools must include sufficient user role assignments to create
folders and save report files on the report server.
Your administrator can set user role assignments on the Report
Manager Folder Settings page. We recommend that your
user account have all the roles selected. This includes Browser,
Content Manager, My Reports, Publisher, and Report
Builder.
Ensure security for the root Reports folder is inherited from
Parent Security or is otherwise appropriately defined to allow
user access.

Add the BAQ Report

In the BAQ Report Designer, add and save a new report.

1. Navigate to the BAQ Report Designer.


Menu Path: System Management > Business Activity Queries > BAQ Report Designer

This program is not available in Epicor Web Access.

438 10.2.700
Epicor ICE 3.2 Tools User Guide BAQ Report Designer | Chapter 3

2. From the New menu, select New Report Definition.

3. Use the Company drop-down list to define the company for which this BAQ report is created. If you are in
an Epicor ERP environment, you can create BAQ reports for either all companies or the current company. If
you are in an Express or Saas Standard environment, this drop-down list is read-only and displays the current
company. In this example, select the All option.

4. Working on the Detail sheet, in the Report ID field, enter an ID for the new report. In this example, enter
CustOV.
The Report ID cannot contain any spaces. Once you enter and save a Report ID, you cannot change this
identifier. You can, however, make a copy of the report to create a new identifier.
If you know the name of the BAQ, you can enter it directly in the BAQ ID field.

10.2.700 439
Chapter 3 | BAQ Report Designer Epicor ICE 3.2 Tools User Guide

5. Enter a Description for the report. In this example, enter BAQ Report - Customer List.

6. Click the BAQ ID button to search for and select the BAQ to use in this report. In this example, choose
zES_Customers.

7. The text entered in the Form Title field displays as the title of the report. In this example, enter Customers
Overview.

8. For SSRS Report, note that CustOV.rdl has been added automatically based on the value in Report ID.

9. Click Save.

10. A new combination of report data definition and report style has been created automatically for your new
BAQ Report. To review, navigate to Report Maintenance. You can leave the BAQ Report Designer open.
Menu Path: System Management > Reporting > Report Style

This program is not available in Epicor Web Access.

11. Click ReportID and then locate and retrieve CustOV.

12. Click the Styles tab.

440 10.2.700
Epicor ICE 3.2 Tools User Guide BAQ Report Designer | Chapter 3

13. Note the following:


• Description and Report Type both indicate an SSRS report.
• Data Definition identifies the report data definition that has been created automatically for your new
report.
• Report Location is the report's location on the SSRS report server relative to the report server settings
in your Epicor ERP application server configuration.

14. Close Report Maintenance and remain in BAQ Report Designer.

10.2.700 441
Chapter 3 | BAQ Report Designer Epicor ICE 3.2 Tools User Guide

Add Option Fields

Use the Option Fields sheet to set up record selection criteria users can enter as parameters when running the
report. In this example, add fields for the state where a customer is located and for the customer name.

1. From the New menu, select New Option Field.

2. The Option Fields sheet automatically displays with a line for the new option.

442 10.2.700
Epicor ICE 3.2 Tools User Guide BAQ Report Designer | Chapter 3

3. Option Field indicates the BAQ Report column on which the option is based. All the columns contained
within the selected BAQ appear on this list, as well as report parameter columns such as
ReportParam_Character01, ReportParam_Number02, ReportParam_Date05, and so on. For this example,
select Customer_State.

4. For FieldLabel, leave the default State/Prov.


FieldLabel is the text that displays next to the option field on the report form.

5. For Compare Operator, leave the default = (Equal To).

6. For Data Type, leave the default nvarchar. This value is based on the data definition of the field selected
in the option field.

7. Click the New button to add one more line for another option.

8. In the line for the new option, for Option Field, select Customer_Name.

9. Change the FieldLabel value to Customer Name.

10. For Compare Operator, leave the default = (Equal To).

11. The Data Type field again defaults to nvarchar.

12. In the Order column, enter 1 for the Customer_Name option and enter 2 for the Customer_State option.
This sets the order in which the options fields display on the report form.

10.2.700 443
Chapter 3 | BAQ Report Designer Epicor ICE 3.2 Tools User Guide

13. Click Save and remain in the BAQ Report Designer.

Test the Report

In BAQ Report Designer, use the Test Report Form action to perform an initial test of the new report.
This verifies the report form and print preview functionality for the new report and enables you to obtain, from
the System Monitor, the report's TableGuid identifier that will be needed for testing the report while you are
working on the report design in Report Builder.

1. With the new report CustOV displayed on the BAQ Report Designer Details sheet, choose Actions > Test
Report Form to display the report's form.

2. On the report form, verify that the option fields that have been added to the form are present.

444 10.2.700
Epicor ICE 3.2 Tools User Guide BAQ Report Designer | Chapter 3

3. Choose Print Preview to display the report.

4. The report displays with a header layout based on the template for new SSRS reports. Note that the BAQ
that is the basis for the report is shown as is the report title that was entered when creating the report.
In the application, PDF is the default print preview format for SSRS reports, Later in the chapter, SSRS Report
Builder will be used to add data fields to this starting point.

5. Close the report and report form, launch the application's System Monitor. Navigate to the Reports sheet
and locate the line for your report.

6. The TableGuid identifier is in the FileName column. You may need to scroll to the far right end of the grid
to locate the column.
The value will be similar to this example. Record , for later use, the actual value you are seeing. You will not
need the REPORT DATABASE: portion.

7. Close or minimize the System Monitor and remain in the BAQ Report Designer.

10.2.700 445
Chapter 3 | BAQ Report Designer Epicor ICE 3.2 Tools User Guide

Design the Report Layout

Use SSRS Report Builder to design the new report's data layout.

1. With the new report CustOV displayed on the BAQ Report Designer Details sheet, choose Actions >
Download SSRS Report.

In order to download the SSRS report, your account must


have the SSRS Report Designer privilege enabled in
User Account Security Maintenance.

Select location and save the report file.

446 10.2.700
Epicor ICE 3.2 Tools User Guide BAQ Report Designer | Chapter 3

2. Open the report with Report Builder to edit and design its layout. For a new report, the report header layout
stored in the template file BAQReport.rdl is applied automatically.

3. In Report Builder, select the Insert tab and then select Table > Table Wizard to run the New Table or
Matrix wizard.

4. On the wizard's Choose a dataset screen, choose the dataset that will be the source of the fields that you
add to the report design. For this example, choose BAQReportResult, which is a one of the standard
datasets associated with a BAQ and BAQ report. Click Next.

10.2.700 447
Chapter 3 | BAQ Report Designer Epicor ICE 3.2 Tools User Guide

5. Starting in the Available Fields list on the Arrange Fields screen, move fields into the report layout. For
this example, move the following fields and then click Next.
• Move Customer_Name, SalesRep_Name, Customer_City, Customer_State, and Customer_Country
to Row Groups.
• Move Customer_CustID and Customer CreditHold to Values.

448 10.2.700
Epicor ICE 3.2 Tools User Guide BAQ Report Designer | Chapter 3

6. On the Choose the Layout screen, enable or disable options for showing totals and grouped data. For this
example, clear all options and click Next.

7. On the Choose a Style screen, choose a style that controls fonts and color. For this example, accept the
default and click Finish to close the wizard.

10.2.700 449
Chapter 3 | BAQ Report Designer Epicor ICE 3.2 Tools User Guide

8. The report layout now includes the selected data fields and choices for layout and style.

9. Click the Report Builder button and then click Save.


Optionally, you can click the Report Builder button again and choose Open to review the report's folder
location on the SSRS report server.

10. To test your design in Report Builder, verify that you are on the Home tab and click Run.

450 10.2.700
Epicor ICE 3.2 Tools User Guide BAQ Report Designer | Chapter 3

11. At the top of the report page, enter the TableGuid identifier obtained from the application System Monitor
earlier in the chapter and click View Report.
The report runs in HTML format, as it would if it was run from SQL Server Report Manager.

12. When done, click Design to return to the Home tab.

13. In Report Builder, you can continue to make adjustments to the report design. As you work, be sure to save
and retest the report as described in steps 9-12. When you are satisfied with the report, click the Report
Builder button and choose Exit Report Builder.

10.2.700 451
Chapter 3 | BAQ Report Designer Epicor ICE 3.2 Tools User Guide

14. In BAQ Report Designer, click Actions > Upload SSRS Report.

In order to upload the SSRS report, your account must


have the SSRS Report Designer privilege enabled in
User Account Security Maintenance.

When you specify the path to the report file you are
uploading, make sure you don't drill down beyond the
parent folder of the reports folder that was created
automatically during download. For example, if you report
has been downloaded to
User/Documents/reports/CustomReports/, the path
for upload will look like this: User/Documents/.

15. In BAQ Report Designer, test the report to verify it in the application. Click Actions > Test Report Form
to open the report's form.

452 10.2.700
Epicor ICE 3.2 Tools User Guide BAQ Report Designer | Chapter 3

16. Click Print Preview to display the report with your design work. Leave the Report Options fields blank
for this test.

17. The report, including all customers, displays in PDF format.

10.2.700 453
Chapter 3 | BAQ Report Designer Epicor ICE 3.2 Tools User Guide

18. Close the report and test the report options added to the form earlier in the chapter. In the State/Prov
field, enter MN and click Print Preview.

19. The report displays with the list limited to customers located in Minnesota. Close the report and report form
when done, but remain in the application.

454 10.2.700
Epicor ICE 3.2 Tools User Guide BAQ Report Designer | Chapter 3

Implement the Report

Add the BAQ report to the menu system in the Epicor ERP application.
For this example, the BAQ report is added to the application menu structure under Sales Management. You can
use locations and values that match the report you are working with.

1. Launch Menu Maintenance.


Menu Path: System Setup > Security Maintenance > Menu Maintenance

This program is not available in Epicor Web Access.

10.2.700 455
Chapter 3 | BAQ Report Designer Epicor ICE 3.2 Tools User Guide

2. On the Menu Maintenance tree, navigate to: Main Menu > Sales Management > Order Management
> Reports. Verify Reports is highlighted.

3. click the Down Arrow next to the New button; select New Menu.

4. On the Detail sheet for the new menu item, enter a value in the Menu ID field. UDXXX01 is entered for
this example.

It is an important standard practice to use a UD prefix


when adding a menu ID. UD stands for User Defined. It
is further recommended that you use UDXXX as shown
in this example and replace XXX with your initials.

456 10.2.700
Epicor ICE 3.2 Tools User Guide BAQ Report Designer | Chapter 3

5. In the Name field, enter Customers Overview to match the report title.

6. Enter a value in the Order Sequence field. For this example, 997 is entered which will place the new menu
item at or near the end of the current list of menu items.

7. Click the Program Type drop-down menu and select BAQ Report.

8. Click Report and then search for and choose the BAQ report. In this example, choose CustOV.

9. Click Save and click OK if you get a security update message.

10. After giving the application about 10 minutes for a scheduled update (or after logging out and back in to
force the update), open the Customers Overview report form.
Menu Path: Sales Management > Order Management > Reports > Customers Overview

10.2.700 457
Chapter 3 | BAQ Report Designer Epicor ICE 3.2 Tools User Guide

11. To display the report, click Print Preview.

12. The report displays in PDF format, as it has earlier in the chapter during report development and testing.

Customize a BAQ Report

The Epicor ERP application customization functionality enables you to add fields to form, including user-defined
fields. Within the customization itself, you can create form and row rules which run whenever users enter data

458 10.2.700
Epicor ICE 3.2 Tools User Guide BAQ Report Designer | Chapter 3

or perform other actions which activate these rules. These rules in turn launch custom events which you define
on the customization.
If you have customization rights, you have full access to all the customization tools available in the Epicor
application. Leverage this functionality to make the BAQ report an efficient and valuable reporting tool for any
business flow within your organization.
The following procedure provides an overview of the workflow for enabling and working with customization
tools.

1. Turn on Developer Mode.

a. When running the application with Modern Home Page interface, you can do this by expanding the
Application Bar at the bottom of the home page and selecting the Wrench icon. Alternately, from the
application Home Page, go to the Settings Page, select General Options and then select Developer
Mode.

b. If you run the application using Kinetic Home Page interface, use the overflow menu in the top right
corner of the home page window to select Developer Mode.

You can also press Ctrl + Shift + D to activate Developer


Mode.

2. Navigate to and open the BAQ report. In this example, navigate to Sales Management > Order
Management > Reports > Customers Overview to open the BAQ report created earlier in the chapter.
With Developer Mode enabled, the Select Customization window displays. All existing customizations for
the BAQ report display. For this example, there are no existing customizations.

10.2.700 459
Chapter 3 | BAQ Report Designer Epicor ICE 3.2 Tools User Guide

3. To create a customization from the original report form, select the Base Only check box and click OK.

4. The BAQ report form displays. To customize this form, click the Tools menu and select Customization.

5. The Customization Tools Dialog displays on top of the report form window. Notice also that a grid now
overlays on top of the report form.

460 10.2.700
Epicor ICE 3.2 Tools User Guide BAQ Report Designer | Chapter 3

6. You can now add fields, create rules, and modify the code for the report program. You access all of this
functionality within the various tabs and the Tools menu on the Customization Tools Dialog.
To learn about the customization tools, review the Epicor ICE User Experience and Customization Guide.
Multiple chapters within this book describe all of the customization tools in detail.

10.2.700 461
Chapter 3 | BAQ Report Designer Epicor ICE 3.2 Tools User Guide

7. After you finish customizing the form, click Save on the Customization Tools Dialog.

8. In the Customization Save Dialog enter a unique Name for the customization. For this example, enter
Customers List Custom01.

462 10.2.700
Epicor ICE 3.2 Tools User Guide BAQ Report Designer | Chapter 3

9. Enter a Description that helps identify the purpose for the customized BAQ report. For this example, enter
Customization Demo.

10. Click Save. Optionally enter comments when prompted and click OK. Exit Customization Tools Dialog.

11. Turn off Developer Mode.

a. When running the application with Modern Home Page interface, you can do this by expanding the
Application Bar at the bottom of the home page and deselecting the Wrench icon. Alternately, from
the application Home Page, go to the Settings Page, select General Options and then clear Developer
Mode.

10.2.700 463
Chapter 3 | BAQ Report Designer Epicor ICE 3.2 Tools User Guide

b. If you run the application using Kinetic Home Page interface, use the overflow menu in the top right
corner of the home page window to select Developer Mode.

12. You now can add the customization to the application menu. Open Menu Maintenance
Menu Path: System Setup > System Maintenance > Menu Maintenance

This program is not available in Epicor Web Access.

In the Menu Maintenance tree, select the BAQ report for which you have created a customization. In this
example, navigate to and select Customers Overview.

464 10.2.700
Epicor ICE 3.2 Tools User Guide BAQ Report Designer | Chapter 3

13. On the Detail sheet, select the customization from the Customization drop-down list.

14. Click Save on the Standard toolbar.

Your customized form now is applied when the report is selected from the application menu. Users within the
current company will now use this custom version of the BAQ report.

10.2.700 465
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

Chapter 4: Searches

Search programs are available throughout the application. The standard searching tools enable you to easily locate
and organize records using filters and specific criteria. In addition to the standard searches, you can also create your
own specific searches to quickly and precisely locate the information you need, where and when you need it.
Tools are available to modify search programs. Quick Searches are customized search programs you can create from
Business Activity Queries (BAQs) that pull in unique search results. BAQ Searches leverage BAQs to locate search results.
Advanced Searches are set up within a smart client dashboard; they contain specific fields you can use for defining the
search results. Use Data Tag Searches to find records grouped together through a specific data tag definition assigned
to each record. Create Named Searches that use the default options you want when the search program is launched.
The Enterprise Search is a separate search application you can use to retrieve structured content - like sales orders,
jobs, AR invoices - from your Epicor database.
This chapter explores how you can create and use these search programs, so your users can more efficiently locate the
information they need throughout the application.

Default Search Interface

You launch search programs by clicking the search buttons found on the sheets within the application. Typically,
these buttons are labeled with the primary record queried through the search program. You can also launch
some search programs by clicking the Binoculars button on the Standard toolbar.

1. In this example, the Sales Order button for the Sales Order Entry > Summary sheet displays.

2. You can also search for sales orders by clicking the Binoculars button on the Standard toolbar.

When you click the search button, the record’s search program appears. In this example, clicking the Sales Order
button launches the Sales Order Search program.

Default Features

Default features on each search window:

1. The Basic sheet displays all the default options within the search program. These items are the primary fields
you can use to limit the search results.

466 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

2. Use the Quick Search sheet to find and select a quick search program.

3. The BAQ sheet contains a list of available Business Activity Queries you can use to generate the search
results.

4. The Advanced sheet contains a list of available Advanced Search options created through the Dashboard
program.

5. The Data Tags sheet contains a free-form field where you can enter one or more data tags applied to the
records for which you are searching.

6. Use the Named Search drop-down list to select a named search option. When you select a named search,
either the Basic sheet’s search options populate with pre-defined values, or the BAQ Search or Quick Search
program displays. Click the Named Search button to create Named Searches.

Named Searches, Quick Searches, BAQ Searches,


Advanced Searches, and Data Tag Searches are explored
later in this chapter.

7. To begin your search, click the Search button.

8. The records display in the Search Results grid.

10.2.700 467
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

9. To pull in multiple records within the current program, highlight two or more records on the grid and then
click OK.

10. To pull in the first 100 records, click the Select 1 - 100 button.

11. To display the next set of records in the grid, click the Next 100 button.

12. Click the New Search button to clear the results and start a new search.

13. To save the current search settings but remove the current search results, click the Clear Results button.

14. You can also limit how many rows are returned within the search results. To do this, click the Options
button.

15. The Search Options window displays.

468 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

16. If you want all the available rows to display within the Search Results grid, select the Return All Rows check
box.

17. When you finish defining the search options, click OK.

18. To limit how many rows display within the Search Results grid, enter a value within the Maximum Rows
Returned field. In this example, this search program only displays the first 100 records in the Search Results
grid.

19. When you finish defining the search options, click OK.

Hot Key Searches

To open the search program on any field where a search is available, press <Ctrl> + S. If data is available in the
field, the search program displays with this specific data in the Starting At field and then returns search results
based on that value. If the field is blank, the search form displays, but the search results do not return automatically.
To perform a hot key search:

1. Place your cursor in a field that has a search program and enter the data you want to use to retrieve search
results; press <Ctrl> + S on your keyboard.

10.2.700 469
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

2. The search program displays.

470 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

3. The data entered into the field appears in the Starting At field.

4. The search is run and the results display in the Search Results grid.

These features are available within each search program. The rest of this chapter explains how you can modify
and personalize these search programs.

Quick Searches

The Quick Search functionality is a dynamic tool you use to create configurable searches that improve the
productivity of search results. You can privately restrict quick searches for your own user account or share them
publicly for other user accounts.
A quick search can be the default search program that displays when a search is launched either from the Standard
toolbar’s Search button or from a specific field’s search button. It can also be the primary search that displays
with other key programs near the top of a context menu. All quick searches appear on the Quick Searches sheet
within basic search programs that query similar data. Quick searches can also be used with the Named Search
feature, so you can launch a quick search immediately.

10.2.700 471
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

Create a Quick Search

The Quick Search functionality is a dynamic tool you use to create configurable searches you can then use within
your own user account or share publicly for other user accounts - improving the productivity of searches.

Activate Quick Search

You indicate which users can create quick searches through User Account Maintenance.
Menu Path: System Setup > Security Maintenance > User Account Security Maintenance
To give a specific user the Quick Search rights:

1. Select a specific user on the Detail sheet.

2. Navigate to the Options sheet.

3. Within the Tools Options group box, select the Can Maintain Quick Search check box.

4. Select the Can Maintain Enterprise Quick Search check box to indicate this user can create quick searches
using the Enterprise Search feature. This functionality is explored later in this chapter.

472 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

5. Click Save on the Standard toolbar.

This user can now create and update quick searches throughout the application.

Quick Search Detail Sheet

You create quick searches through Quick Search Maintenance. To launch this program, right-click any field used
for searches and select Quick Search Entry from the context menu. In this example, you create a quick search for
Serial Tracked Parts.

1. First, right-click within the Part field; a context menu displays.

2. Select Quick Search Entry.

If the Quick Search Entry option is not available from the


field's context menu, launch the Quick Search
Maintenance program from the main Search window. To
do this, click on the Search icon in the Main Toolbar.
Then right-click anywhere on the background of the
search form and select the Quick Search Entry option
from the context menu.

10.2.700 473
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

3. The Quick Search Maintenance program displays.

4. To create a new search, click the New button on the Standard toolbar. Note that the System check box
is clear which indicates that this search is created by user. System quick searches are installed with the Epicor
ERP application, and Epicor recommends not to change them.

5. Enter a Quick Search ID for the quick search. This identifier displays on the Quick Search tab found within
search programs that query similar data. In this example, you enter SerialTracked.

6. Enter a Description for the quick search. This defines the concise explanation for the quick search; it also
displays on Quick Search tabs.

7. Now click the BAQ button to find and select the Business Activity Query used as the base query for the
quick search. You can use the system BAQs for the search. You can also use any custom BAQs you create.
In this example, you select EPIC03-SerialParts.

8. If you want to create a new BAQ or edit an existing BAQ, select Business Activity Query from the Actions
menu.

To learn how to create Business Activity Queries, refer to


the Business Activity Queries chapter. To learn how to use
a Business Activity Query as a search option, refer to the
BAQ Search section later in this chapter.

9. Select the BAQ column used to return the search results from the Return Column list. All the columns from
the selected BAQ display on the list. In this example, you select the Part_PartNum option.

10. The Context Key (Like) field indicates whether this quick search is linked to any other search input fields
that share the same LIKE property. If you are creating a quick search against an input field that does not
share a LIKE property with another field, the Context Key (Like) field is blank.

11. The Called From field defines the program from which this quick search pulls its data. In this example, the
quick search pulls its data from the Erp.UI.PartEntry program (form).

474 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

12. The Created by field displays the name of the user that created the quick search.

13. If you want this quick search available for all users within the company, select the Shared check box.

14. The All Occurrences check box defines where this quick search is used. When selected, the check box
indicates this quick search is available for all searches that share its Context Key (Like) property. When clear
however, the check box indicates this quick search is only available from the primary program that launches,
or calls, this quick search.
For example, you create a quick search that has Part_PartNum as its Context Key (Like) value. If you do
not select the All Occurrences check box, this quick search is only available from within Part Maintenance.
If you select this check box, however, this quick search is available when users search for parts within Sales
Order Entry, Opportunity/Quote Entry, Job Entry, and anywhere else users search for a part number value.

15. Select the Context Default check box to indicate this quick search appears with the main options at the
top of the search input field’s context menu.

16. Select the Base Default check box to indicate this quick search is the primary search program for the current
search input field. When users click the Search button on the Standard toolbar or a search button next to
a field, this quick search program displays instead of the original search program.

17. You can also use the Suppress Base check box to indicate whether the base search form is available to
users. When selected, the Base Search button does not appear on the quick search window. Users are then
prevented from displaying the original search form. To override this setting, users can press the <Shift> key
while clicking the search button; the base search form will launch instead. Suppress Base checkbox is
enabled when the Base Default is checked.

18. Select the Validation Only check box to utilize the quick search as a data entry validation tool. The
Validation Only Quick Search is used to verify, while you enter data, the new value entered into the
Context Key (Like) Data Column. When this change is sent to the database, the new value is compared
against the results of the Validation Only Quick Search. If the new value is found within the quick search
results, the data is entered into the database. If the new value is not found in the quick search results,
however, then a Quick Search Validation Exception message displays and you are not able to enter this value
into the data. For more information about creating quick search criteria, read the next Create a Quick Search
– Criteria section.

This functionality only works when the quick search criteria


do not use any Prompt Type values. If one of the criteria
values is Prompt Type, the Validation Only check box is
not available.

For example, you want to create a customization that only displays Cash Sales for customers from a specific
American state – Minnesota. A system Business Activity Query (BAQ) is available called zCustomer01 that
searches for these records. You decide to use a Validation Only quick search against this BAQ to validate
the customer data can only be pulled from Minnesota records. You create a quick search that has one
criterion: Customer_State Equals Constant “MN”. The Validation Only Quick Search then makes sure that
all the entered Cash Sales customer records have Minnesota addresses.

19. When you finish defining the main attributes of the quick search, click Save.

10.2.700 475
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

Quick Search Criteria

When you finish defining the main details of your quick search, you need to indicate which search input fields
display on the quick search form. To do this, you set up criteria for each field.

1. Navigate to the Criteria > Detail sheet.

2. The first criterion you create is a check box used for finding serial tracked parts. To do this, click the New
menu.

3. Select New Quick Search Criteria.

4. Now select the Criteria Column you need. This column from the Business Activity Query is used for the
search input field. All the columns from the BAQ selected on the Detail sheet display on this list. In this
example, select the Part_TrackSerialNum column.

5. The text you enter in the Caption field displays on the quick search form. In this example, accept the default
value of Track Serial.

6. The Condition value defines how the search input field evaluates the value the user enters. The search
results that display resolve against the condition you select from this list. In this example, select = (Equal
To). Available options:
• = (Equal To) – This condition returns a search result if it is the same as the search value. This condition
also ignores trailing blanks, so “abc” is equal to “abc “. Typically, you use this condition instead of the
MATCHES condition, as this condition has better performance.
• < > (Not Equal To) – This condition returns a search result if the first expression is not equal to the
second expression.
• > (Greater Than) – This condition returns a search result if the first expression is greater than the second
expression.
• < (Less Than) – This condition returns a search result if the first expression is less than the second
expression

476 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

• >= (Greater Than or Equal To) – This condition returns a search result if the first expression is greater
than or equal to the second expression. This condition has better performance than the BEGINS condition.
• <= (Less Than or Equal To) – This condition returns a search result if the first expression is less than or
equal to the second expression.
• BEGINS (Starts with the entered value) – This condition is useful in a WHERE phrase that specifies which
records should be retrieved from within a block of records. This condition is different from the MATCHES
condition, which requires all records be reviewed by the search query.
• MATCHES (Is the same as the entered value) – A character expression you use to search on character
strings. This can include a constant, field name, variable name, or expression whose value is a character.
Note the character expression cannot have any trailing blanks; for example, “abc” does not match “abc
”.
When the Condition Value is active, users can enter asterisks (*) as wildcard search values; this indicates
any group of characters works for the search results – including a null group of characters. A period (.) can
also be used to indicate any single character can be used in that position. If you want these characters to
be literal values instead of wildcard values, enter a tilde (~) value. For example, “~*a~.b” is a match for
“*a.b”. Enter a double tilde (~ ~) to make the match pattern a literal quoted string in a procedure file.

The application uses sort code values to prioritize how it


gathers search results. All uppercase letters sort before
all lowercase letters, so the lowercase records are greater
than the uppercase. For example, a is greater than Z, but
it is less than b.

7. Use the Criteria Type drop-down list to define the input field type that displays on the quick search.
Depending on the criteria type, a different field displays on the quick search form. In this example, select
the Prompt type. Available options:
• Prompt - Users directly enter search input values through this field. These values are then calculated
against the Condition value to generate the search results. If you use the Prompt type on a quick search,
it cannot be used as a data entry validation tool. The Validation Only check box is not available on the
Detail sheet.

Each quick search must have at least one prompt field.


If you do not have at least one prompt field as a search
option, users will receive an error message when they
attempt to launch your quick search.

• Constant - Users define a fixed value for the current criterion through this field. The quick search then
uses this fixed value to gather the search results. For example, you create a criterion that uses a constant
value of Customer_State = “MN”. This criterion causes the quick search to only find and select customer
records that have Minnesota addresses.
• Value List - This type is a field that displays a drop-down list. When you select this type, you must create
the values that display on this list using Quick Search Value Items; these items are explored later in this
section.
• Radio Set – Use this type to create a set of radio buttons for the quick search. When you select this
type, you define the radio buttons using Quick Search Value Items; these items are explored later in this
section.

8. The Criteria Value list defines the return value used to filter the search results. This is an optional value and
is active when you select the Constant option from the Criteria Type list. All the columns found on the BAQ
that were selected on the Detail sheet display.

10.2.700 477
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

9. If you want this search criterion to ignore null records, select the Filter On Null check box. This causes the
quick search to filter records that have a null value in the selected Criteria Column.
However if you want null records to display, clear this check box; only records that have a blank value display
within the results. For example, if the criterion searches by Customer_State and you clear this check box,
only customer records with blank State fields appear in the search results.

The Filter On Null check box is available when the Criteria


Column is a character field or a datetime field.

10. When you finish creating a search input field, click Save on the Standard toolbar.

11. The next search input field you create is a series of radio buttons you use to filter the quick search results
on the Manufactured, Purchased, and Sales Kit part types. To create these radio buttons, from the New
menu, select New Quick Search Criteria.

12. For this Criteria Column, select the Part_TypeCode value.

478 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

13. Enter the Caption you want to display. In this example, enter Part Type.

14. You want the search results to display the part records that match each radio button’s values. From the
Condition list, select = (Equal To).

15. From the Criteria Type list, select Radio Set.

16. Next you must define the radio buttons that display on the search form. To do this, from the New menu,
select New Quick Search Value Item.
The Value Items grid displays.

17. Enter the Display Member you want to appear next to the radio button. In this example, enter
Manufactured.

18. Now enter the Value Member used against the records to filter the search results. In this example,
manufactured parts use a value member of M, so you enter this value in this field.

To find out the value members used by the database,


launch the Data Dictionary. To learn how to use this
program, review the Business Activity Queries chapter.

19. To create a new row, press <Tab> . Add all the radio buttons you need. In this example, two other part
types are available, Purchased (P is their value member) and Sales Kit (K is their value member).

20. When you finish, click Save.

21. You need to create one more search input field that limits the results directly by part number. From the
New menu, select New Quick Search Criteria.

22. Because this search input field filters the results based on part number, from the Criteria Column list, select
Part_PartNum.

10.2.700 479
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

23. In the Caption field, enter Part Begins With.

24. From the Condition list, select BEGINS.

25. Because users directly enter values in this field, from the Criteria Type list, select Prompt.

26. Click Save.

You have now finished creating the search input fields that display on this quick search form.

480 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

Test a Quick Search

Always test your quick search to make sure it is working properly. To do this, use a special command from the
Actions menu.

1. From the Actions menu, select Test Quick Search.

2. Your quick search program displays. Use the search input fields to verify the quick search works correctly.

10.2.700 481
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

Display a Quick Search

Users have a number of ways to launch your quick search. You can launch quick searches from within a related
search program, from a context menu, or directly through a search button. This section explores these various
launch methods.

Quick Search Tab

All quick searches that query data related to a standard search program appear on a search’s Quick Search sheet.
If multiple quick search options are available, users can select the quick search they want to display.

1. Launch the search program by clicking its specific search button. In this example, click the Part button in
the Part Maintenance program.

2. The search program displays. In this example, it is the Part Search program.

482 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

3. Click the Quick Search tab.

4. All the quick searches associated with the current search program display within the Quick Search grid.

Be aware that if you display the Quick Search Tab on a


search form (program) and then create new quick search
options, these new options do not immediately display
on the Quick Search Tab grid. To add these quick searches,
close the search form and its parent program. Now
re-launch the parent program and the search form. When
you display the Quick Search Tab, your new quick searches
appear as expected.

5. Highlight the quick search you want to use. In this example, you select the SerialTracked quick search.

6. Click the Search button.

7. The quick search program displays.

10.2.700 483
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

Context Menu Options

Quick searches can also display in two locations on a field’s context menu. They can launch from the default list
that displays at the top of a context menu; they can also display on a Quick Searches sub-menu.
To place a quick search on the default list:

1. Return to Quick Search Maintenance.

2. Click the Quick Search ID button to search for and select the quick search you wish to modify.

3. Select the Context Default check box.

4. Click Save.

484 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

5. Return to Part Maintenance.

6. Right-click the Part field.

7. The Context Menu displays.

8. The quick search appears within the list of the default Open With programs. Select this command so that
the quick search displays.

All the default Open With programs display in alphabetical


order.

Default Search Program

You can also set up the quick search to become the default search program. This causes your quick search to
display instead of the original search program.

1. Return to Quick Search Maintenance.

10.2.700 485
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

2. Click the Quick Search ID button to search for and select the quick search you wish to modify.

3. Select the Base Default check box.

4. Click Save.

5. Return to Part Maintenance.

486 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

6. Click the Part button.

7. The Serial Tracked Parts search program displays.

10.2.700 487
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

You can also use a keyboard shortcut to display a quick


search selected as the Base Default for a field. To do this,
place your cursor inside the field, then press <Ctrl> + S.
The default search program displays.

Business Activity Query Searches

Business Activity Queries (BAQ) are used throughout the application to search for related data. You create BAQ
Searches in the Business Activity Query program by selecting “Like” columns. When fields in your query are
selected as “Like” Columns and this same field is used for searching in various programs, the BAQ becomes an
option within the search program.
You can indicate data from your query is available to all users searching for related data on the BAQ Search sheet.
You select fields from the Available “Like” Columns list and move them into the BAQ “Like” Columns list.
Available features:
• The Available “Like” Columns list contains all the fields selected for your query on the Display sheet.
• The BAQ “Like” Columns list displays the items you move over from the Available “Like” Columns list. Users
searching for information similar to the data contained in the BAQ “Like” items can access your BAQ Search.
Many standard search programs throughout the application contain a BAQ sheet that makes your query available
when users search for related data.

You cannot use system queries (beginning with the letter z)


for BAQ Searches because you cannot modify them. However,
you can copy a system query and then select “Like” columns
to be used on the BAQ Search sheet. To learn how to copy
and modify an existing BAQ, refer to the Modify an Existing
Query section in the Business Activity Queries chapter.

Enable BAQ Search Fields

In the previous chapter, you created a new query called EPIC03-SalesInfo that displays sales order information.
You decide you want users to access this query from the Customer Maintenance and Sales Order Entry programs
so they can look up data related to customer and sales order numbers.
Menu Path: System Management > Business Activity Queries > Business Activity Query

This program is not available in Epicor Web Access.

To enable fields in a query for use in BAQ Searches:

1. In the Query ID field, enter the query. In this example, you enter EPIC03-SalesInfo.

488 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

2. Verify the Shared check box is selected. The query must be shared in order for your users to access this
BAQ from a search form.

3. Click the BAQ Search tab.

10.2.700 489
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

4. Select the “like” columns used for the BAQ search. In this example, you select the Customer.CustID field in
the Available “Like” Columns list.

5. Click the Right Blue Arrow button.

490 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

6. The selected field moves to the BAQ Search “Like” Columns list.

7. In this example, you also select the OrderHed.OrderNum field and move it to the BAQ Search “Like”
Columns.

The sequence in which you select columns for display on


the BAQ search is important. When the BAQ is run, the
application uses the first column that shares the same
LIKE value as the search field’s LIKE value to return values.
This can cause unexpected results. For example, if the
search field is Part.PartNum and the first column in the
BAQ sequence that has a Like value is the
GlbPart.GlbPartNum column, the search uses this column
to pull return values. If this LIKE column has no value, the
BAQ Search will return all records which have no value in
this column.

8. Click the Save button on the Standard toolbar to save the query.

Use a BAQ Search

Once the BAQ Search information is saved, you can now leverage this BAQ in searches that use the Customer
ID and the Sales Order Number fields. For example, this query is now available when you search for sales orders

10.2.700 491
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

in Sales Order Entry and when you search for Customer IDs within Customer Maintenance. During this example,
you launch the BAQ Search within Sales Order Entry.
Menu Path: Sales Management > Order Management > General Operations > Order Entry

1. Click the Sales Order button to launch the Sales Order Search form.

2. Select the BAQ sheet.

3. Select CustomerOrders.

4. Click the Search button.

5. The Search Results grid displays your query data.

492 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

Advanced Searches

An Advanced Search is a dashboard you access to search for related data from a standard search window.
The Advanced Search functionality is designed around the concept of “Like” columns. Similar to the “Like”
columns used in a BAQ Search, the Advanced Search also uses “Like” columns; however, the data displays as a
Dashboard and opens in a separate window. You can then use the dashboard to search for specific data, select
a record, and pull the record back to the original program from which you were searching.
Advanced Searches are available wherever you can launch a search window. You launch these programs either
by clicking a search button or from a context menu.

This section of the guide reviews how to access and use an


Advanced Search. For directions on how to create an Advanced
Search, refer to the Dashboards chapter.

10.2.700 493
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

Use an Advanced Search

Advanced Searches are accessed through the search button in many programs or through a field’s context menu.
In this example, the Sales Order Entry program is used to demonstrate how you can access an advanced search.
Menu Path: Sales Management > Order Management > General Operations > Order Entry

1. Click the Sales Order button.

2. Select the Advanced sheet in the Sales Order Search window.

3. Notice a dashboard has been set up as an Advanced Search.

4. Select FulfillmentWBSearch and click the Search button.

5. The Fulfillment Workbench Search dashboard opens in a new window on your workstation.

6. You can now use the dashboard to search for specific records using the criteria available on the window.
In this example, you want to search for sales orders for the Distribution Product Group. You select Distribution
from this list.

7. Click the Search button to retrieve the records that match the criteria.

8. The results display in the Open Sales Order Release Search grid.

9. Once you find the record for which you are searching, select it in the grid.

10. Click OK.

11. The record selected in the dashboard displays in Sales Order Entry and you can now modify the sales order
as you need.

12. You can also right-click a field to access a Search (and any defined advanced searches) from the context
menu.

Named Searches

Use a Named Search to create a series of pre-set search options. In the Sales Order Search program, for example,
you can create a Named Search that only pulls in open orders created for Bill To customers. You could also create
a Named Search that automatically launches a BAQ Search or a Quick Search.
You use named searches in several ways. You can launch these searches manually from the Named Search
drop-down list within each search program. A specific Named Search option can be the default for the search
program; each time you launch the search, the Named Search options display. You can also set up Named
Searches to automatically populate data within either the search program or its parent program.

Create a Named Search

To create a named search:

1. Launch the Sales Order Search program.

494 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

2. Click the Named Search button.

3. The Named Search Options window displays.

10.2.700 495
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

4. Navigate to the Detail > Defaults sheet.

5. Click New.

6. Enter a Named Search ID for your new named search. In this example, you want to create a search that
pulls open sales orders and sorts them by their Purchase Order Numbers. Enter OPEN in this field.

7. In the Description field, enter Open Sales Orders.

8. The Application field displays the program for which you are creating the named search. In this example,
Erp.UI.SalesOrderEntry.dll displays.

9. The Search Form field displays the name of the search program being modified. In this example, Sales
Order Search displays.

10. Select a Search Type for this named search. Available options:
• Basic Search – Use this search type to modify the default values on the search program’s Basic sheet.
When you select this option, the search form’s Basic sheet displays.
• BAQ Search – Use this search type to select a Business Activity Query to populate the named search.
To learn how to create these search programs, review the BAQ Searches section in this chapter.
• Quick Search – Use this search type to select a Quick Search that populates the named search. To learn
how to create these search programs, review the Quick Searches section found in this chapter.

496 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

11. If you select either the BAQ Search or Quick Search type option, the Search Using drop-down list displays.
This list displays all the BAQs or Quick Searches available for this search program. Select a search option you
want from the list.

12. In this example, however, you are defining options for the Basic Search type.

10.2.700 497
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

13. When you select this Search Type, the Basic sheet from the current search program displays.

14. Enter the default values you want for this named search. In this example, you want the results sorted by
purchase order, so from the Sort By field, select PO Number. You also want only open orders created for
sold to customers to display; these business entities are the customers that purchased the goods. Bill To
customers are the business entities who pay for the goods.

15. Click Save.

Each search program has different options on its Basic


sheet. These Basic sheet options only display for you as
an example.

Named Search Details

Now you can select several options for the named search. These options affect how the named search runs when
it activates. To define these options:

1. Navigate to the Detail > Options sheet.

2. Select the Default check box if you want this named search to be the default for the current search program.

3. When the Default check box is selected, the Auto Execute check box becomes available. Selecting this
check box causes the search program to run when the search program launches, automatically populating
the Search Results grid with data.

4. When the Auto Execute check box is selected, the Unpin Criteria Sheet check box becomes available.
Selecting this check box causes the main search sheet to automatically hide; only the populated Search
Results grid displays.

498 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

5. When the Return All Rows check box is selected, the Search Results grid displays all the data that matches
the options within the named search.

Due to web browser limitations, this option is not


supported in Epicor Web Access, where search results are
always paged.

6. If you clear the Return All Rows check box, however, the Maximum Rows Returned field becomes available.
Enter the highest number of rows you want to display within the Search Results grid. In this example, this
named search displays a maximum of 1,000 records (rows).

7. Select the Single Value Auto Select check box to indicate that if the search program only locates one
record, this record automatically populates within the maintenance or entry program.

When you activate both the Auto Execute and Single


Value Auto Select check boxes, the search window never
appears as only one record loads into the program.
Because of this, you cannot access the search interface.
If you need to edit the named search, hold down the Alt
key as you launch the program. The original search form
displays and you can then launch the Named Search
Options window.

8. When you finish defining your options, click Save.

9. Close the Named Search Options window.

10. You can now see this search program in action. Click the Sales Order button.

10.2.700 499
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

11. The Sales Order Search window appears, using the named search options you selected. Notice in this
example, the search program automatically populates the Search Results grid with open orders, sorting
them by PO Number.

12. It also hides the Search program’s main sheet; these options are now a sheet at the top of this window.

Each time you launch this search program, it displays using these options.

Auto Populate Data

You can also personalize each program to automatically load in all the records selected through a named search.
You can then immediately populate a maintenance or entry program with the data you want.
To personalize a program to do this. In this example, you use Sales Order Entry:

1. From the Tools menu, select Options.

500 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

2. The Options window displays.

3. Notice the As the Form Opens group box. The options in this group box define some actions that run each
time you launch the program.

10.2.700 501
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

4. Select the Auto Populate Data radio button. This indicates you use a named search to automatically
populate the current program with records.

5. The drop-down list below the Auto Populate Data radio button becomes active. All the named searches you
have created for this program display on this list. In this example, you select the OPEN named search.

6. Click OK.

7. Now close and reopen the Sales Order Entry program you just personalized.

8. Now each time you launch this program, all the open sales orders automatically populate within the program.
You can use the Navigation toolbar to find and select the order you need.

Auto Load Search

You can define a similar default action using the Auto Load Search option. You also set up this value within the
Options window.

1. From the Tools menu, select Options.

502 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

2. The Options window displays.

3. Select the Auto Load Search radio button. This indicates you want the search program to automatically
display each time you launch the program.

4. The drop-down list below the Auto Load Search radio button becomes active. All the named searches you
have created for this program display on this list. In this example, you select the OPEN named search.

10.2.700 503
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

5. Click OK.

6. Close and reopen the Sales Order Entry program you just personalized.

7. Now each time you launch this program, the Sales Order Search program automatically displays.

8. Notice that, by default, the named search’s options display within the Basic tab.

504 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

Override Search Options

You can always restore the original search program. To do this, press the <Shift> button on your keyboard and
then launch the search program. The original search program appears – displaying its Basic sheet. You can then
select any Named Search, BAQ Search, Quick Search, or Advanced Search created for this search program.

Data Tag Searches

Use Data Tag Searches to find and select records grouped together by private or shared tags.
Tags are unstructured text values that provide a way to associate otherwise unrelated records so that you or
other users can search for them. For example, you may have a group of customers you want to review on a
regular basis. You can create a private data tag for your important customers called “XXXImportant” (where
“XXX” is your initials) and use the Data Tag Search from Customer Maintenance to retrieve all the records at the
same time. You might also want to group a number of sales orders for review by someone else. You can apply
a public data tag called OrderReview that a sales manager can use from Sales Order Entry.
Private data tags are associated with your user account. Other users cannot retrieve records using your private
tags and, likewise, they cannot see or edit them. Public data tags can be viewed and used in Data Tag Searches
by all users. You can add as many data tags as needed to a record, each separated by a space. However because
the tags are space delimited, you cannot include a space as part of a data tag.

Add Data Tags to a Record

You can add data tags to any record throughout all the programs in the application. In this example, Customer
Maintenance is used to demonstrate how you can add data tags to a record.
Menu Path: Sales Management > Order Management > Setup > Customer

1. Click the Customer search button and retrieve one or more records.

10.2.700 505
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

2. Right-click the main field; from the context menu, select Tag Record.

3. The DataTags window displays.

506 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

4. To add a private data tag—one for your use only—enter the data tag value into the My Tags field. If other
tags are already in the field, add a space and then the new tag.

5. To add a shared data tag—one that can be used by others—enter the data tag value into the Shared
Tags field.

6. Click OK.

7. You return to the Customer Maintenance window. You do not need to save the record for the tag to be
in effect.

Add Data Tags to Records in a Grid

To tag records in a grid:

1. To add a tag to some, but not all, of the records in a grid, select one or more records. You can use the
Ctrl key with your left mouse button to specifically select more than one row.

10.2.700 507
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

2. Right-click one of the selected rows and select Tag Selected.

3. Optionally, you can select Tag All.

4. The DataTags window displays.

5. Enter one or more data tags, either private or shared, as you need.

508 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

6. Click OK.

Perform a Data Tag Search

Once data tags are added to records, you can perform a Data Tag search.

1. Click the Customer button.

10.2.700 509
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

2. The Customer Search displays.

510 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

3. Click the Data Tags tab.

4. In the Data Tags field, enter one or more tags.


To search using multiple tags, separate each one with a space. The search assumes the OR condition between
the tags. The results display records that contain at least one of the listed tags.

5. Click Search.

6. The Search Results grid displays all records where either a private tag or a shared tag matches the search
criteria.

Data Tags and BPM Directives

Business Process Management method directives and data directives can leverage data tags to create custom
application functionality. You can define a condition statement that checks for the presence of a data tag on a
record. This condition statement can then be used as part of a directive that sends you an e-mail when a record
you tagged is modified. Also, you can use actions to add one or more data tags to a new record or remove data
tags from an existing record.
Adding a data tag to a record means that a previously untagged record now displays in your Data Tag search
results after it is updated. For more information about BPM conditions and actions you can use with the data
tagging feature, review the Conditions and Actions – The Complete List section in the Business Process
Management chapter.

10.2.700 511
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

Data Tag Maintenance

Use Data Tag Maintenance to view and manage the list of data tags used throughout the application. With this
program, you can search for, view, and optionally purge data tags.
To use Data Tag Maintenance:
Menu Path: System Management > Purge/Cleanup Routines > Data Tag Maintenance

1. Click the Code button.

2. The Search Form displays. You can enter values into one or more of the Basic Search criteria fields to limit
the number of results.

512 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

3. Enter a TableName to limit the search for data tags created against a specific table. You must know the
table name. The search will not return partial matches.

4. Enter the name of a Tag if you want to search for a specific data tag. You must know the tag name. The
search will not return partial matches.

5. Select a Type to search for only private or public tags. You can select either All, Shared, or Not Shared.

6. Select the name of a User to search for data tags created by that specific user.

7. Use the Date After or Date Before fields to search for data tags entered after or before a specific date.

8. Click the Search button.

9. The Search Results display.

10.2.700 513
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

10. Select the search results that you want to review and possibly purge.

11. Click OK.

12. You return to the Data Tag Maintenance window.

514 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

13. Click the List tab to see all the tags you selected in a grid.

14. If you want to purge some, but not all of the data tags, click the Selected check box next to each tag that
you want to delete.

15. From the Actions menu, select Purge Selected.

16. Optionally, you can select Purge All to purge all the tags in the grid.

Predictive Search

The Predictive Search feature reduces the time spent on searching for a particular record.
User with security rights maintain Predictive Searches using the Predictive Search Maintenance program. To access
the program, right-click on a field and from the context menu, select Predictive Search Entry.
To create a predictive search, you first select a Business Activity Query (BAQ) that defines the search data. Then
you configure the fields you want to display on the tooltip window. You can limit the BAQ to only display the
top number of rows you define. You can also indicate if the predictive search is available for all DB field occurrences
within the Epicor application.
When you configure a key field with the predictive search, as you start typing in the field, the suggested results
display in a floating tooltip window. The search results change dynamically as you type, which makes the searching
easier and more efficient.

Activate Predictive Search

You indicate which users can create and edit Predictive Searches through User Account Maintenance.
Menu Path: System Setup > Security Maintenance > User Account Security Maintenance
To give a specific user Predictive Search rights:

1. In the User ID field, enter Manager and press <Tab>.

10.2.700 515
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

2. Navigate to the Options sheet.

516 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

3. Within the Tools Options group box, select the Can Maintain Predictive Search check box.

4. Click Save on the Standard toolbar.

5. Exit User Account Security Maintenance.

When the user right-clicks on a field, the Predictive Search Entry becomes available on the context menu. This
user can now create and edit predictive searches throughout the application.

Define Source BAQ

Business Activity Query provides the datasource for your search results. You can use either the system BAQs for
the search or you can create custom BAQs to supply the data you need.
Menu Path: System Management > Business Activity Queries > Business Activity Query

This program is not available in Epicor Web Access.

1. Click New.

10.2.700 517
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

2. In the Query ID field, enter XXX_CustomerList, where XXX are your initials.

3. In the Description field, enter Customer List Predictive Search.

4. Select the Shared check box.

5. Navigate to the Query Builder > Phrase Builder sheet.

518 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

6. Above the list of tables, in the filtering field, enter Cust.

7. From the list, select the Erp.Customer table and drag it on the canvas in the center pane.

8. Navigate to the Display Fields > Column Select sheet.

10.2.700 519
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

9. Expand the Customer table.

10. Add Cust.ID and Name fields to the list of Display Column(s).

11. Navigate to the Analyze sheet.

520 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

12. Click Test and verify the BAQ retrieves the list of customers.

13. Click Save.

14. Exit Business Activity Query Designer.

Create Predictive Search

You create predictive searches through Predictive Search Maintenance. To launch this program, right-click any
field used for searches and select Predictive Search Entry from the context menu.
In this example, you create a predictive search for Customer field found in Sales Order Entry.

1. In the Sold-To pane, place your cursor in the Customer field and right-click mouse to invoke the Context
menu.

10.2.700 521
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

2. From the Context menu, select Predictive Search Entry.


The Predictive Search Maintenance program displays.

3. To create a new search, click the New button on the Standard toolbar.

522 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

4. In the Predictive Search field, enter XXX_CustomerList (where XXX are your initials).

5. In the Description field, enter Customer List.

6. Click BAQ, search for and select XXX_CustomerList BAQ you created

7. In the Return Column, select Customer_CustID. This field defines the column that will bind in the Customer
field when a user selects an option in the predictive search tooltip window.

8. In the Starts With Column, select Customer_Name. This column is used to filter the BAQ records. When
you activate a predictive search and start typing in the field, BAQ results will be filtered by customer names.

9. View the options available in the top-right corner that include:


• Shared - When selected, the predictive search becomes available for all users within the company.
• All Occurrences - When selected, the predictive search becomes available in all occurrences of the
column within other forms (programs) across the Epicor application.
• Top X Rows - Used to limit the number of returned rows from the BAQ.
For the purposes of this workshop, do not select any of these options.

10. Click Save.

11. Exit Predictive Search Entry.

Test Predictive Search

Once you restart the program from which you created the Predictive Search, you can test the functionality.

1. In Sales Order Entry, click New.

10.2.700 523
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

2. Click New.

3. Start typing in the Customer field and notice the suggested results display in a floating tooltip window. As
you type. the Predictive Search results are filtered by Customer Name.
When you select a value, the Customer ID is placed in the Customer column. This is the value the fields
expects.
Within the application's sysconfig file, the following properties control the behaviour of Predictive Searches.
System administrators may modify these values to fine-tune the Predictive Search performance.

Property Description Default Value


<PredictiveSearchKeyPressDelay> When a user starts typing in a field, this value 1500 µs (1,5 sec)
controls the time delay of the underlying BAQ
execution.
<PredictiveSearchPopupFadeDelay> On predictive search execution, this value 10000 µs (10 sec)
controls the time the floating tooltip window
becomes available until it fades away.

Enterprise Search

Enterprise Search is a search application you use to retrieve indexed content from within your Epicor application.
You can search on any record within the Epicor database – like a part, customer, purchase order, AR invoice,
and so on. You can also search for text found in any record within the Epicor database. All the records within
the Epicor database that use this record in which this text is found display within the search results.
Other search programs within the Epicor application are limited to querying records for a specific record type;
for example, you need to launch Job Search in order to find and select job records. Through Enterprise Search,
however, you can find all the places within your Epicor database that reference a specific search item, and then
use links within the search results to display the search item you want within the application program you need.
Data is indexed using a series of delivered Business Activity Queries (BAQs) that provide a starting point for the
primary data available when you first install the application. You can, however, extend this functionality by adding
user-defined BAQs into the indexing service.

524 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

Only users with certain rights can access Enterprise Search. These rights are assigned in User Maintenance. Once
these rights are assigned, you launch Enterprise Search through two methods – from the Main Menu within the
Smart Client or from a URL you can set up as an icon on your desktop. Both methods are described in this section.
Included at the end of this section is a list of Enterprise Search Options you use to quickly return the best possible
search results.

For instructions on how to install Enterprise Search, review the


Epicor ERP Installation Guide.

Activate Enterprise Search

You give specific users access rights to Enterprise Search within User Account Maintenance.
Menu Path: System Setup > Security Maintenance > User Account Security Maintenance
To assign Enterprise Search user rights:

1. Use the Detail sheet to find and select a specific user.

2. Navigate to the Options sheet.

3. Within the Access Options section, select the Allow Enterprise Search check box.

10.2.700 525
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

4. Within the Enterprise Search section, select the Use Default URL check box to use the Enterprise Search
index defined for the company as the user’s search index. Search indexes are defined in the Enterprise Search
Administration Console.

5. If an alternate search index URL is defined in the Enterprise Search Administration Console and you want
this user to access this index, enter this URL in the Search URL field.

6. Click Save on the Standard toolbar.

Smart Client Enterprise Search

You can launch Enterprise Search from the Home Page or Menu application within the smart client application.
The search results then display within an Enterprise Search pane. Use this pane to navigate to a specific program
that contains the data you wish to view.

1. Click Search (magnifying glass icon) in the upper right corner of the application Home Page or Menu
application to display the Search application.

2. In the Search Panel, Enterprise Search is selected by default in the search resources. Use the Search field
to enter a value. Enter 516FW.

526 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

3. Click the magnifying glass icon.

4. The results display on the Enterprise Search pane in list format.

5. The primary records that contain references to the search value display as links.

10.2.700 527
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

6. Related information categories display within the group box. You can click these links to view additional
search results.

7. To display the search value within a specific program, select a link. In this example, you want to display a
specific part transaction through the Part Transaction record, so you select Part Transaction link.

8. The results of the tag you selected display. Select the first link.

9. The specific program launches; the record that contains the selected search value displays. In this example,
Part Maintenance displays.

528 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

10. You may need to navigate through the record to locate the search value.

Web Client Enterprise Search

You can also launch Enterprise Search externally and then launch a specific Epicor Web Access program from it.
Epicor Web Access is an alternate interface that displays your Epicor application through a web format. For
instructions on how to install Epicor Web Access, review the Epicor ERP Installation Guide.
To externally launch Enterprise Search:

1. Click the Enterprise Search application icon found on the desktop.

2. The application displays within your web browser.

10.2.700 529
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

3. Enter a value you want to search in the Search field.

4. Click the Magnifying Glass button.

5. The primary records that contain references to the search value display as links.

6. Related information categories display within the group box. You can click these links to view additional
search results. For example, if you want to see all the invoices, click Invoices.

7. The search results are further refined to show a specific type of record that includes the search value.

530 10.2.700
Epicor ICE 3.2 Tools User Guide Searches | Chapter 4

8. To display the search value within a specific program, select a link. In this example, you want to display a
specific quote transaction through the Opportunity/Quote Tracker, so you select this link.
Enter your credentials in the Epicor Web Access login window. The search value displays within the specific
Epicor program.

In order to launch Epicor Web Access, your user account


must be modified so that it has Epicor Web Access rights.
You select these rights within User Maintenance.

9. You can also navigate to a specific program from a context menu. To do this, right-click a link that displays
within the search results.

10. A series of programs display on this context menu. Select the program you want from the list.

11. Use the Edit Preferences link to specify the number of search results to display on each page and the
default display mode.
Your preferences load automatically the next time you start the client.

Enterprise Search Filter Options

To use Enterprise Search, you enter the record or text in the Search field and click Go. This basic way of searching
for data returns links to all records that contain the search text. If you want to refine the search results, you can
use Enterprise Search filter options. These advanced search options help you return more specific search results.
The filter options include:

10.2.700 531
Chapter 4 | Searches Epicor ICE 3.2 Tools User Guide

• Basic Search - Enter search text to retrieve any records that include the word or words. For example:
• The search text consignment returns records that contain the word “consignment”.
• The search text consignment returns records that contain the word “consignment”.

• Phrase Search - Enter the search text surrounded by quotes to retrieve any records that contain the exact
phrase. For example, the search text “consumer goods” returns records only if they appear together. This
search text would not return records that contain “consumer packaged goods”.
• Wildcard Search - Enter a wildcard character within your search text to retrieve a range of results. The
following wildcards are available:
• * (asterisk) - Represents one or more characters. For example, the search text con* returns records that
contain words beginning with “con” such as “container”, “containerization”, “contact”, or “contract”.
• ? (question mark) - Represents a single character. For example, the search text ?ab returns records that
contain words “lab” or “tab”, but not “grab”.

• OR Search - Enter OR between words in your search text to retrieve any records that contain the words on
either side of “OR”. For example, the search text stock OR non-stock returns records that contain either
word – “stock” or “non-stock”.
• Explicit Without Search - Enter a hyphen (-) before a word in your search text to retrieve records that do
not contain a specific word. For example, the search text lead time –demand returns records that contain
the words “lead” and “time”, but not the word “demand”.
• Tag Search - Tags are added to indexed data. Enter a tag name to retrieve any records that include the tags.
For example, the tags for Sales Order are Order and SO. The search text order critical or SO critical returns
sales order records that contain the word “critical”.
Application administrators can obtain the list of tags from the Enterprise Search Administration Console.
These tags are specific to Enterprise Search and are not the public and private data tags you add to records
within programs throughout the application. For more information on public and private data tags you add
to records, review the previous Data Tag Searches section in this chapter.

• Date Search - Enter a date in your search text, in any of the following formats, to retrieve records that contain
the specified date.
• 2016-01-01T00:00:00 (date:time)
• 01/12/2016 (mm/dd/yyyy or dd/mm/yyyy)
• 1/12/2016 (m/dd/yyyy or d/mm/yyyy)
• 1/12/16 (m/dd/yy or d/mm/yy)

532 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Chapter 5: Business Process Management

The Business Process Management (BPM) module is a set of tools you use to modify and extend application functionality
without touching the source code. At the core of BPM is the directive. A directive defines a custom behaviour specified
in the BPM workflow that can be applied to an operation. Three types of directives are available:
• Method Directives - applied to service methods.
• Data Directives - applied to database table transactions.
• Updatable BAQ Directives - applied to business activity query methods that can update the database.
Use the BPM tools to add or change application processes when a service method executes, when a transaction changes
are applied to a table, or when information is retrieved or posted by a business activity query. You do this by creating
directives that can evaluate the data being processed, and perform actions based on this data.
This chapter first explores the base elements of BPM and then explains how you set up the BPM module. The chapter
next describes all the tools in detail – including the BPM Workflow elements you can use to define conditions and
actions available for directives. The chapter concludes with a series of case studies you can use as a guide for your own
BPM directives. Subsequent chapters explain custom BPM processing and BPM utilities.

BPM Base Elements

Business Process Management uses the following base elements:


• Method Directives - Method directives initiate BPM actions based on specified application method calls
within a service - Business Object, Simple Service, Process, or Report. A service contains the code that runs a
business process. BPM actions may be conditionally triggered before, after, or in place of a regular method
that runs within a service.
• Data Directives - Data directives initiate BPM actions based on updates to a specified table. A data directive
can be run during the data transaction, which can affect the information stored within the database, or it
can be run after the data transaction is saved to the table.
• Updatable BAQ Directives - Updatable BAQ directives initiate BPM actions based on method calls launched
from an updatable BAQ. An updatable BAQ is a customizable query tool that displays on smart client dashboards
and mobile device dashboards through which users can update and add data; like service methods, BAQ
methods are required so the database can be updated. An updatable BAQ directive can be run before, after,
or in place of the BAQ method call.
• Holds - Use BPM holds to define an external hold type linked to a service which in turn may be set manually,
or through a BPM action. BPM directives may then be created on other services and methods to evaluate
whether a hold exists and then modify the business process as you need. BPM holds extend the regular status
holds built into the application. You can then define and evaluate your own hold conditions based on your
business workflows.
• Data Form Designer - Use the BPM Data Form Designer to create forms launched by BPM method directives.
BPM data forms capture data or present button actions that you can use to control the BPM processing flow.
This feature can be used to launch a form - for example, only for a specific customer - to capture the specific
data required for a transaction.

10.2.700 533
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Assign BPM Advanced User Rights

Two levels of BPM functionality are available – base level and advanced level.
Any users who have menu access to BPM can use the base level BPM functionality to create Method and Data
Directives. The BPM standard interface uses design elements and their related method parameters, variables and
action items calling the ERP Services within the context of the tenancy of the user.
The base user is limited to using elements which do not have a freeform C# code editor, and from using freeform
code in the base processing tab (even if called from an updatable BAQ).
Users with Advanced BPM rights can access the additional design elements which enable freeform C# code.
You give specific user rights to the advanced BPM features through User Account Maintenance. These rights
are assigned on the Options sheet.
To give a specific user advanced BPM user rights:

1. Navigate to User Account Security Maintenance.


Menu Path: System Setup > Security Maintenance > User Account Security Maintenance

2. Select a specific user on the Detail sheet.

534 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

3. Click the Options tab.

4. In the Tools Options section, select the BPM Advanced User check box.

5. Click Save.

This user can now use the advanced BPM functions that include the following:
• Callers
• Execute Custom Code
• Invoke External Method
• Call SC workflow (Service Connect)

• Others
• Notify Collaborate (Used with Epicor Collaborate)

• Setters
• Set By Query

• Base processing for creating completely new business logic which is used instead of the business logic developed
by Epicor. Users are encouraged to work with Epicor CSG (Custom Programming Group) or an authorized
partner organization before replacing a base method.
• Create Programming environment using the Programming Interface Generator form.
• Create any kind of Expression constructions for use with BPM/BAQ sub-systems, including complex ones.

Advanced BPM User rights are not available to Epicor Cloud


ERP - Multi Tenant Users, as freeform C# code may introduce
a security risk for access of data outside of the tenancy. Use
of C# in BPMs is regulated, and requires advanced approval
from Cloud Operations to ensure conformity with our security
and operational standards. Most common business
requirements for reading and writing data within the tenancy
restrictions can be accomplished by using the built in interface.
To request a feature requiring BPM Advanced User rights,
contact Epicor Professional Services or an authorized Epicor
partner. You can also submit a request to
[email protected] for deployment.

Expression Security - BPM Rights

While Advanced BPM users are not limited when creating expressions, for users without these rights, a security
check is applied. Base BPM users can only use types, methods and members that are explicitly allowed.
The list of allowed simple expressions includes:
• Standard C# operators -> +, -, *, /, %, ?:, etc.
• Static and instance methods of C# standard types -> bool, byte, char, decimal, double, float, int, long, sbyte,
short, string, uint, ulong, ushort, etc.
Both the C# naming (bool) and CLR naming (System.Boolean/Boolean) are allowed.
• Static and instance methods of special C# types: System.DateTime, System.DateTimeOffset, System.Guid,
System.TimeSpan, etc.

10.2.700 535
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

• Static methods of the following CLR types:


• System.Convert -> Convert.ToBoolean, Convert.ToInt32, etc.,
• System.Linq.Enumerable -> LINQ for IEnumerable,
• System.Ling.Queryable -> LINQ for IQueryable,
• System.Math -> Standard math operations - Math.Abs, Math.Max, etc.,
• System.StringComparer,
• System.StringComparison.

• ICE Helper methods defined in classes:


• Epicor.Data.IRowExtensions -> UDField<T>/SetUDField<T>,
• Epicor.Utilities.StringExtensions -> FwdBackSlash, SubString, NumEntries, Entry, etc.,
• Ice.IceRowExtensions -> Added(), Updated(), etc.

• BPM helper functions:


• Epicor.Customization.Bpm.BpmFunc -> AddInterval, Year, Today, etc.
Mainly available using functions found within the Expression Editor.

• Standard BPM directve properties -> BaqConstants, callContextBpmData, callContextClient, CompanyID,


Session.
Properties can be used both with this. prefix and without it.
• All method parameters -> both direct or through alias -> ds.Tip vs. ttTip.
• All directive level variables.
• Table row variables, when present in an expression -> ttTipRow, queryRow, etc.
The following security restrictions are also applied for users without Advanced BPM privileges:
• A directive with restricted expressions or functionality opens in a read-mode only.
• Unable to import a directive containing non-simple expressions.
• Unable to save a directive containing non-simple expressions. A workflow item with restricted functionality
is reported in Validation Results grid. The error message presented to the user may look as follows: "Expression
uses functionality only allowed to users with Advanced BPM privileges."

Directive Scope

The directive's scope defines in what conditions the directive may fire and affects the ability of users to view,
create or modify the directive.
The below tables displays how each directive scope is treated based on the license used in your Epicor ERP
installation.

536 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Directive Non-Multi-Tenant license Multi-Tenant license


scope
Company
• Visible to any BPM user in the owning • Visible to any BPM user in the owning company.
Specific
company. • Creation allowed to any BPM user.
• Creation allowed to any BPM user. • Modification allowed to any BPM user in the
• Modification allowed to any BPM user owning company.
in the owning company.

Company
Independent • Visible to any BPM user. • Visible to any BPM user in the tenancy the
• Creation allowed to any BPM user. directive's owning company belongs to.

• Change of the existing directive's scope • Creation allowed to any BPM user.
(Company Specific -> Company • Change of the existing directive's scope
Independent and vice versa) available to (Company Specific -> Company Independent and
any BPM user logged in to the owning vice versa) available to any BPM user logged in
company. to the owning company.
• Read & Write access available to any • Read & Write access available to any BPM user
BPM user logged in to the owning logged in to the owning company.
company. • Read-only access for any BPM users logged in to
• Read-only access for any BPM users another company than owning, but belonging
logged in to another company than to the same tenancy as the directives's owning
owning. company.

Tenant
Independent • If present in the regular installation • Only visible to users with Global Security Manager
database, they are treated the same way rights logged in to any of the companies on the
as Company Independent directives. site.
• Read & Write access available to a Global Security
Manager logged in to the owning company.
• Read-only access for a Global Security Manager
logged in to another company than owning.

If you have base BPM privileges, you cannot modify a directive


that has features only available to Advanced BPM users.
Likewise the options/values for tenant and multi-tenant features
are only for Epicor hosted environments. Typically you can
ignore these options. Internal Epicor administrators who need
more information should refer to the Epicor SaaS Installation
Guide.

Holds

A hold is a flag you place on a record; it indicates the record should not be processed until it is reviewed and
approved. A hold by itself does not perform any actions. You define the actions by creating directives that define

10.2.700 537
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

how the application handles a record that has a hold placed on it. A hold can be attached to a record in two
ways:
• Manually – You can manually attach a hold onto a field by using the BPM Holds program. You do this by
launching the BPM Holds program from the field’s context menu. This adds the hold to the record. To use
this functionality, holds must be first defined within Hold Type Maintenance; this program is explored in the
next section.
• Programmatically – A hold can also be attached to a record using a directive action. It can be attached
before, during, or after the business process is run. Typically you use holds to interrupt the processing of the
business object. This hold can then cause custom actions you define for the directive to run. You use Method
Directives Maintenance or Data Directives Maintenance to create these directives. These programs are explained
later in this chapter.

Hold Type Maintenance


Use Hold Type Maintenance to create, maintain, and delete hold types. Use this program to define all the holds
you may use within the application. After you have set up the holds you need in this program, you can then
activate them either through the BPM Holds program or through directive actions.
You can also use this program to review where the holds are currently used, as well as the history of each hold
type.

A hold type is basically a status you assign to a record; it does


not prevent a record from being processed. For hold types to
actually prevent specific records from being processed, you
need to create a method directive for it. The Case Studies
section at the end of this chapter explains how to leverage this
functionality.

Hold Type Maintenance – How to Use


Navigate to Hold Type Maintenance.
Menu Path: System Management > Business Process Management > Hold Type Maintenance

This program is not available in Epicor Web Access.

To create a new hold type:

1. Click the New button on the Standard toolbar.

538 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

2. Enter the Hold Type for the hold. This value is a short name that, along with the business object, identifies
the hold type. In this example, Sales Order is entered as the Hold Type name.

3. Click the Business object button to find and select the business object on which you want to attach the
hold. In this example, you select the SalesOrder business object.

4. The System Code field displays the part of the system the Business Object belongs to. Epicor Business
Objects either belong to the application system (ERP) or the tools system (ICE).

5. Enter a Description for the hold that further identifies its purpose. An optional value, use this field to add
more details to help identify the hold.

6. The History Length field defines how many records appear on the Hold Usage History sheet. When the
records reach this number, the oldest records are automatically deleted.

7. Click Save. This hold type is now available for use.

8. The Hold Usage sheet displays where the current hold has been selected on specific records; use this sheet
to manage the records currently on hold. If you need, you can select an item on this grid and click the Delete
button to remove a hold on a record.

9. The Hold Usage History sheet displays a record for each time the selected hold was used – when it was
attached to a record, who attached the hold, when it was removed, and so on. If you need, you can select

10.2.700 539
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

a record on this grid and click the Delete button; this removes the history record. The maximum number of
records that can appear on the Hold Usage History sheet is defined by the hold type’s History Length value.

BPM Holds
Use the BPM Holds program to attach a hold directly to a record. You can also delete a previously attached hold.

BPM Holds – How to Use


To place a hold on a sales order:

1. Navigate to Sales Order Entry.


Menu Path: Sales Management > Order Management > General Operations > Order Entry

2. Click the Sales Order button to find and select an order.

3. Right-click on a field that is used to define a business object and select BPM Holds.
For this example, you right-click within Sales Order field.

Not all context menus have a BPM Holds option. The field
must be a primary value for a business object. In this
example, the Sales Order field is the main field used by
the SalesOrder business object, so a hold can be placed
on this field.

540 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

4. The BPM Holds program displays. In the Tree View, select the hold type you want to use. In this example,
you select the Sales Order hold.

5. Click New on the Standard toolbar.

6. The hold is now created for this record; several fields automatically populate with information. The Business
Object field displays the name of the business object used for this hold. In this example, the SalesOrder
business object displays.

7. The Hold Type field displays the hold that you created in Hold Type Maintenance. In this example, the Sales
Order hold record displays.

8. The Description field displays the optional explanation that may have been entered for the hold type.

9. The Created On field displays the date and time on which this BPM hold was attached to the record.

10. The Created by field displays the identifier of the user who attached the hold.

11. Use the Comment field to enter any additional information you want about the hold. The only field within
the BPM Holds program you can edit, this field contains the reason you placed the hold on the record.

12. When you finish, click Save.

10.2.700 541
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Review BPM Holds


You can review all the records for which this hold is assigned. Placing a hold on a record does not prevent the
record from being processed. Instead, the hold is really a note you add to the record. You can then track these
selected records within Hold Type Maintenance. You must then launch the record’s entry or maintenance program
to make the changes you need.

To use hold types to actually prevent specific records from


being processed, you need to create a method directive for it.
The Case Studies section at the end of this chapter explains
how to leverage this functionality.

To review your BPM holds:

1. Navigate to Hold Type Maintenance.


Menu Path: System Management > Business Process Management > Hold Type Maintenance

This program is not available in Epicor Web Access.

2. Use the Detail sheet to find and select a specific hold type. In this example, you select the Sales Order hold
type.

3. Click the Hold Usage tab.

4. The Hold Type Usage grid displays all the records on which this hold type is currently selected.

Use this information to make any changes that you need to the selected records. However, you must do this
manually on each record listed on this grid.
For more information on how to attach the BPM Hold to a record using a directive action, review the Case
Studies section at the end of this chapter.

542 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Directives

A directive defines a set of BPM workflow conditions and actions associated with a method call or a data
transaction. Directives are triggered by a service method, a method used by an updatable BAQ, or by changes
to data in a database table.
Method Directives, as well as Updatable BAQ Method Directives, allow to use the Extension Table with the aim
to extend BPM functionality. The Extension Table is not a part of the main product but the product extension
allowing to create custom tables. Extension Tables can be exposed if they are accessible in the UI.

Since Extension tables are company-specific, it is recommended


to use them in the company-specific directives. The use of
extension tables in the cross-company directives is not
restricted, they will be accessible not in all companies but only
where this directive is available.

For more information, see the Extension Maintenance in the Epicor Help under System Setup > System Maintenance
> Extension Maintenance.
If there is no Extension in the company or Extension tables for that Extension are not added to the TableSet, the
following exception is raised:
There are no extension tables in the tablesetName tableset
If the used Extension table is not available for the company or this Extension table is not added to the TableSet,
the following exception is raised:
There is no tableId extension table in the tablesetName tableset
Extension tables are available in all BPM elements except BPM query. Extension Tables in BPM query currently
are not supported.

Method Directives
Data transactions in the application are controlled by services. The different types of Epicor Services classified by
their namespace include:
• Business Object - Business Objects are services that belong to the BO namespace.
• Simple Service - This type includes the services that belong to the Lib namespace.
• Report - The services of this type belong to the Rpt namespace.
• Process - Process Services belong to the Proc namespace.
BPM tools can extend service methods before or after the main execution, or even completely replace the method.
You do this by creating method directives that evaluate the data being processed, and, if the directives' conditions
are met, perform one or more actions based on this data - like displaying messages, preventing data entry,
launching other business processes, and so on.
BPM method directives work by performing calls to the application server logic. You can then validate, manipulate,
or execute actions based on the data passed through the application. Because they are server side customization,
you can change business logic without modifying the source code. For this reason, most future upgrades to the
source code will not affect existing BPM directives.
When a service method is called, all enabled directives associated with the method activate. The BPM workflow
you create for the directive does it's job by executing workflow items in the order you specify.

10.2.700 543
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

While the method is active, these directives can run at three different processing points:
• Pre-Processing – These directives execute before the base method runs. After these actions finish, the service
then runs the base method.
• Base Processing – These directives run in place of the base method. The base method does not execute.

You cannot apply Base Processing directives to methods of


Process and Report Services.

• Post-Processing – These directives run after the base method finishes its process.

Only Advanced BPM users can create and modify Base


Processing directives. Base Processing directives are not available
for non-advanced BPM users.
However, Epicor strongly recommends you do not create base
processing directives. If you change a base method incorrectly,
you can harm the normal function of the application. Work
with a Epicor consultant before you create a base processing
method directive.

For example, you can create a method directive for the Customer.Update method that sends an e-mail to a
Sales Manager when a customer’s credit limit is changed. This same directive can also attach a hold to the
customer record and display a message indicating the customer record has been placed on hold. Both of these
actions are run during post-processing, after the base method finishes its process.
Only users with Security Manager or Global Security Manager rights can create or manage existing Method
Directives on service methods that act on security-sensitive data. In some cases, all methods of a service or a
service itself may be unavailable for most users. If the Method Search window does not display a service or
some/all methods of the selected service, it means that those services or methods either operate on security-sensitive
data and are hidden from current user, or are not compatible with BPM runtime.
You create method directives within Method Directives Maintenance.
Menu Path: System Management > Business Process Management > Method Directives Maintenance

This program is not available in Epicor Web Access.

The Case Studies sub-section contains examples of directives that customize the standard logic of Business
Object, Report, and Process methods.

Data Directives
A data directive is similar to a method directive, but instead of being launched by a service method, a data directive
is linked to a database table and is triggered by a database event, such as add, delete, or update. By applying
the directive to a specific table, data directives are used to control data that may be affected by several services.
You can apply most of the conditions and actions from method directives to data directives as well, except in
cases where the condition or action depends on information available in the service that is not available in the
data itself. Two types of data directives are available:
• In-Transaction - Affects data before it is saved to the database. This directive type can only process one row
at a time; it cannot process multiple dirty rows - rows that contain data not yet saved to the database. Multiple
dirty rows are explained later in this chapter.

Only Advanced BPM users can create, modify, and enable


in-transaction data directives. In-Transaction data directives
are not available for non-advanced BPM users.

544 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

• Standard - Does not affect data in the database. A Standard directive executes after a data transaction is
saved to the database. This directive type processes multiple dirty rows modified in the database at once. It
runs after base methods and method directives.
You create data directives within Data Directives Maintenance.
Menu Path: System Management > Business Process Management > Data Directives Maintenance

This program is not available in Epicor Web Access.

Updatable BAQ Method Directives


Updatable BAQ method directives are similar to the method directives described earlier, except they apply to
methods used specifically by updatable BAQs, custom queries you can create for data entry. Updatable BAQ
methods are used to run processes on Updatable Dashboards. This chapter details the conditions and actions
available for Updatable BAQ method directives. For more information about creating and implementing these
methods, review the Updatable Dashboards chapter.
Updatable BAQ directives initiate BPM actions based on method calls launched from an updatable BAQ. An
updatable BAQ is a customized query tool that displays on smart client dashboards and mobile device dashboards
through which users can update and add data; like service methods, BAQ methods are required so the database
can be updated. An updatable BAQ directive can be run before, after, or in place of the BAQ method call.
Updatable BAQ method directives are similar to the method directives, except that they apply to methods used
specifically by updatable BAQs. Each updatable BAQ has the following methods:
• GetList - Retrieves the data specified by the query.
• GetNew - Creates an empty row where a new record can be entered and submitted to the database.
• Update - Performs database updates for changed and added rows.
• RunCustomAction - Runs a custom action. You define the ID of the custom action in the Business Activity
Query Designer program and define the action using one or more directives.
• FieldUpdate - This method occurs after the user's change to a field is committed. If you want this field to
generate a Business Process Management (BPM) method, select the Raise Events check box in Updatable Field
Editor. You can use this method to perform additional processing against the changed row. For example,
when you enter a part number, you want the part description field to populate automatically.
• Field Validate - This method occurs before the proposed change to a field is committed. If you want this
field to generate a Business Process Management (BPM) method, select the Raise Events check box in Updatable
Field Editor. You can use this method to validate proposed changes. For example, you can prevent users from
entering an incorrect value in a certain field such as non-existent state.

You must be a BAQ Advanced User to modify pre-processing


and post-processing updatable BAQ method directives with a
limited number of actions. To utilize the whole uBAQ Method
Directives toolset including modifications of base processing
directives, a user must be provided with BPM Advanced User
rights.

How it Works

BPM customization allows using of mostly all BPM Method directive actions and conditions for processing query
data. When you create an updatable BAQ, the application writes a base processing directive for the update

10.2.700 545
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

method. The directive uses C# code to update the database according to the settings defined in the Business
Activity Query Designer.

1. Business Activity Query Designer helps users with updating data via a selected service. For these purposes,
the UpdateExt method is used. This update method governs the whole data transaction process between
the updatable BAQ and the related service. When you select the BPM Update option on Update Processing
sheet, you activate the BPM Update Processing section to configure data updates.

2. You do this by selecting an appropriate Business Object and defining data Mappings between BO's dataset
and query display fields.

3. Click the BPM Directives Configuration to access the Updatable BAQ Method Directives.

This option is for experienced developers only and not


recommended for every user.

4. Based on the information you specified in BPM Update Processing, the BAQ Designer generates the Base
Processing directive named #BASE# against uBAQ.Update method.

546 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

5. This directive is named #BASE# and contains a workflow item with custom C# code, which prepares data
and calls UpdateExt for selected BO.

6. Also, Base Processing directive for the GetNew method is automatically generated if the Allow New Record
option is selected on the Update > General Properties sheet. This directive is also named #BASE# name

10.2.700 547
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

and it contains C# code with field assignments for new row as defined in Initial Expression column defined
on the General Properties.

When you use BPM Update option to perform uBAQ


updates, do not edit #BASE# directives because any
changes will be discarded once the query is saved in BAQ
Designer.

7. However, the BAQ Designer gives you the ability to modify the directives for any methods. By using the
Advanced BPM Update only option, you can create a BPM directive manually from scratch, or, to customize
the directive generated by BPM Update processing.

8. If you do not specify BPM Update processing and launch Updatable BAQ Method Directives, then no #BASE#
directives are generated automatically for the GetNew, Update and RunCustomAction methods. Use this
option to customize the method completely by yourself.
You should always create Base Processing directives for all updatable query methods you want to call.
Otherwise the error message "There is no BPM customization attached to Update method of test updatable
query in XYZ company" displays.
The exception to this rule, are GetList and GetNew methods, which have the base processing functionality
embedded. For these methods, creation of Pre-Processing and Post-Processing directives is reasonable.
You can access Updatable BAQ Method Directives Maintenance either from BAQ Designer or using the
menu option:
Menu Path: System Management > Business Process Management > Updatable BAQ Directives Maintenance

This program is not available in Epicor Web Access.

Custom Actions

You may create custom actions for updatable BAQs in the Business Activity Designer program by defining the
action ID and label. The custom actions can then be added to the Actions menu of a dashboard that uses the
query. In the Updatable BAQ Method Directives program, you create a pre-processing, base processing, or
post-processing directive for the RunCustomAction method.
Use "the specified argument is equal to the specified expression" condition statement to identify which
action to run. The first "specified" variable can be set to "actionID." The second "specified" variable can be set
to the ID of the action called by the user as it was specified in the BAQ. Then create directive actions to perform
custom operations.

How BPM Works


The key features of Business Process Management include the following:
• Designed to explicitly understand and manage business processes within the Epicor application.
• Embedded directly in the application.
• BPM workflow utilizes interconnected workflow items, representing the flow of BPM execution.
• Each BPM workflow item is represented by an icon in the diagram.
• Contains advanced BPM features like .NET scripting and calls to Epicor Service Connect.
• Maintains full audit tracking of all interactions.
• BPM reacts to Events, interprets Conditions assigned to events and takes Actions based on conditions.

548 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Standard Execution Flow


This topic outlines the standard communication model between the client and the server, without a BPM
intervention.

The standard client-server data exchange process includes the following:


• A user performs an action in a program.
• The program calls a service method to carry out the action.
• The Epicor program's code performs its function, and related database transactions run.
• Data is returned to the program according to the actions run by the Epicor program.

Using Business Process Management


BPM directives work by intercepting calls to the application server logic. They are embedded into the server logic
and get invoked by method calls. You can validate, manipulate, or create workflows based on the data passed
through the application. Because BPM methods are server side customizations, you can change business logic
without modifying the source code.

10.2.700 549
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

The key elements of using BPM directives within the application include the following:
• A user performs an action in a program.
• The program calls a service method to carry out the action.
• Before the service executes its program code, Pre-Processing directives are executed.

If at least one non-empty Base Processing directive is in


effect, the Base Processing directive runs instead of the
Epicor program code.

Epicor strongly recommends you do not create Base


Processing directives. If you change a base method
incorrectly, you can harm the normal function of the
application. This option is mainly included for partners,
consultants, and power users who need to directly modify
the method for major business modifications. Work with
an Epicor consultant before you create a base processing
method directive.

550 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

• After the Pre-Processing directive, the Epicor program code performs its function, or Base Processing directives
are executed.
• When a data transaction is about to be applied to the database, In-Transaction directives are executed.
• After the Epicor program code or a Base Processing directive is run, Post-Processing directives are executed.
• Standard data directives are executed with accumulated transaction database changes passed to them.
• Data is returned to the program according to the actions run by the directives and Epicor program.

Create a New Directive


This example shows how to create a Method Directive, but the process is the same for all directive types. For
examples of how to create each type of directive, see the Case Studies section later in this chapter.

Locate Service Method


Since directives are created for service methods, tables, or updatable BAQ methods, the first step is to locate the
method on which the directive will act. To locate a service method:
Navigate to the Method Directives program.
Menu Path: System Management > Business Process Management > Method Directives Maintenance

This program is not available in Epicor Web Access.

1. Click the Method Code button.

• To create a data directive using Data Directives


Maintenance, click the Table button or enter the
table name directly.

10.2.700 551
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

• To create an uBAQ method directive using Updatable


BAQ Directives Maintenance, click the BAQ ID
button or enter the uBAQ ID directly.

2. The Method Search program displays. Use this program to locate a specific method within a service.

3. Select the Search by Service option. This indicates that you want the search to look specifically for services.
In this example, you want to create a method directive for the Update method of the CurrExRate BO that
belongs to the application part of the system (ERP).

4. Use the System Code drop-down to select the part of the system the service you are looking for belongs
- ERP (Product) or ICE (System). For this example, select ERP.

5. Next, select the Type of the searched service. Four types of services expose their methods for BPM
customization:
• Business Object
• Simple Service

552 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

• Process
• Report
For this example, select Business Object.

6. Select the Service Name for which you want to search. In this example, you select the CurrExRate Business
Object.

7. Then, in the Where Method Name Starts At field, enter "U".


This will limit the search to methods starting with this letter.

8. Notice you can also select Search by Directives. This option is used to find and select existing method
directives.

9. When you select the Search by Directives option, the Group drop-down list becomes active. You can assign
directives to groups and then search for a specific group here. To learn how to use Directive Groups, read
the Business Process Management Utilities chapter.

10. You can also Search Outdated Directives. Select this option to locate any method directives that have
become incompatible with the current application version. To learn more about this, review the Directive
Compatibility section later in this chapter.

11. Click Search.

12. The Search Results grid displays all the methods for the CurrExRate Business Object that start with “u”.
In this example, you select the Update method.

13. Click OK.

14. The Detail sheet now displays the primary information on the selected method.

15. The Method Code field displays the service method that you selected. You add and edit directives to this
method. In this example, you selected the CurrExRate.Update method.

16. If you need, enter a Method Description.

17. The Transaction Scope list defines how the application handles errors. Available options:
• Business Method and Directives – The application reverses, or rolls back, all changes made by actions
run before the error exception occurred.

10.2.700 553
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

• Business Method – The application does not roll back any changes made by the directive’s actions.

18. The Supports multiple dirty rows check box indicates whether the selected method sends multiple updated
rows to the database for processing. When a method can gather data from multiple rows at the same time
before they are saved to the database, the method is referred as being able to support multiple “dirty”
rows. You then can perform additional actions against the selected method. These additional actions are
described in the Support for Multiple Dirty Rows section later in this chapter.

19. Click the Advanced button to create custom actions for this method directive; this launches the Method
Arguments window. This window displays the arguments contained in the current method; use this program
to review what you need to know before you build your custom external method. You also use this program
to launch the Create Programming Interface Form; you use this window to generate a class within a
method that has a signature which matches the signature of the service for which you are creating the
external method. To learn how to use these tools, read the Custom Business Process Management chapter.

To use this functionality, your user account must be


defined as a BPM Advanced User. Read the previous BPM
Setup section to learn how to give users these advanced
rights.

20. When you finish defining the primary items on the method directive, click Save on the Standard toolbar.

Create the Directive


You are now ready to add directives to this object. You can create as many directives as you need for each
method, table, or updatable BAQ method.
This example shows you how to create a directive that runs before the CurrExRate.Update method processes;
this type is called a Pre-Processing Directive. To create the directive:

1. Click the Down Arrow next to the New button; select New Pre-Processing.

554 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

2. The Pre-Processing > Detail sheet becomes active.

3. Enter the Directive Name you use to identify the pre-processing directive. You can enter a descriptive name
that has special characters and spaces.

4. Add a description of your directive.

5. If you need, select the Group inside which the current directive belongs. You can select an existing group
or enter a new group. An optional value, groups help you organize directives for both search and export
functionality.

You can export directives for use on other systems. You


can do this only if the directives belong to a group. To
learn how to export directives, read the Export Directives
section in Business Process Management Utilities chapter.

6. The Order field indicates the sequence in which this method’s directives activate. The program automatically
enters a value in this field in increments of 10. Because of this, the first directive you add is 10, the second
20, and so on. If you need, however, you can edit this value.

7. The Owner Company field displays the company for which this directive is created.

8. The Enabled check box indicates this directive is active and the application automatically compiles the code
to run the directive. You must select this check box to use the current directive.

10.2.700 555
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

9. The Scope field to defines the directive's range of usage and also determines the ability of users to view,
create or modify the directive.
• You can select one of the following options:
• Company Specific - The directive only works in its owning company's scope.
• Company Independent - The directive works in all companies on a regular installation. If Multi-Tenant
license is used (SaaS solutions), this directive works in all companies belonging to the tenant ID of its
owning company.
• Tenant Independent - This option only displays if Multi-Tenant license is used and it is only available
to a user having Global Security Manager rights. A Tenant Independent directive works in all companies
of the installation.

For more information about these options, review the Directive Scope topic within this chapter.

10. The Compatible check box indicates whether this directive works with the current version of the business
method. If the application validates the method and discovers this directive is no longer compatible with
the business method, this check box is clear. To learn more about how the application checks your method
directives for compatibility, read the Directive Compatibility section later in this chapter.

When the user with GSM rights in a Multi-Tenant


environment, as well as the user with SM rights in a
Single-Tenant environment logs on any attempts to call
enabled incompatible (also known as outdated) directive,
an error message is displayed but the user is allowed to
fix wrong directives. When the non-GSM user in a
Multi-Tenant environment, as well as the non-SM user in
a Single-Tenant environment logs on, then enabled
incompatible directive raises an exception. Under some
conditions it can block ability to log on the system and to
fix such directives.

11. Click the Design button to access the BPM Workflow Designer. Use the Designer to construct your BPM
workflow using a graphical design surface.
The BPM Workflow Designer functionality is discussed in the following section.

12. When you build a workflow using the BPM Workflow Designer, its snapshot displays within the Behavior
pane. This feature may help you quickly identify the purpose of the workflow and determine if modifications
are necessary.

13. When you finish creating your pre-processing directive, click Save on the Standard toolbar.

BPM Workflow Designer

Use the BPM Workflow Designer to construct your BPM workflow using a graphical design surface.
To access Designer, click the Design button when you build a directive through following programs:
• Method Directives
• Data Directives
• Updatable BAQ Method Directives

556 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

General Principles

This topic discusses general principles of creating a BPM workflow by using the workflow elements.
To construct a BPM Workflow:

1. The available items display in the left pane of the Designer. Workflow elements are grouped by categories
and except the Flow Chart category, they all represent Actions the workflow will take.

2. For each workflow element representing Actions, you can select the Terminate on Error option to halt the
workflow execution when it encounters an error.

For the Raise Exception action, it is mandatory to have


this option selected. The system does this by default.

3. The Condition block found in the Flow Chart category represents a set of conditions the BPM workflow
may evaluate prior to executing the following workflow element.

10.2.700 557
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

4. To use a BPM element in the workflow, drag it and drop it in the BPM Designer surface.

5. Connect the workflow elements in the logical order they should be executed. When you hover your cursor
over each element, the small black triangles surrounding the element represent the available connectors.
To connect elements, click your mouse, select any of the connector symbols, drag the line and point it to
another element's connector.

6. The initial point of the BPM workflow is the Start element.

7. The following workflow elements may utilize multiple inbound connectors but only one outbound connector.
The exception is the Condition block that allows usage of two outbound connectors True & False.
To delete a workflow element, select it and press the Delete button on your keyboard. When a workflow
element is deleted, its links are automatically removed too.

8. You can use editing buttons in the top toolbar for smother and more efficient workflow design process.
• Copy/Paste - use these buttons to copy and paste workflow elements within the currently open directive
or to another directive. Note you can perform the same actions using the Ctrl+C and Ctrl+V keyboard
shortcuts.

You can paste copied elements within BPM Workflow


Designer only (in the same or different directive). You
will not be able to paste them to any other Epicor
ERP/ICE program or external application.

558 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

• Undo/Redo - use these buttons to revert or restore your previous design actions with workflow elements
and connectors.

The Undo/Redo function stores up to 20 previous user


actions.

9. To set up the behavior of a workflow element representing Action, click on it and supply required parameters
in the pane below the designer surface.
For the Condition block, build criteria using pre-built condition statements. You can enter more than one
condition statement within a single block and use the And/Or logical Operators to define the relationship
between the current statement and the preceding statement.

10. At any stage of a workflow preparation, you can use the Variables tab to create custom, directive-specific
variables and make them available for actions and conditions within the directive. You can then bind these
variables to external method parameters, reference them across available conditions and actions, pass and
receive data from BO call actions or to hold intermediate results during directive execution.
For more information, read the Directive Level Variables topics.

11. The Method Parameters tab displays the signature for the current method or an updatable BAQ. Use this
information to review what you need to know before you, for example, build an external method. This
information is also useful to understand what type of directive-level variables to create before you map them
to method parameters using the Invoke BO method action.

12. The Usings and References button launches the Directive usings and references window. When you design
a custom code, you can use this window to specify additional C# usings for the directive. Also, use this
window to add additional references to assemblies from Server\Assemblies or \Server\Customization\Externals
folders of your Epicor ERP installation.
Note this option is only allowed to users with BPM Advanced User privileges.

13. The Use Extension button turns on/off Extension tables. The Use Extension button is available in Method
Directive and Updatable BAQ Directive and provides access to Extension tables for all elements in BPM
Designer except BPM query. Extension table exposure in BPM query currently is not supported.

If actions or conditions in the directive are recognized to


reference an Extension table (not within expressions),
disabling Extension tables exposure is disallowed.

Extension tables can be used as target tables, as well as


expression elements of BPM actions and conditions.

14. Once you build your BPM workflow, use the Validate function to verify the directive reports no errors.
For more information on this feature, see the following topic Validate Directive.

10.2.700 559
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

15. Once you finish, click Save to save your workflow design. The Save button will become inactive and the
designer window will remain open.

If you exit the Designer without saving changes, you will


be prompted to save them. In the Save Confirmation
dialog choose an appropriate action.

Your changes to the workflow design will be saved


permanently only after you save the modified directive in
the parent program (Method Directives Maintenance,
Data Directives Maintenance or Updatable BAQ
Directives Maintenance).

16. To return to the respective directives maintenance program from which you called the Designer, use the
Close button in the top right corner of the window.

BPM Query

Compose Query program in the BPM Designer allows to design a compliant query, where you can make up the
Inner join between tables and create table criteria.

1. On the left pane, Tables from the argument of the current BO, Tables from variables of TableSet type, Epicor
ERP Tables, and Extension Tables within the database are displayed in the table palette. Select a table you
want to add.

560 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Tables from the argument of the current BO method are


always at the beginning of the palette.

2. To easily locate the table you want, in the Filtering field, enter a value.

3. The central part of the form contains the canvas where tables are dropped.

4. When two tables are placed on the canvas, and relation between tables is described in the dictionary, the
relation is drawn automatically. The relation is represented by the line that indicates the JOIN clause.

5. BPM queries are set up to display only Inner join. You can't change the Join type.

6. When setting a constant value, it is necessary to check its type. If the constant is a string constant, put
quotation marks. Compared to the BAQ Designer, the BPM Designer uses C# language, not SQL.

10.2.700 561
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

The query execution process in the BPM Designer differs from the BAQ Designer. The BPM Designer does
not apply security filtering to query data that is why it is necessary to select data more precisely; otherwise,
unnecessary data may be displayed.
If the query in the BPM Designer refers to tt table, the query execution process may take some time because
the query is executed not on the SQL Server but in the Server Application Memory. Due to the long query
execution process, the application server may require large amount of application memory.

Validate Directive

The Validate function controls if all element parameters are set up in the way BPM expects. It checks that the
directive references existing objects (assemblies, users, BAQ constants, presence of DB tables, standard fields and
user-defined fields, etc.) correspond to selected BO method signature. This control is particularly useful for
directives imported from previous Epicor ERP releases. This function also checks whether syntax within expressions
and custom code blocks is valid. For users without advanced BPM rights, this feature performs a security check
of expressions, as base BPM users are only allowed to use simple expressions.
To verify the directive:

1. In the Toolbar, click the Validate button.

562 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

2. BPM system verifies all actions and conditions within the workflow and displays validation results in the
dockable pane in the upper-right corner.

3. Each problematic part of a workflow item is presented as a separate message. The corresponding icon
indicates what type of error is reported. The error type can be either Error, Warning, Informational message,
Syntax error or Security issue.

4. By default, the error messages are grouped by workflow items and sorted in the following order: error->
warning -> information -> check syntax and security check. Double-clicking the error message highlights
the problematic item in the workflow.

5. Double-clicking the message that reports a problem within an expression or custom code automatically
brings up the corresponding editor window for reviewing.

10.2.700 563
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

6. Resolve the errors reported by the BPM until the Directive validation succeeded message appears.

564 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Customize Element Block

This topic explains how you can enter custom names and memos within workflow elements.
Here's how you can rename and create the memo:

1. When you place a workflow item in the BPM Designer surface, the Designer assigns its name automatically,
for example, Condition 0, Raise Exception 0.

10.2.700 565
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

2. When you use more than one element of the same category within the workflow, the Designer increments
the number of a newly added item, for example, Condition 1, Raise Exception 1.

3. You can, however enter the custom name of each item. To do so, double-click the element name heading
and type in the name you want to use. In this example, you rename Condition 1 to Part Class Test.

566 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

4. You can also create a memo, where you can put additional info of what does a particular element do.
Typically, you can use this feature when you build a complex workflow and you to explain the purpose of
an element to other person reviewing the workflow. To do so, click the + icon in the top left corner of the
element block.

5. You can use the down arrow to invoke the Color pallette where you can pick the desired color for the memo.

10.2.700 567
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

6. Next, you enter the custom text to describe the purpose of the item.

568 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

7. When you place the cursor over the element, the memo you created displays.

Availability of Workflow Elements


The list of available workflow elements you can use to build the BPM workflow is influenced by the following
factors:
• Directive Type used to invoke BPM Workflow Designer - Method Directives, Data Directives and Updatable
BAQ method Directives.
• BPM Advanced User rights - enables Call Service Connect Workflow, Execute Custom Code, Invoke External
Method, Notify Collaborate, Set By Query, Set Argument/Variable and Custom Code Condition.

10.2.700 569
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

• Presence of Table parameters within the selected method - Field Changed Condition, Field Condition, Row
With Status Condition, Notify Collaborate, Data Tag Condition, Attach/Remove Data Tag Actions, Set By
Query Action and Set Field Action.
• Presence of Simple parameters within the selected method - Argument/Variable Condition, Word In
Argument/Variable Condition and Set Argument/Variable Action.
• Workflow items not available in uBAQ Method Directives - Holds and Tags and Method Query Field Changed
Condition.
• Valid Business Object Instance - cases when Business Object's primary key cannot be obtained from parameters
- Attach and Remove Hold Actions and Hold Condition.
• Presence of the Change Log table - Change Log Action.

Copy and Paste Workflow Elements

To simplify creation of BPM workflows, you can copy and paste workflow elements within the currently opened
directive or to another directive.
To use the feature:

1. Launch a workflow in the BPM Worfklow Designer.

2. Use your mouse and keyboard to select the elements you want. Press Ctrl + C on your keyboard to copy
the highlighted elements into the clipboard.

570 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

While holding down the Ctrl or Shift key, you can left-click the mouse to select multiple elements.
Highlighting the Start element is not needed, this element is not transferred into the target location, even
if you select it.

3. Press the Copy button in the top toolbar or Ctrl + C on your keyboard to copy the highlighted elements
into the clipboard.

4. Open a directive where you want to paste the elements from the clipboard.
You can copy elements into:
• The currently opened directive.
• Another Method, Data or uBAQ directive.
Launch BPM Worfklow Designer for the selected directive

5. Press the Paste button in the top toolbar or Ctrl + V on your keyboard to paste copied elements.
The elements are copied on the designer surface.

You can paste copied elements within BPM Workflow


Designer only (in the same or different directive). You will
not be able to paste them to any other Epicor ERP/ICE
program or external application.

10.2.700 571
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

At this stage, complete the workflow as needed. Read the following topic to learn what rules are applied
when you copy and paste workflow elements.

Transmission Rules

This topic provides details on how transfer of workflow items between directives works.
The list of rules includes the following:
• You can copy workflow items from all directives, including those where you have read-only access only.
However, when you paste items into the directive without having editing permissions, saving of such directive
is denied.
• If links between copied items exist, they are preserved in the target location.
• If the target directive already contains items of the same type, numbers of newly added items are increased,
for example, Condition 1, Raise Exception 1. You can rename the newly added items as needed.
• For workflow items utilizing custom code, any additional c# Usings or References to assemblies used by the
items are also transferred.
• Handling Directive-level variables:
• If actions/conditions reference directive-level variables that do not exist in the target location, they are
transferred.
• If target directive already contains a variable having the same name but different type, the paste operation
is denied and user is presented with appropriate error message.
The exception to this rule are directive-level variables used in structured message actions, such as Show
Message, Raise Exception and Send E-mail. In such cases, the paste operation completes but the source
variable is not transferred.

• Handling Epicor Service Connect credentials:


• When using company default credentials, these settings are transferred when copy/paste action is done
within the current directive as well as across directives.
• When using custom ESC server, the information about the server name, selected workflow and logon
credentials is only transferred within the same directive. When you copy the Call SC Workflow action to
another directive, only the information about the server and selected workflow is transferred. A BPM user
is then supposed to re-enter valid credentials manually.

• The following list outlines cases when workflow actions or condition statements can not be transferred:
• A workflow item is not supported in the target directive.
• A workflow item requires advanced BPM rights.
• A workflow item requires a valid BO instance.
• Target method signature is different from the source one.
• If some of the item settings cannot be transferred, for example, if an item references a simple or table
parameter which is absent in the current method. The exception to this rule are actions utilizing structured
messages - Show Message, Raise Exception and Send E-mail. These actions are pasted into the target
location, they are marked as not configured and should be fixed manually by a BPM user.
• If a transferred item references variables, in-memory tables or parameters unavailable in the target directive,
the item is transferred and an appropriate error message is shown. The conflicting configuration parameter(s)
of such item is cleared. The workflow element is marked as unconfigured and becomes highlighted with
a red border.
• If a user attempts to paste an unsupported condition, or the user is missing the required BPM rights, such
a condition is replaced with a placeholder condition, which displays the default condition statement. To

572 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

alert the user, an appropriate error message displays, and the condition is highlighted with a red border.
It is up to the user to fix the condition as needed.
Note: It is not possible to compile an enabled directive containing such a condition, as it will fail validation.
However, this validation error does not stop the Directive Update, BPM Upgrade, Directive Import or uBAQ
Regeneration processes. Instead, it marks the affected directive as Outdated.

Directive Level Variables

You can create custom, directive-specific variables and make them available for actions and conditions within
the directive. You can use these variables to bind them to external method parameters, reference them across
available conditions and actions, pass and receive data from BO call actions or to hold intermediate results during
directive execution.

Usage of directive level variables is limited to the directive where


they were defined. Intermediate data they hold can not be
passed between multiple directives.

The basic flow of utilizing directive level variables within the BPM workflow includes the following:

1. Define directive-level variables. You can create simple parameters such as string or decimal, or complex
parameters of TableSet type.

2. Assign data to variables using the available actions or through a custom code.

3. Use the Invoke BO Method action and map variables to parameters as needed.

4. If needed, process returned values. Returned values may end up in variables that were mapped to return.

Create New Variables

There are two ways of creating new directive level variables. At any stage of a workflow preparation, you can
use the Variables tab, or, you can create them directly from within the Invoke BO Method, Fill Table By Query
and Update Table By Query actions.

Variables Tab

Typically, if you know what variable type(s) you need for the directive you design, you can create them in advance
using the Variables tab.
This tab is always located in the lower part of the BPM Workflow Designer.

10.2.700 573
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Use the Variables tab to do the following:


• Create a new variable.
• Specify a variable name.
• Select a variable type. The available options include selection of:
• Simple variable types - the list of available simple types includes: Boolean, DateTime, Decimal, Guid,
Integer, Long & String.
• Complex variable type - used when creating variables of TableSet type. These types are objects that
include database tables.
By selecting the Choose Type option, you are presented with the Select variable type window. The first
level of hierarchy contains assemblies with TableSets defined inside them. Typically, you select the Contracts
assembly of the BO you want to call, and then select the TableSet type that you need to receive from, or
send to the BO Method you are planning to call.
Loading of assemblies from the application server may take a while. You can interrupt and resume the
process by using the Pause button. To quickly allocate the assembly you need, use the Assembly name
filter field.

574 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

• You can also rename an existing variable, change its type or delete it.

You can not delete a variable already used within a


workflow action or condition.

Using Actions

You can create new variables of required types while you configured the Invoke BO Method, Fill Table By Query
and Update Table By Query actions.
When you specify a parameter Binding, select the create new variable option from the drop-down list.

10.2.700 575
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

You are presented with the Create new variable window. Notice the variable Type corresponds to the type of
the parameter from which this option was launched.

You typically use this option if, within the workflow preparation
period, you do not know what types of variable you will need
for the directive. This way, you create them on the fly while
you configure the action.

576 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Variables vs. Parameters

Service method parameters accessed directly or via table aliases (such as ttOrderHed for ds.OrderHed) and
directive-level variables have identical behaviour. Both parameters and variables hold data and can be used within
the available BPM Actions and Conditions interchangeably.
However, there are a few differences in the usage of parameters and variables. The list includes:
• Visibility scope:
• Parameters are available for use in all BPM Method Directives (Pre/Base/Post) and Data Directives
(In-Transaction/Standard). Changes applied to the parameter in one directive become visible to all directives
executed consequently.
• Directive-level variables are only available in the directive where they are defined. If within two directives
you create two variables that share the same name and type, then these are treated as different variables.

• Initialization:
• Im most cases, Parameters are initialized by the caller. From the BPM code standpoint they always have a
meaningful default value.
• Directive-level variables should be initialized inside a directive explicitly.

• Filtering:
• Only Parameters of the Tableset type are subject for condition base filtering.
• Condition base filtering is unavailable for directive-level variables of any type.

• Client Accessing:
• Only Parameters can be returned to the client.

Availability of Directive Variables

Once you create directive-specific variables, they become available for use across the Business Process Management
functionality
The following is the list of available BPM actions and conditions you can use to access and modify directive
variables:
• Compose Query
In the BPM Query Designer's Tree View, variables of TableSetType are displayed in the
<variableName>.<tableName> format. When placed on the canvas, the default alias name
<variableName>_<tableName> is automatically created. The TableSet variables' table in the designer displays
all the necessary information like FieldName, DataType and so on. You can also use simple types of variables
for the Filter Value.
This dialog displays when you configure the highlighted parameters of the following phrases:

Workflow Item Phrase


Method Query Field Changed Condition Method changed the specific field of the designed query from
any to another value
Query Field Changed Condition Value of the specific field of the designed query changed from
any to another

10.2.700 577
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Workflow Item Phrase


Query Size Condition Number of rows in the designed query is more than or equal to
1
Set Query Field Action Set the specified field of all rows identified by the designed query
to the specific expression with rule

• Select an Argument/Variable
This dialog displays when you configure the highlighted parameters of the following phrases:

Workflow Item Phrase


Argument/Variable Condition The specified argument/variable is equal to the specified expression

Simple types of
variables are
available for
selection.

Word In Argument/Variable Condition The specified argument/variable includes the specific text

Only variables of
String type are
available for
selection.

Set Argument/Variable Action Set the specified argument/variable to the specific expression

Simple types of
variables are

578 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Workflow Item Phrase

available for
selection.

• Specify C# Expression
If directive-specific variables were created, they are displayed under the Directive variables branch. You can
use them within an expression statement you create.

This is a very advanced feature that is mainly geared toward


a developer.

This dialog displays when you configure the highlighted parameters of the following phrases:

Workflow Item Phrase


Argument/Variable Condition The specified argument/variable is equal to the specified expression
Call Context Field Condition The specified call context field is equal to the specified expression
Field Condition The specified field of the changed row is equal to the specified
expression
Set Bpm Data Field Action Set the specified field of BPM Data to the specified expression
Set By Query Action Set the specified field of all rows identified by the designed query
to the specific expression with rule
Set Field Action Set the specified field of the changed row to the specific expression
with rule
Set Argument/Variable Action Set the specified argument/variable to the specific expression

10.2.700 579
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

• Select Table Field(s) - If directive-specific variables of TableSet type were created and are available for the
Condition or Action you configure, they become available in the table/field selection.
This dialog displays directly when you configure the highlighted parameters of the following phrases:

Workflow Item Phrase


Field Changed Condition The specified field has been changed from any to another
Call Context Field Condition The specified call context field is equal to the specified expression

Simple types of
variables are available
for selection.

Field Condition The specified field of the changed row is equal to the specified expression
Method Query Field Changed Method changed the specific field of the designed query from any to
Condition another value

TableSet types of
variables are available
for selection, when
used in the BPM
Query.

Query Field Changed Condition Value of the specific field of the designed query changed from any to
another

TableSet types of
variables are available
for selection, when
used in the BPM
Query.

580 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Workflow Item Phrase


Set Bpm Data Field Action Set the specified field of BPM Data to the specified expression

Simple types of
variables are available
for selection.

Set By Query Action Set the specified field of all rows identified by the designed query to the
specific expression with rule

TableSet types of
variables are available
for selection, when
used in the BPM
Query.

Set Field Action Set the specified field of the changed row to the specific expression with
rule
Change Log Action Log changes to the selected fields of specified table

The enhanced Select Table Field(s) dialog also displays when you configure values queried from related tables
and fields within the below Action templates:

Workflow Item Phrase


Show Message Action Show informational message based on the designed template
Send Email Action Send e-mail asynchronously based on the designed template with
rule
Raise Exception Action Raise exception based on the designed template with rule
Notification Action Generate a notification using the profile and key tag for the specified
table based on the designed template

10.2.700 581
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

• Invoke BO Method - When calling Business Object (BO) method from within a directive, you can use variables
to map data to BO's method parameters. For example, you can map an existing TableSet, a simple variable
or other BO call's output.
This dialog displays directly when you configure the highlighted parameters of the following phrase:

Workflow Item Phrase


Invoke BO Method Action Invoke specified BO method with specified parameters

582 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

• BPM Info Prompts - During the BPM Form call, BPM runtime stores states of simple arguments, original state
of TableSet arguments, filtered state of TableSet arguments and states of variables of any type. The content
of these items is available for actions/conditions placed after Call BPM Data Form action in the directive flow.
• Enter Custom Code - Within the BPM custom code, you can access and modify directive variables.

When modifying values of directive variables within an


asynchronously executed Custom Code Action, these values
become available in this particular action only. Outside of
this action, the original values of directive variables are
preserved.

This dialog displays directly when you configure the highlighted parameters of the following phrase:

Workflow Item Phrase


Custom Code Condition The custom code condition is valid
Execute Custom Code Action Synchronously execute custom code with rule

10.2.700 583
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

When you design custom code, you can also use the Variables context menu option to reference variables.
This menu becomes available if at least one directive-level variable has been created for the current directive.
You can reference both simple variable types and complex variable types of TableSet type.
The Variables sub-menu is organized as follows:
• First, all variables are sorted alphabetically. When you double-click on a variable of simple type, it gets
inserted into the code using the "this.VariableName" format.
• For TableSet type variables, one more sub-level is available. On this list, a variable name is listed first,
followed by the list of tables it contains. When you double-click on a variable name at the top, it again
gets inserted into the code using the "this.VariableName" format. Double-clicking on a table inserts the
reference using the "this.VariableName.TableName" format.

Example this.CustomerVariable,
this.CustomerContainer.ShipTo

Validation

The Validate function controls if variable parameters are set up in the way BPM expects.
Upon a new variable creation or a directive import, the validation checks the following:
• Directive-specific variable names must not coincide with the names of:
• Parameters and arguments contained in the current method or updatable BAQ
• Auto-generated ttTable properties

584 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

• Other directive-specific variables


• Other system-generated properties
• BPM Context properties

• For the TableSet type of variables, the selected assembly is verified for availability

Reference Variables Using Context Menu

When you design custom code, you can use the Variables context menu option to reference variables. This
context menu becomes available if at least one directive-level variable has been created for the current directive.
You can reference both simple variable types and complex variable types of TableSet type.
The Variables sub-menu is organized as follows:
• The first level sub-menu displays all variables you created within the directive; the list of variables is sorted
alphabetically. When you double-click on a variable of simple type, its reference is inserted into the code using
the "this.VariableName" format.
• For TableSet type variable, click on its title to expand additional sub-level. On this list, a name of the complex
variable is listed first, followed by the list of tables it contains. When you double-click on a variable name at
the top, it again gets inserted into the code using the "this.VariableName" format. Double-clicking on a table
inserts the reference using the "this.VariableName.TablesetTableName" format.

Example this.CustomerVariable,
this.CustomerContainer.ShipTo

Callers

Use the items found within the Callers group to invoke BPM Data Form, call Epicor Service Connect workflow,
perform Custom Code Action and Invoke External Method.

Call BPM Data Form

Use this action to launch a custom program created to collect data specifically for use during the BPM directive
action.

You create data forms using the BPM Data Form Designer. When the directive executes this workflow action,
the specified BPM data form invokes.
You can define when to invoke the BPM data form: always, or only if the mandatory data is missing. You can
also define if to apply customization to the called BPM data form.
You can use this action with the following Directives Types:

Method Data Updatable BAQ


All None All

10.2.700 585
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Use the below statement to configure parameters of this action:


Call the named BPM Data Form using no customization always

named Click this link to open the Select BPM Data Form program. Use this program to specify
which BPM data form should launch when this action executes. Click Run Designer to
launch the BPM Data Form Designer program where you can create data forms.
no customization Click this link to open the Select BPM Data Form Customization program. Use this
program to select a customization to apply to the BPM data form when it is called.
always
Click this link to toggle between the following:
• Always – The BPM data form is called each time the action executes.
• Only when mandatory data missing – The BPM data form is called to acquire data
required to complete the data transaction, but was missing from the data set.

Call SC Workflow

Use this action to perform a call to Epicor Service Connect and to select or create a workflow used as a part of
the directive action.

This action is available to users having Advanced BPM User, as well as Non-advanced BPM User rights.

In Epicor Cloud ERP - Multi Tenant or Epicor Cloud ERP -


Dedicated Tenancy, this program or feature may not be
available or may operate under certain restrictions.

Using the default parameter, you configure how you want to connect to the ESC server. The following ways are
available:
• Using default ESC credentials defined on Company Maintenance > General Settings sheet.
• Using custom ESC credentials you can configure for each action.
After you select the connection method, click specified to invoke the Select Workflow window. On this window,
you can do the following:
• Select an existing workflow you want to execute from the directive.
• Create a new workflow skeleton directly from the Call SC Workflow action. Each new skeleton contains the
Start and Finish elements.
The Start element is assigned the request schema, produced by the parent business object and its method,
and the Finish element is assigned the response scheme, produced by the parent business object and its
method. You can save this workflow skeleton to a default workflow package specified in Company Maintenance

586 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

or you can select any of the existing workflow packages. You can then edit this workflow directly within the
ESC Workflow Designer.

If the method contains System.Dataset type parameter, the


Call SC Workflow action is not available for the directive
on this method.

This way of workflow skeleton creation is useful, as it allows getting the request and response schemes from
the business object and its method.

You can use this action with the following Directives Types:

Method Data Updatable BAQ


All Standard All

Use the below statement to configure parameters of this action:


Call the specified Epicor Service Connect Workflow asynchronously with rule

default
Click this link to launch the Select Epicor Service Connect Server window to specify where
Epicor Service Connect is installed. The ESC server and run-time credentials selected on this
window are saved with the directive.
The following options are available:
• Use Company Default Server - use this default option to use the ESC server and credentials
specified in Company Maintenance.
• Use Specified Server - use this option to specify custom ESC server parameters:
• Server - enter the Full Domain Name of the server where the Service Connect application
is installed.
• Enter the User and Password for the user account that has rights to access Service
Connect. While the BPM Workflow Designer form is opened, these credentials are
auto-populated for any other Call SC Workflow actions calling the specified server. Once
the designer is closed, this information is removed from the cache.

After you make your selection, click the Test Connection button to confirm you can access the
specified server.

specified
After you select this link, you are first presented with the Logon To Service Connect window.
On this window, you can do the following:
• Accept the credentials entered on the Select Epicor Service Connect Server window
(custom or company default).
• Enter custom ESC credentials.
• Confirm your selection by clicking OK.

The credentials you enter on this window


are specifically used for the workflow
design. These credentials are not saved
with the directive, they are only stored
until the BPM Workflow Designer form is
opened.

10.2.700 587
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

When the Select Workflow window displays, you can perform the following actions:
• Browse the available workflow packages and select an existing workflow you want to invoke
using the current directive. The package and workflow you select displays in the Chosen
Workflow field.
• Refresh the list of available workflow packages and workflows.
• Create New workflow - this button brings up the Enter Workflow window.
• In the Select a Workflow package list, accept the default workflow package or select
a different package where you want to save the new workflow.
• In the Enter new Workflow name field, type the name of the workflow to be created.

Create New button is disabled if you


are connected to an older version of
Service Connect Workflow Web
Service.

• Use the Advanced button to specify Workflow Context Parameters. The information on
this window is shared between the Business Activity Query and Business Process Management
sub-systems. Specify a server, user account and password that will be required to run an
Epicor Service Connect workflow when the system executes a directive action.
The following read-only information displays on this window:
• Server - the server, which you specified when logging on to Service Connect, is displayed
in this field.
• Server URL - This field displays the URL of the ESC Integration web service, which runs on
the server you specified when logging on to Service Connect. The integration service provides
methods for a variety of administrative actions in Epicor Service Connect.
By default, the service URL is https://<server
name>/BPMIntegrationWcfService/SCIntegrationWcfService.svc
• Chosen Workflow - This field displays the selected ESC package and workflow.

asynchronously
Click this link to toggle between asynchronous and synchronous execution.
• Synchronously - The call is made immediately when the action executes.

When invoking an ESC workflow


synchronously, BPM requires the response
returned from the ESC workflow is
compliant with the data format BPM
expects.

• Asynchronously - Asynchronous execution means the call is executed immediately, but the
action does not wait until the ESC workflow is finished and the results are processed.

with rule Click this link to launch the Execution Rule program. If the data transaction supports multiple
dirty rows (rows that contain unsaved data), you can use this program to select how the action
performs. Read the Support for Multiple Dirty Rows section in this chapter for details about each
option in this program. This variable is not visible if the method data transaction does not support
multiple dirty row updates.

588 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Execute Custom Code

Use this workflow item to launch the custom code action from the BPM workflow.

This action is only available to users having Advanced BPM User rights.

In Epicor Cloud ERP - Multi Tenant, this program or feature


may not be available or may operate under certain restrictions.

You can use this action with the following Directives Types:

Method Data Updatable BAQ


All All All

Use the below statement to configure parameters of this action:


Synchronously execute custom code.... with rule

Synchronously Click this link to toggle between asynchronous and synchronous execution:
• Synchronously - The call is made immediately when the action executes.
• Asynchronously - The call is queued and executed by the BPM system tasks which are part
of the Epicor ICE Task Agent service running behind the scenes. The system task runner
performs calls to the server every 20 seconds and processes asynchronous actions in the
queue. Users cannot configure this system task.

code Click this link to launch the Enter Custom Code program. The following controls are available
on this window:
• Code - Use this sheet to enter a code snippet written in C# language you want BPM to
execute.
BPM/BAQ code editors support intelligent code editing, which includes syntax highlighting
and code completion working for C# keywords, parameters, directive variables, member
lists, etc. Start typing and then press Ctrl + Space to bring up suggested options. For
example, to invoke a list of columns for a table, enter the name of the table followed by
a dot (.) and press Ctrl + Space. Select the column you need, it will be added to the table
name: ttABCCodeRow.Company.

• Usings & References - This button launches the Directive usings and references dialog.
When you design a custom code, you can use this window to specify additional C# usings
for the directive. Also, you can use this window to add additional References to assemblies
from Server\Assemblies or \Server\Customization\Externals folders of your Epicor ERP
installation.

10.2.700 589
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

This dialog is accessible from either the Custom Code Editor and directly from the BPM
Workflow Designer at any stage from a workflow preparation.

Following the same security restrictions


applied to the Execute Custom Code
action, accessing the Directive Usings &
References window from the main BPM
Designer window is only allowed to users
with BPM Advanced User privileges.

Any changes made on the Using & References dialog are automatically applied to the
directive.
Loading of assemblies from the application server may take a while. You can interrupt
and resume the process by using the Pause button. To quickly allocate the assembly you
need, use the Assembly name filter field.

• Check Syntax - as you create or complete code expressions, click this button to perform
C# code syntax validation. You can perform validations on code expressions at any time
during the entry process. The validation process reacts on:
• Empty code statement
• Syntax errors
Any error messages are reported in the grid under the Code editor, stamped with the
corresponding error type icon. By double-clicking the error, the problematic part of the code
is presented to the user.
Note the syntax of custom code(s) used within the directive is automatically checked when
closing the BPM Workflow Designer using the Save and Exit option.

with rule Click this link to launch the Execution Rule program. If the data transaction supports multiple
dirty rows (rows that contain unsaved data), you can use this program to select how the action
performs. Read the Support for Multiple Dirty Rows section in this chapter for details about
each option in this program. This variable is not visible if the method data transaction does not
support multiple dirty row updates.

To see this workflow item in action, see the Execute Custom Code Directive topics within the Custom Business
Process Management chapter.

Invoke External Method

Use this workflow item to create a reference to a custom external method you created using the Create
Programming Interface Form and Microsoft® Visual Studio®.

590 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

This action is only available to users having Advanced BPM User rights.

In Epicor Cloud ERP - Multi Tenant, this program or feature


may not be available or may operate under certain restrictions.

You can use this action with the following Directives Types:

Method Data Updatable BAQ


All All All

Use the below statement to configure parameters of this action:


Synchronously invoke specified method from external assembly with rule

Synchronously Click this link to toggle between asynchronous and synchronous execution:
• Synchronously - The method is called immediately when the action executes.
• Asynchronously - The call is queued and executed by the BPM system tasks which are part
of the Epicor ICE Task Agent service running behind the scenes. The system task runner
performs calls to the server every 20 seconds and processes asynchronous actions in the
queue. Users cannot configure this system task.

specified Click this link to display the Add Reference window.


method
The following information displays on this window:
• Methods, displays the list of assemblies and methods. Select the method you want to invoke
using this action.
• Is Static - Read-only column; displays Yes when the assembly method is static. Otherwise,
No is displayed.
• Requires BPM Context - Read-only column; displays Yes if a BPM Context is passed over
to the selected external method. If the method does not utilize a BPM Context data, the
column displays No.

Within an external method accessing the


BPM context, the BPM context parameter
must be declared as its last parameter.
For example:
public void
UpdateAsyncWithBpmContext(TipTableset
ds, ContextTableset context)

Loading of assemblies and methods from the application server may take a while. You
can interrupt and resume the process by using the Pause button. To quickly allocate the
assembly you need, use the Assembly name filter field.

external Click this link to display the Add Reference window. This window shows all custom external
methods you have created and deployed to the Server\Customization\Externals folder (or an
alternative folder you specified in web.config)
Select the custom external method from the list.

with rule Click this link to launch the Execution Rule program. If the data transaction supports multiple
dirty rows (rows that contain unsaved data), you can use this program to select how the action
performs. Read the Support for Multiple Dirty Rows section in this chapter for details about

10.2.700 591
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

each option in this program. This variable is not visible if the method data transaction does not
support multiple dirty row updates.

The Custom Business Process Management chapter explains this functionality into details. Review the chapter
to understand on arguments contained in the current method and how to use the Create Programming
Interface Form to generate the code shell. The chapter continues with discussion on how to define custom
action logic and deploy the external method using the Microsoft Visual Studio. The complete the functionality,
the chapter explains how to attach the method using the Invoke External Method workflow element.

Invoke BO Method

Use this action to call a service method from within a directive.

You can use this action with the following Directives Types:

Method Data Updatable BAQ


All Standard All

BPM directive is a part of the customization, which runs as a part of the call to the service method initiated by
the Epicor Client, another service or an external software. Within the directive, the service method exposes its
parameters and if present, also the return value. Method parameters can be either simple parameters such as
string or decimal, or complex parameters of TableSet type. Complex parameters are exposed in the BPM directives
as aliases to the tables inside them.
To configure this action:
• Specify the service method you want to call.
You can select methods of the two available service types - Business Objects and Simple Services.
• Configure parameters exposed by the selected service method. You define what data you want to pass to
the method as well as what to do with the data the call returns. You can use the following input for the
parameters:
• Directive level variables of the same type as the selected method parameter - simple or TableSet type.
• Specified expression - use this option compose an C# expression assigned to the selected parameter.
• [ignore] - The method accepts this option for non-mandatory parameters that have the OUT direction.

Use the below statement to configure parameters of this action:


Invoke specified BO method with not configured parameters

specified
Click this link to launch the Method Search window. Use this dialog window to locate a specific
method within a service you want to invoke.
Notice you can search for services of the Business Object or Simple Service type belonging to the
ERP or ICE system code.

592 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Once you select the System Code and service Type, use the Service Name drop-down select the
service for which you want to search the method.
You can narrow down list of search results using the Where Method Name Starts At field.
Click Search and from the Search Results grid, select the method you want to call.

not
Click this link to launch the Setup Method Parameters window.
configured
The following information display on this window:
• Business Object - Displays the name of the selected service.
• Method Name - Displays the name of the selected service method.
• Name - Displays the name of the service method parameter (argument).
• Type - Displays the .NET classification for each parameter. Method parameters can be either
simple parameters such as string or decimal, or complex parameters of TableSet type.
• Direction - The Direction field indicates how the data flows through the argument.
• INPUT - Indicates the arguments that pass data into the database.
• OUTPUT - Indicates the arguments that push the data back to the client for display. The
service method does not require any data from the parameters of this direction. You can
either assign these method parameters to variables of the same type, or, you can select the
[ignore] binding if you do not need to assign any value.
• INPUT-OUTPUT - Indicates the arguments that pass data back and forth between the database
and the client.
• RETVAL - Defines the argument that determines the return value.

• Binding - Use the drop-down list to provide input for the method parameters. The following
options are available:
• Directive level variables of the same type - simple or TableSet type.

Typically, you assign values to simple types


of variables using the Set
Argument/Variable action. To prepare
row data for the variables of TableSet
type, you can use Fill Table By Query
and Update Table By Query actions.

• [ignore] - select if do not want to pass any data to the method parameter; this option is only
available for non-mandatory parameters that have the OUT direction.
• Specified expression - use this option to launch the Specify C# expression window to compose
an expression assigned to a method argument. This option is only available for input
arguments.
Use the Check Syntax button to verify the syntax of your expression. Note the validation
process reacts on:
• Empty Expression Statement
• Syntax Error
• Security Issue (non-advanced BPM users)

10.2.700 593
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

• Create new variable - use this option to create a new directive level variable that has the
same type as the field from which this option was launched.

Only users with Security Manager or Global Security


Manager rights can create or manage existing Method
Directives on service methods that act on security-sensitive
data. In some cases, all methods of a service or a service itself
may be unavailable for most users. If the Method Search
window does not display a service or some/all methods of the
selected service, it means that those services or methods either
operate on security-sensitive data and are hidden from current
user, or are not compatible with BPM runtime.

Invoke Function

Use this action to invoke Epicor Function from within a directive.

You can use this action with the following Directives Types:

Method Data Updatable BAQ


All Standard All

Use the Invoke Function widget to incorporate a Function into a BPM workflow.
To configure this action:
• Define call type - synchronous or asynchronous.
• Specify the function library and the Function you want to call.
• Bind the parameters exposed by the selected Function with directive variables or specific expressions. You can
use the following bindings:
• Directive-level variables of the same type as the selected Function parameter - Simple or TableSet
type.
• Specified expression - Use this option to compose an C# expression assigned to the selected parameter.
• [ignore] - Use this option if the directive does not need to accept the response (out) parameter of a
Function.

Use the below statement to configure parameters of this action:


Synchronously call library / function using not configured parameters

Synchronously
Click this link to toggle between synchronous (default) and asynchronous call types.
If you choose to call a Function Asynchronously, the call is queued and executed by the BPM
system tasks which are part of the Epicor ICE Task Agent service running behind the scenes.

594 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

The system task runner performs calls to the server every 20 seconds and processes
asynchronous actions in the queue. Users cannot configure this system task.

During an asynchronous Function call, the


system creates a temporary session where
the Company, User, and Plant (Site) ID
values of the original session the Function
was invoked from are used instead of the
ones from the default Task Agent session.
For example, if in the default Task Agent
session, the Company is EPIC03 and User
is Manager, and the Function was called
from a BPM Directive where the current
Company was EPIC02 and User was Epicor,
the asynchronous Function call creates a
session with EPIC02/Epicor values.

If a Function is called asynchronously, its


response parameters (if any) cannot be
mapped to directive variables and are
ignored by the directive. Once the Invoke
Function action has been fully configured,
changing call type from synchronous to
asynchronous will remove any existing
mappings of the Function's response
parameters. Click Undo or press Ctrl + Z to
revert this change and restore the parameter
mappings.

library
Click this link to launch the Library Search window. You can narrow down your search results
by typing in the beginning of the library ID in the Library ID Starts With field. Additionally,
you can limit the search results to published libraries only by selecting the In Production
option.
Click Search and from the Search Results grid, select the Function you want to call and click
OK.

function
Click this link to launch the Function Search window. You can use the Starting At field to
narrow your search.
By default, the Search Results grid contains the list of all functions of the previously selected
library. Select the Function you want to call from your BPM workflow and click OK.

not configured
Click this link to launch the Setup Function Parameters window that contains the parameters
defined in the selected Function.
The Parameters grid displays the following information:
• Name - Displays the name of a Function parameter.
• Type - Displays the .NET data type of each parameter. Function parameters can be either
simple parameters such as a string or a decimal, or complex parameters of TableSet type.
• Direction - Indicates how the data flows through the parameter:
• in - Indicates the parameters that pass data into the Function.

10.2.700 595
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

• out - Indicates the parameters that return data to the Function caller, in this case a BPM
directive. You can either assign an out Function parameter to an existing or new
directive-level variable of the same type or select the [ignore] binding if you do not
need the data returned from the Function.

• Binding - Use the drop-down list to select the type of binding for a Function parameter.
The following options are available:
• Existing directive-level variable of the same type - Simple or TableSet type.
• Create new variable - Use this option to create a new directive-level variable that has
the same type as the corresponding Function parameter.
• [ignore] - Select this option if you do not want to consume any data from a Function
out parameter.

This option is only available for


parameters that have the out
direction.

• Expr: specified expression - Use this option to launch the Specify C# expression
window to compose an expression assigned to a Function parameter.

This option is only available for input


parameters.

Use the Check Syntax button to verify the syntax of your expression. Note the validation
process reacts on:
• Empty Expression Statement
• Syntax Error
• Security Issue (non-advanced BPM users)

Flow Chart

The Flow Chart category holds the conditional block workflow element.
Use this element to set up BPM workflow conditions you want to evaluate before an appropriate action is executed
by the workflow.

Condition

This section contains the list of pre-built condition statements you can select.

The conditions define when the subsequent elements execute. Each condition statement contains one or more
links. Click each link in the statement to open a program where you can configure details of the statement. After

596 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

you configure each link and return to the BPM Workflow Designer, the link text is replaced with the details you
selected.
If you enter more than one condition statement, you can use the And/O r logical operators to define the
relationship between the current statement and the preceding statement. You can also group statements by
adding parentheses in the Prefix and Postfix fields. The system evaluates the condition statements in the order
they appear and according to how they are grouped. To change the order of the statements, click the Up or
Down Arrow buttons on the toolbar. Condition statements that appear higher in the grid supersede those that
appear lower.
Within the workflow, the Condition element may have multiple inbound connections and two outbound
connections (exit points). You can evaluate the BPM condition to either True or False. This gives you a flexibility
in designing the processing flow through directives.
The following topic discusses the available conditions and information on how to use them.

List of Conditions

This section explores all the pre-built conditions available within the BPM functionality.

Some condition statements are available only for certain types


of directives.

As you specify parameters of BPM workflow actions or conditional blocks, you will notice that most tables begin
with a prefix in their names - for example, ds.Part or result.EmpBase. That prefix is the name of the method
parameter of tablest type. When you see a prefixed table name, you are working with in-memory dataset tables
in Method Directives, LinqRowSets in Data Directives and dataset rows in uBAQ Method Directives.
When you modify a column in a dataset table through a pre-process or in-transaction directive, you are modifying
the data before it is committed to the database tables.
The following is the list of conditions:
• the specified public data tag exists on the changed row of the specified table
Use this condition to identify a data tag placed on a record. You can apply data tags to records throughout
the application. A common use of data tags may be to group related records for searches or so that BPM
directives can run when the records are modified.
You can use this condition with the following Directives Types:

Method Data Updatable BAQ


All All None

Variables Description
The specified (data Click this link to launch the Specify a Value program. Use this program to enter a
tag) free-form text value that matches the data tag for which you want to run the directive.
You can select the Null Value option to check for no tag assigned.
public Click this link to toggle between three values: public, current user and public or
current user. Select public to limit the directive to records that have a public data tag
of the specified name. Select current user to limit the directive to records where the
user trying to modify the record has added a private data tag. Use the public or current
user option if you want a directive to run for a given data tag regardless of whether it
is public or private, instead of limiting the directive to one or the other.

10.2.700 597
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Variables Description
exists
Click this link to toggle between two values: exists and doesn’t exist. Select exists to
limit the directive to records that have the specified data tag. Select doesn’t exist to limit
the directive to records that do not have the specified data tag.

the changed row


Click this link to specify which row set is affected when the rule activates. You can
toggle between six values: the added row, the deleted row, the changed row, the
unchanged row, the updated row and all rows.

specified (table)
Click this link to launch the Select Table program. Use this program to specify a table
that is part of the condition statement. For a data directive, be sure you select the current
table; this table contains the data you want to monitor.

• number of rows in the designed query is more than or equal to 1


Use this condition to create a query and evaluate the number of rows it returns. If this comparison evaluates
to True, the BPM workflow continues the path using the True exit point.
You can use this condition with the following Directives Types:

Method Data Updatable BAQ


All All All

Variables Description
designed Click this link to launch the Compose Query program similar to Business Activity Query
Designer. The query you create evaluates the number of rows returned by the query
against the comparison value you select later in this statement. In addition to standard
tables, the query phrases can run against in-memory to analyze values passed in datasets
or linq row sets. Note the BPM query data access is restricted by the current company
the directive runs in.
is more than or Click this link to toggle between six values: is equal to, is not equal to, is less than,
equal to is less than or equal to, is more than or is more than or equal to. Select a
comparison option that is used against the number of rows returned by the selected
query.
1 Click this link to launch the Specify a Value program. Use this program to enter a
numeric value that evaluates against the number of rows returned by the query.

• the specified field has been changed from any to another


Use this condition to monitor a specific field contained within the current transaction. If the field’s value
changes to another value that you define, the comparison evaluates to True and the BPM workflow continues
the path using the True exit point.
You can use this condition with the following Directives Types:

Method Data Updatable BAQ


All
Pre-Processing Pre-Processing
Base Processing Base Processing

598 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Variables Description
specified Click this link to launch the Select Table Field(s) program. Use this program to specify
a field that is part of the BPM condition statement. You can choose a field from any
dataset table included in the current method parameters. The application compares the
field value to a value (any to another) you specify.
any Click this link to launch the Specify a Value program. Use this program to enter a value
that is evaluated. You can also select the Null Value or Any value you want to include in
the comparison.
another Click this link to launch the Specify a Value program. Use this program to enter a value
that is evaluated. You can also select the Null value or Any value you want to include in
the comparison.

• the specified call context field is equal to the specified expression


Use this condition to monitor the value of a context variable in the current data transaction, such as the
CurrentCompany or CurrentUserId. The application compares this argument against an expression that you
specify. If this comparison evaluates to True, the BPM workflow continues the path using the True exit point.
You can use this condition with the following Directives Types:

Method Data Updatable BAQ


All All All

Variables Description
specified call Click this link to launch the Select Table Field(s) program. Use this program to specify
context a call context field from one of two available Call Context tables. These tables are available
for each business method, and you leverage them for custom data storage on both the
client and server. The application compares the field value to a value that you specify.
is equal to Click this link to toggle between eight values: is equal to, is not equal to, is less than,
is less than or equal to, is more than,is more than or equal to, begins with, ends
with, contains or matches. Select a comparison option that is used against the call
context variable.
specified Click this link to launch the Specify C# expression program. Use this program to compose
an expression that evaluates against the comparison. The expression can contain literal
values, data from the current transaction, and functions that can perform calculations
and data type conversions.
Use the Check Syntax button to verify the syntax of your expression. Note the validation
process reacts on:
• Empty Expression Statement
• Syntax Error
• Security Issue (non-advanced BPM users)

• the specified field of the changed row is equal to the specified expression
This condition statement monitors a specific field within the data transaction. BPM then compares this field
value to the comparison option and a final value that you specify. If this comparison evaluates to True, the
BPM workflow continues the path using the True exit point.
You can use this condition with the following Directives Types:

10.2.700 599
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Method Data Updatable BAQ


All All
Pre-Processing
Base Processing

Variables Description
specified (field) Click this link to launch the Select Table program. Use this program to specify a field
that is part of the statement. For method directives, you can then select a field from
any dataset included in the current method’s parameters. For data directives, you can
select a field from the in-memory table associated with the directive.
the changed row
Click this link to specify which row set is affected when the rule activates. You can
toggle between six values: the added row, the deleted row, the changed row, the
unchanged row, the updated row and all rows.

is equal to Click this link to toggle between eight values: is equal to, is not equal to, is less than,
is less than or equal to, is more than,is more than or equal to, begins with, ends
with, contains or matches. Select a comparison option used to compare the selected
field against the value defined in the expression later in this statement.
specified Click this link to launch the Specify C# expression program. Use this program to
(expression) compose an expression that evaluates against the comparison. The expression can
contain literal values, data from the current transaction, and functions that can perform
calculations and data type conversions.
Use the Check Syntax button to verify the syntax of your expression. Note the validation
process reacts on:
• Empty Expression Statement
• Syntax Error
• Security Issue (non-advanced BPM users)

• the custom code... condition is valid


Use this condition to evaluate a code snippet written in C# language.
You can use this condition with the following Directives Types:

Method Data Updatable BAQ


All All All

Variables Description
code Click this link to launch the Enter Custom Code editor. The code written in editor should return
boolean value, for example, return true;
The following controls are available within the Editor:
• Code - Use this sheet to enter a code snippet written in C# language you want BPM to execute
• Usings & References - This button launches the Directive usings and references dialog.
When you design a custom code, you can use this window to specify additional C# usings for
the directive. Also, you can use this window to add additional References to assemblies from
Server\Assemblies or \Server\Customization\Externals folders of your Epicor ERP installation.

600 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Variables Description
Note this dialog is accessible from either the Custom Code Editor and directly from the BPM
Workflow Designer at any stage from a workflow preparation. Any changes made on the Using
& References dialog are automatically applied to the directive.
• Check Syntax - as you create or complete code expressions, click this button to perform C#
code syntax validation. You can perform validations on code expressions at any time during
the entry process. The validation process reacts on:
• Empty code statement
• Syntax errors
Any error messages are reported in the grid under the Code editor, stamped with the
corresponding error type icon. By double-clicking the error, the problematic part of the code
is presented to the user.
Note the syntax of custom code(s) used within the directive is automatically checked when
closing the BPM Workflow Designer using the Save and Exit option.

valid Click this link to select how the condition evaluates the result of the custom code. If valid is
specified, the result of the custom code is compared with true. When you select invalid, the result
is compared with false.

• the hold of the specified type is attached to the business object


Use this condition to indicate the system should verify whether a hold type is attached to the current or related
business object. If the hold type is present on the selected business object when the method runs, the condition
evaluates to True and the BPM workflow continues the path using the True exit point.
You can use this condition with the following Directives Types:

Method Data Updatable BAQ


All None None

Variables Description
specified type is attached to the Click this link to launch the Select Business Object program. You can
business object browse all the business objects related to the current method using a
Tree View. This interface displays all the objects that link to, or are linked
from, the current object.

You also specify the hold type this condition needs to verify with this business object. Hold Types must be
created specifically for the selected business object before you can select one through this program.
• the method is called by specified user
Use this condition to determine whether a specific user did or did not launch the current transaction. This
condition statement can be useful for testing directives so that they are activated only by a specific user
account. If this comparison evaluates to True, the BPM workflow continues the path using the True exit point.
You can use this condition with the following Directives Types:

Method Data Updatable BAQ


All All All

10.2.700 601
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Variables Description
is called Click this link to toggle between is called or is not called options. Select the option
you need; these options determine whether the user did or did not initiate the data
transaction.
specified user Click this link to launch the User Account Search window. All the user records in
the current database display. Use this window to select a user that is used for this
condition statement.

• the user who called the method belongs to specified group


Use this condition to determine if the current user is or is not a member of a specific security group. The
application compares the groups of the user who initiated the transaction with the security group you specify
in the condition. If this comparison evaluates to True, the BPM workflow continues the path using the True
exit point.
You can use this condition with the following Directives Types:

Method Data Updatable BAQ


All All All

Variables Description
belongs Click this link to switch between belongs or does not belong options. Select the
option you need; these options determine whether the user is or is not a member
of the security group you specify later in this condition statement.
specified group Click this link to launch the Security Group Search window. Use this window to
specify a security group evaluated against the selected user.

• there is at least one updated row in the specified table


This condition compares the value of a field included in the row set to a table you specify. If this comparison
evaluates to True, the BPM workflow continues the path using the True exit point.
You can use this condition with the following Directives Types:

Method Data Updatable BAQ


All
Pre-Processing Pre-Processing
Base Processing Base Processing

Variables Description
updated Click this link to specify which row set is affected when this rule activates. You can
select the added row, the deleted row, the updated row or unchanged row.
specified Click this link to launch the Select Table program. Use this program to specify a
table that is monitored by this condition statement. Use this program to choose any
table linked to the current data transaction.

• time is in the specified time frame


Use this condition to check if the directive execution time matches the indicated timeframe. If this comparison
evaluates to True, the BPM workflow continues the path using the True exit point.
You can use this condition with the following Directives Types:

602 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Method Data Updatable BAQ


All All All

Variable Description
specified Click this link to launch the Specify a Time Frame program. Use this program
to define a time frame that is part of this condition statement.

• This directive has been enabled from the specified directive


Use this condition to select a directive that enabled the current directive.
You can use this condition with the following Directives Types:

Method Data Updatable BAQ


Post-Processing Standard Post-Processing

specified Click this link to launch the Select a Primary Directive Upon window. Depending on where
this condition is used, select either:
• For Method and Updatable BAQ Directives - select a Pre-Processing directive or a
Base-Processing directive that is used for this condition statement.
• For Data Directives - select an In-Trasaction directive that is used for this condition
statement.

• the specified argument is equal to the specified expression


Use this condition to evaluate a BPM method argument. For an updatable BAQ method directive, the condition
can test which BAQ custom action is being run so that BPM directive actions can be executed.
You can use this condition with the following Directives Types:

Method Data Updatable BAQ


All All All

Variables Description
specified (argument) Click this link to launch the Select an Argument program. Use this program to select
which parameter you would like to evaluate against the other variables in the condition
statement.
is equal to Click this link to toggle between eight values: is equal to, is not equal to, is less
than, is less than or equal to, is more than,is more than or equal to, begins
with, ends with, contains or matches. Select a comparison option used to compare
the selected field against the value defined in the expression later in this statement.
specified Click this link to launch the Specify C# expression program. Use this program to
(expression) compose an expression that evaluates against the comparison. The expression can
contain literal values, data from the current transaction, and functions that can perform
calculations and data type conversions.
Use the Check Syntax button to verify the syntax of your expression. Note the validation
process reacts on:
• Empty Expression Statement

10.2.700 603
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Variables Description
• Syntax Error
• Security Issue (non-advanced BPM users)

• the specified argument contains the specific text


Use this condition to evaluate if the specific argument includes the specific word expression. If this comparison
evaluates to TRUE, the directive’s actions are run.
You can use this condition with the following Directives Types:

Method Data Updatable BAQ


All All All

Variables Description
specified (argument) Click this link to launch the Select an Argument program. Use this program to
select which parameter you would like to evaluate against the other variables in
the condition statement.
contains Click this link to toggle between six values: equals to, not equals to, begins
with, ends with, contains or matches. Select a comparison option that is used
against the argument variable.
specified (expression) Click this link to launch the Enter Word program. Use this program to enter a
word expression that evaluates against the argument.

• Method changed the specified field of the designed query from any to another value
Use this condition to monitor a specific query field contained within the current transaction. If the current
method changes the query field's value to another value that you define, the comparison evaluates to True
and the BPM workflow continues the path using the True exit point.

Please be aware of the following limitation - when the Call


BPM Data Form action precedes this condition within a
workflow, the condition always evaluates to False.

You can use this condition with the following Directives Types:

Method Data Updatable BAQ


Post-Processing None None

Variables Description
specified Click this link to launch the Select Table Field(s) program. Use this program to specify a
query field that is part of the BPM condition statement.
On this dialog, the Table field displays table alias(es) used within the query. These refer to
subsets of the corresponding data of dataset table or in-memory table variable that matches
conditions and relations defined in the query.

designed Click this link to launch the Compose Query program similar to BAQ Designer where you
design a query. The query field you select is then evaluated for changes against the
comparison values you select later in this statement. Note the BPM query data access is
restricted by the current company the directive runs in.

604 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Variables Description
any Click this link to toggle between six values: is equal to, is not equal to, is less than, is
less than or equal to, is more than or is more than or equal to. Select a comparison
option that is used against the number of rows returned by the selected query.
another Click this link to launch the Specify a Value program. Use this program to enter a value
that evaluates against the query field.

• Value of the specified field of the designed query changed from any to another
Use this condition to monitor a specific query field contained within the current transaction. If the field’s value
changes to another value that you define, the comparison evaluates to True and the BPM workflow continues
the path using the True exit point.
You can use this condition with the following Directives Types:

Method Data Updatable BAQ


None All None

Variables Description
specified Click this link to launch the Select Table Field(s) program. Use this program to specify
a query field that is part of the BPM condition statement.
On this dialog, the Table field displays table alias(es) used within the query. These refer
to subsets of the corresponding data of dataset table or in-memory table variable that
matches conditions and relations defined in the query.

designed Click this link to launch the Compose Query program similar to BAQ Designer where
you design a query. The query field you select is then evaluated for changes against the
comparison values you select later in this statement. Note the BPM query data access is
restricted by the current company the directive runs in.
any Click this link to launch the Specify a Value program. Use this program to enter a value
that evaluates against the query field.
another Click this link to launch the Specify a Value program. Use this program to enter a value
that evaluates against the query field.

• This application instance is a Non-Production instance


Use this condition to specify the status of the application server instance your workflow will apply to.

The application server status is set up in the Epicor


Administration Console (EAC). For more information, please
refer to the EAC help documentation.
You can use this condition with the following Directives
Types:

Method Data Updatable BAQ


All All All

10.2.700 605
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Variables Description
Non-Production Click this link to toggle between two values: Production and
Non-Production. Select the status of the application server instance you need
for the workflow.

Labels

Use the items found within the Labels group to attach and remove Data Tags and BPM Holds.
The tags are unstructured text values that provide a way to group otherwise unrelated records so that you or
other users can search for them. Business Process Management method directives and data directives can leverage
data tags to create custom application functionality.

Example You can use a condition statement to check for the


presence of a data tag on a record. This condition statement
could be used as part of a directive that sends you an email
when a record you tagged is modified. Also, actions can be
used to add one or more tags to a record being processed or
remove tags from a record. Adding a tag to a record means a
previously untagged record would appear in your Data Tag
search results after it is updated.

Use BPM Holds to define an external hold event linked to a business object which, in turn, may be set through
a BPM action. BPM directives may then be created on other business objects and methods to evaluate whether
a hold exists and modify the business process as you need. BPM Holds extend the regular status holds built into
the application. You can define and evaluate your own hold conditions based on your business workflows.

Attach Data Tag

Use this action to attach a data tag to a record. You can apply data tags to records throughout the application.

A common use of data tags may be to group related records for searches or so that BPM directives can run when
the records are modified.

The date and time of a data tag attached to a record are


retrieved from the current company time zone and saved in
Data Tag history.

You can use this action with the following Directives Types:

Method Data Updatable BAQ


All All None

Use the below statement to configure parameters of this action:

606 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Attach the specified public data tag to the changed row of the specified table with rule

specified (data tag) Click this link to launch the Specify a Value program. Use this program to enter a
free-form text value that matches the data tag you want to apply to the current record.
If the data tag has not been previously defined, it will be created.
public Click this link to toggle between two values: public and current user. Select public to
attach a public data tag to the current record. Select current user to attach a private data
tag for the current user to the current record.
the changed row
Click this link to specify which row set is affected when the rule activates. You can toggle
between six values: the added row, the deleted row, the changed row, the unchanged
row, the updated row and all rows.

specified (table) Click this link to launch the Select Table program. Use this program to specify the table
that is changed through this action.
with rule Click this link to launch the Execution Rule program. If the data transaction supports
multiple dirty rows (rows that contain unsaved data), you can use this program to select
how the action performs. Read the Support for Multiple Dirty Rows section in this chapter
for details about each option in this program. This variable is not visible if the transaction
does not support multiple dirty row updates.

Remove Data Tag

Use this action to remove a data tag from a record. You can apply data tags to records throughout the application.

A common use of data tags may be to group related records for searches or so that BPM directives can run when
the records are modified.
You can use this action with the following Directives Types:

Method Data Updatable BAQ


All All None

Use the below statement to configure parameters of this action:


Remove the specified public data tag to the changed row of the specified table with rule

specified (data tag) Click this link to launch the Specify a Value program. Use this program to enter a
free-form text value that matches the data tag you want to remove from the record.
public Click this link to toggle between two values: public and current user. Select public to
remove a public data tag from the current record. Select current user to remove a private
data tag from the current record for the user that initiated the transaction.

10.2.700 607
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

the changed row


Click this link to specify which row set is affected when the rule activates. You can toggle
between six values: the added row, the deleted row, the changed row, the unchanged
row, the updated row and all rows.

specified (table) Click this link to launch the Select Table program. Use this program to specify the table
that is changed through this action.
with rule Click this link to launch the Execution Rule program. If the data transaction supports
multiple dirty rows (rows that contain unsaved data), you can use this program to select
how the action performs. Read the Support for Multiple Dirty Rows section in this chapter
for details about each option in this program. This variable is not visible if the transaction
does not support multiple dirty row updates.

Attach Hold

Use this action to place a BPM hold on a specific record.

Use BPM holds to define an external hold event linked to a business object which in turn may be set through a
BPM action. BPM directives may then be created on other business objects and methods to evaluate whether a
hold exists and then modify the business process as you need. BPM holds extend the regular status holds built
into the application. You can then define and evaluate your own hold conditions based on your business workflows.

The date of a hold placed on a record is retrieved from the


current company time zone and stored in database. You can
review the date on Hold Usage tab in Hold Type
Maintenance form.

You can use this action with the following Directives Types:

Method Data Updatable BAQ


All None None

Use the below statement to configure parameters of this action:


Attach hold of the specified type with rule

specified
Click this link to launch the Hold Attachment program. Use this program to specify which hold
should be attached to a record when the application executes this action. You can select from
any of the hold types defined for the business object. You can also add an optional comment.
After a hold has been placed on a record, any subsequent directives can check for the presence
of this hold and perform various actions when a user attempts to execute a method that affects
the record.
Hold types are created and maintained in Hold Type Maintenance. To learn about this program,
read the previous Hold Type Maintenance section.

608 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

with rule Click this link to launch the Execution Rule program. If the data transaction supports multiple
dirty rows (rows that contain unsaved data), you can use this program to select how the action
performs. Read the Support for Multiple Dirty Rows section in this chapter for details about each
option in this program. This variable is not visible if the method data transaction does not support
multiple dirty row updates.

Remove Holds

Use this action to remove a hold from a specific record.

You can use this action with the following Directives Types:

Method Data Updatable BAQ


All None None

Use the below statement to configure parameters of this action:


Remove holds of the specified type with rule

specified
Click this link to launch the Hold Removal program. Use this program to specify a hold type
that is removed from a record when the application launches this action.
You can select from any of the hold types defined for the business object. Hold types are created
and maintained in Hold Type Maintenance. To learn about this program, read the previous
Hold Type Maintenance section.

with rule Click this link to launch the Execution Rule program. If the data transaction supports multiple
dirty rows (rows that contain unsaved data), you can use this program to select how the action
performs. Read the Support for Multiple Dirty Rows section in this chapter for details about each
option in this program. This variable is not visible if the method data transaction does not support
multiple dirty row updates.

Other

Use the workflow items found within the Other group to perform various BPM actions.
The BPM workflow can execute the following actions:
• Automatically preview or print a report.
• Write table changes to the applicable program change log.
• Enable launching any post-processing directives linked to the directive in focus.
• Post a data notification message to the Epicor Collaborate message stream.
• Display an exception message.
• Send an e-mail notification to a user or a group of users.

10.2.700 609
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

• Display an informational message.

Auto Print

Use this action to automatically preview, print, or e-mail a report when a data directive executes. You can
automatically print SSRS reports, Crystal reports, Bartender labels, Outbound EDI documents, and Electronic
Report files.

Typically you set up this action to run when a significant database change occurs and want to review the affected
records through a report. Because this report automatically generates, you can distribute the report to key
individuals. For example, you could create a data directive that automatically prints the Job Traveler for released
jobs on a printer in your production center. You could also create a data directive that automatically emails Sales
Order Acknowledgments to specific customer contacts.
You can set up the Auto Print action in multiple ways. This action can just run a single task. It can display the
report as a print preview, send the report as an e-mail attachment, or print out a hard copy on a selected client
or server printer. However you can set up this action to render multiple outputs. When you indicate you want to
print the report on a client or server printer, you can also set up the action to simultaneously send the report as
an e-mail attachment. Likewise if you select the Email print action, you can send out the report as an e-mail
attachment.

In order to launch Auto-Printing via REST calls, an AppServer


URL pointing to a Windows authentication binding or Epicor
user name/password binding must be specified on the
System Agent Maintenance > Detail sheet. Note this value
cannot be set to Azure AD authentication binding.

You can further customize how the report auto prints by designing routing rules. Routing rules activate when
the Auto Print action runs, and they help you streamline reporting for specific business needs. They can be
simple rules that define an alternate report style users run when they need to print a report using a unique
format, or complex rules that divide, or break, the report run into multiple dataset partitions which they can
link to separate rendering workflows for generating, printing, previewing, and sending the report output. For
more information, review the Routing Rules section in the application help and the Reporting Tools chapter
in the Implementation User Guide.

To configure the Auto Print action, you first select a report. You then define the print action by selecting a preview,
print, or e-mail option and then configure any parameters for the report. Lastly you specify how the rule processes
row updates.
You can use this action with the following Directives Types:

Method Data Updatable BAQ


None Standard None

A BPM data directive with Auto Print action is the replacement for the combination of Business Activity Manager
Auto-Print event and Report Data Maintenance Auto Print rules used in previous Epicor ERP releases.

Use this statement to configure the action parameters:

610 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Automatically print specified report with specified options with rule

specified (report) Click this link to open the Auto Print Report Search dialog box and choose the report
that will be generated by the Auto Print action.
specified (options) Click this link to open the Set Up Auto Print dialog box. Use this window to first indicate
whether the selected report should run immediately or be scheduled on the queue. You
also define the output format for the report (PDF, XML, Excel, and other options). You
then determine whether the report renders as a print preview, prints on a server or client
printer, or is sent as an email attachment. After you determine the how the report will auto
print, you then either set up the printer options or enter the e-mail parameters.
with rule Click this link to launch the Execution Rule window. This rule determines processing for
all row updates to this table within a transaction. You select a rule radio button option
such as "For each matching" and then select the in-memory table for the rule.

Change Log

Use this action to write table changes to the applicable program change log when the BPM data directive executes.

To configure this action, select the data directive tables field that will be monitored for change.
Changes in your application data are written to the program change log only when there is an enabled change
log data directive for the affected table and fields. You must create a data directive with a change log action for
each table that you want to monitor in the program change log.

The Change Log is available for programs that use a table


which has an assigned ChgLogID. This capability displays on
the program's Standard Toolbar as the Change Log icon. If
you see this icon, you can enable the Change Log functionality
for a given program. Use Field Help to determine which fields
you want to monitor on the change log. Then launch Data
Directives Maintenance to create the change log directive.

You can use this action with the following Directives Types:

Method Data Updatable BAQ


None In-Transaction None

Use the below statement to configure parameters of this action:


Log changes to the selected fields of specified table

specified Click to display the Select Table Field(s) dialog box. Use this dialog box to select the table
fields that will be monitored for change. The Name field is inactive, the Table field displays the
data directive table name, and the filter options for Added Records and Updated Records are
pre-selected and cannot be changed.

10.2.700 611
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Enable Post Directive

Use this action to enable any post-processing directives linked to this directive.

Use this action when you want an action to perform after the record is successfully validated and updated from
the in-memory tables to the actual, or physical, tables.
You do not select any variables for this action. Instead, you link a post-processing directive to this pre- or base
processing directive by using the “this directive has been enabled from the specified directive” condition statement.
You select the directive that contains this action statement through the specified variable.
Use this action to test for conditions in a pre-processing or base processing directive and then launch a
post-processing directive based on these conditions.
You can use this action with the following Directives Types:

Method Data Updatable BAQ


None
Pre-Processing Pre-Processing
Base Processing Base Processing

Enable Standard Directive

Use this action to enable execution of a Standard Data directive linked to the current In-Transaction data directive.

Use this action when you want to validate data being committed to the DB using the In-Transaction directive
and then use Standard directive to perform required actions after the data is saved to the DB.
You do not select any variables for this action. Instead, you link a Standard Data directive to this In-Transaction
directive by using the “this directive has been enabled from the specified directive” condition statement. You
select the directive that contains this action statement through the specified variable.
You can use this action with the following Directives Type:

Method Data Updatable BAQ

None In-Transaction None

612 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Notify Collaborate

Use this action to post a data notification message to the Epicor Collaborate message stream when the BPM
method directive, data directive or function executes.

This action is only available to users having Advanced BPM User rights.
To configure this action, you must set the application table, or a business object that is applied as the context
for alert messages and you must define a message template that includes the message title and message content
that Epicor Collaborate will apply when posting notification messages.
Use the below statement to configure parameters of this action:
Notify Collaborate based on the designed template with rule

designed
Click to display the Design Notify Collaborate Template dialog box.
In the Design Notify Collaborate Template dialog box, you must create a template for the
message title and content in data notification messages that are posted in Epicor Collaborate.

rule
Click to display the Execution Rule dialog box.
Execution rules determine processing for all row updates to this table within a transaction.

Design Notify Collaborate Template Fields

Name
The notification message template name.

Metadata
Define the metadata for this template.
In the fields, enter your data or right-click and choose from the following actions for setting
up value substitution:
• Call Context - Choose to set up substitution of the value in a selected BPM Call Context
field. To use this action, the directive must also include an action that sets the
corresponding BPM call context variable. For example you may have an Execute Custom
Code action that includes logic that sets a callContextBpmData or callContextClient
variable, which you can then select as a Call Context substitution.
• Field Query - Choose to open the Select Table Field(s) dialog box and set up
substitution of the value from a selected field in the directive table. Selection is limited
to one field.

Enable Notify Collaborate Action in BPM Data Directive

In your Epicor ERP application, you can design a Business Process Management (BPM) workflow to automatically
post custom notification messages to Epicor Collaborate. Use Data Directive, Method Directive and Epicor Functions
to create a workflow that includes the Notify Collaborate action and the action that triggers it. You define a
message template when adding the Notify Collaborate action in the BPM Workflow Designer.

10.2.700 613
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

In the Epicor ERP application, ensure that an active connection exists to the Epicor Collaborate website. For more
information, see the Registering Epicor Collaborate topic in the application help.

The CDC Log Processor and CDC Notification Sender should


be running.

This procedure describes the work required to create a BPM data directive workflow that includes a Notify
Collaborate action configured to send notification messages to Epicor Collaborate when a customer address is
updated.
Create Data Directive

You begin by creating a data directive that monitors the Customer table.

1. Navigate to Data Directives Maintenance.


Menu Path: System Management > Business Process Management > Data Directives Maintenance

This program is not available in Epicor Web Access.

2. On the Detail sheet, select the Table field. Enter Customer and press Tab.

3. In the tree view, select the Customer node.

4. From the New menu, select New Standard Directive. A new directive node is added under Customer.

5. Go to the Standard > Detail sheet.

6. For Directive Name, enter Notify Collaborate.

7. Select the Enabled check box. Your screen will look as follows:

8. Select Save.

Define Condition

You now launch the BPM Workflow Designer to create the data directive.

1. Select Design.

2. In the BPM Workflow Designer, select the Condition action element, drag it to the workflow design area
and connect it to the Start element. The conditions define when the directive will execute.

3. Select the Condition element, and on the Condition tab at the bottom of the workflow design area, select
New.

4. Click the arrow on the right side of the Condition column and choose the The specified field has been
changed from any to other.

5. Select the specified link.

6. In the Select Table dialog box, select the Address1 field.

7. Now select OK. The following condition displays.


You have configured the Condition element. Now whenever a user changes the address of a customer, the
condition evaluates to true.

614 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Design Notification Template

You next add the Notify Collaborate action element to the data directive.

1. Select the Notify Collaborate action element and drag it to the workflow design area and connect it to
the Condition element.
When the condition statement resolves to True, it activates the Notify Collaborate action.

2. Select the Notify Collaborate action element. The Action tab at the bottom of the workflow design area
displays an action statement. You need to adjust some items on this statement to set up the notification.
Select the designed link.

3. In the Design Notify Collaborate Template window, enter the Name and Metadata for this notification.
Your screen may look similar to the following if you want to get notified about customer address changes:
Use the following fields to design the template. Note these fields use standard delimited format.
• Name - Specify the name for this custom notification. The name you choose will allow this notification
to be followed inside of Collaborate from the list of rules too. It doesn't have to be unique, so you can
have different Notify Collaborate widgets with the same rule.
• Tags - Add tags you want to get posted along with the message. A tag is a name, and optionally a value.
The way ERP entities are linked with messages is by using this tag functionality. So each primary key for
a table becomes a tag.
Let's say you want to receive notifications about customer address changes. You may also want to add
the customer number to the message, so that you can easily check what else is going on for this particular
customer.
In this field, you would enter Cust'<CustNum/>, where Cust is the name and <CustNum/> is the value.
A tag doesn't have to be an ERP entity though, it can be anything so you can have custom defined tags
with a name, and optionally a value.
For example, Cust'<CustNum/>~ AddressChanged~ NewAddress. To separate tags, use the ~
delimiter.
• Like - Specify the table primary key column that's used to open a form (among other actions available
on context menus in ERP). For example, Customer.CustID means you can open the Customer form to
view the address change when you click on the notification message.
• Value In - Supply the value as an argument when opening the form. For example, "Customer.CustID"
and "addison".
• Icon - Enter the material icon name. It will display next to the notification header in Epicor Collaborate.
The complete set of material icons are available in https://material.io/resources/icons/?style=baseline.
• Icon Color - Define the color of the selected icon. Icon colour can be name or hex code instead (starting
with a # ).
• Subject - This is the notification description.
In these fields, enter the data or right-click and choose from the following actions for setting up value
substitution:
• Call Context - Choose to set up substitution of the value in a selected BPM Call Context field.
• Field Query - Choose to open the Select Table Field(s) dialog box and set up substitution of the value
from a selected field in the directive table. Selection is limited to one field.

4. Select OK. In the action statement, note that designed changes to Customer Address Update.

Test BPM

10.2.700 615
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Make a change to a customer address to verify that the Notify Collaborate action triggers and sends notification
to Epicor Collaborate.

1. Go to Customer Maintenance.

2. Open the Addison customer and update the Address field.

3. Select Save.

4. Go to Epicor Collaborate and verify that the data notification message is present in the message stream.

A data notification message will be posted to the Epicor Collaborate message stream whenever a data change
occurs that causes the BMP data directive to trigger the Notify Collaborate action.

Raise Exception

Use this action to display an exception message, stopping further execution of a BPM customization.

When this action is reached on a BPM workflow, execution of a BPM method or data table customization is
stopped, transactions that were not committed at the time are rolled back, and execution of the server code
which launched the directive is also stopped. Since the BPM customization never completes, Info Messages
scheduled for passing to the client are not passed back.
When an exception message is raised through the Raise Exception action or a custom code, the BPM directive
name from which the exception was invoked is included in the exception details. You may use this information
to quicky identify the source directive while troubleshooting a particular BPM behaviour.
BPM exception messages are transmitted to alternate clients - Epicor Mobile Access, Epicor Web Access, Web
Services and Service Connect.
You can use this action with the following Directives Types:

Method Data Updatable BAQ


All In-Transaction All

Use the below statement to configure parameters of this action:


Raise exception based on the designed template with rule

designed
Click this link to launch the Design Exception Template program. Use this program to build an
exception message generated when the application executes the directive action.
First, specify the Name of the exception template. The default name is MyError. You can give it a
different name.
You can select one of the following Severity modes when setting up a message: Information,
Warning, Error, or Update Conflict.

616 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Within the message, you can include parameters, simple variables or values queried from related
tables and fields. The following options become available for selection when you click Insert or
right-click in the message to invoke the context menu:
• Call Context - Choose to set up substitution of the value in a selected BPM Call Context field.
To use this action, the directive must also include an action that sets the corresponding BPM call
context variable. For example you may have an Execute Custom Code action that includes logic
that sets a callContextBpmData or callContextClient variable, which you can then select as a Call
Context substitution.
• Field Query - Choose to open the Select Table Field(s) dialog box and set up substitution of
the value from a selected field in the directive table. Selection is limited to one field.

The default name of the query is


MyFieldQuery. You can enter a different name
for your query.

• Table Query - Choose to open the Select Table Field(s) dialog box and set up substitution of
values from multiple fields in the directive table. In the message, the default behavior of a table
query is to insert a comma-delimited list of the selected table field names followed by a
comma-delimited list of the corresponding table values.

The default name of the query is


MyTableQuery. You can enter a different
name for your query.

• Scalar Variables - Choose to set up substitution of values using directive-level variables of simple
type. The first five variables you define for the directive are available for selection directly from
the context menu. By clicking More ..., you are presented with the Select and Argument/Variable
window that lists all simple variables including their types.
For more information on how to utilize variables, see the Directive Level Variables section.

with Click this link to launch the Execution Rule program. If the data transaction supports multiple dirty
rule rows (rows that contain unsaved data), you can use this program to select how the action performs.
Read the Support for Multiple Dirty Rows section in this chapter for details about each option in this
program. This variable is not visible if the method data transaction does not support multiple dirty
row updates.

Send E-mail

Use this action to send an e-mail notification when the BPM executes.

You can select to send an e-mail synchronously or asynchronously. Use the Design E-mail template program to
define e-mail parameters such as subject, recipients and the body of an e-mail.
You can use this action with the following Directives Types:

10.2.700 617
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Method Data Updatable BAQ


All Standard All

Use the below statement to configure parameters of this action:


Send e-mail asynchronously based on the designed template with rule

asynchronously
Click this link to set this variable to send an email either synchronously or asynchronously. This
indicates how the application handles email generated by this action. Available options:
• Synchronously - The email is sent when the action executes.
• Asynchronously - The call is queued and executed by the BPM system tasks which are
part of the Epicor ICE Task Agent service running behind the scenes. The system task runner
performs calls to the server every 20 seconds and processes asynchronous actions in the
queue. Users cannot configure this system task.

designed
Click this link to launch the Design Email Template program. Use this program to build an
email message that generates when BPM executes this action.
First, specify the Name of the template.

The default name of the template is


MyEmail. You can manually enter a
different name.

Configure the email template by specifying values within the From, To, CC, BCC, Reply to,
Subject, and email body fields as needed. Within any of these fields, you can also include
call context data, simple variables or values queried from related tables and fields.
The following options become available for selection when you click Insert or right-click in a
field and invoke the context menu:
• Call Context - Choose to set up substitution of the value in a selected BPM Call Context
field. To use this action, the directive must also include an action that sets the corresponding
BPM call context variable. For example you may have an Execute Custom Code action that
includes logic that sets a callContextBpmData or callContextClient variable, which you can
then select as a Call Context substitution.
• Field Query - Choose to open the Select Table Field(s) dialog box and set up substitution
of the value from a selected field in the directive table. Selection is limited to one field.

The default name of the query is


MyFieldQuery. You can enter a
different name for your query.

• Table Query - You can only use this option when you construct the email body. Select
this option to open the Select Table Field(s) dialog box and set up substitution of values
from multiple fields in the directive table. In the message, the default behavior of a table
query is to insert a comma-delimited list of the selected table field names followed by a
comma-delimited list of the corresponding table values.

The default name of the query is


MyTableQuery. You can enter a
different name for your query.

618 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

• Scalar Variables - Choose to set up substitution of values using directive-level variables


of simple type. The first five variables you define for the directive are available for selection
directly from the context menu. By clicking More ..., you are presented with the Select
and Argument/Variable window that lists all simple variables including their types.
For more information on how to utilize variables, see the Directive Level Variables section.
Optionally, select the Include shortcut link check box to have a shortcut.sysconfig
configuration file attached to the e-mail. This option is available only when a supporting
alert attachment record has been created for the data directive table.

with rule
Click this link to launch the Execution Rule program. If the data transaction supports multiple
dirty rows (rows that contain unsaved data), you can use this program to select how the action
performs. Read the Support for Multiple Dirty Rows section in this chapter for details about
each option in this program. This variable is not visible if the method data transaction does
not support multiple dirty row updates.

To define the email settings for the current company, use


Company Maintenance. On the Emails and Forms sheet, you
specify the SMTP Server and Port that distributes email
throughout your company. You also indicate the authentication
method used to connect to the SMTP Server. These settings
are used by Send-Email action and Global Alerts to distribute
email notifications.
When you build the email template, entering the From address
is not mandatory. If you leave this field blank, the BPM directive
first takes the current user's Email address defined in User
Account Security Maintenance. If the user's email address is
not specified, the one specified in Company Maintenance is
used.

Show Message

Use this action to display an informational message that you create.

After users read the message and click OK, the method continues processing. BPM informational messages are
transmitted to alternate clients - Epicor Mobile Access, Epicor Web Access, Web Services and Service Connect.
You can use this action with the following Directives Types:

Method Data Updatable BAQ


All In Transaction All

Use the below statement to configure parameters of this action:

10.2.700 619
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Show informational message based on the designed template

designed
Click this link to launch the Design Informational Message Template program. Use this program
to enter a message that contains information you want users to see. Based on the condition(s) you
define for the current directive, the information message displays.
Specify the Name of the message. The default name is MyMessage. You can keep it or change to
a different name.
You can select one of the following Severity modes when setting up an informational message:
Information, Warning, Error, or Update Conflict.
Within the message, you can include parameters, simple variables or values queried from related
tables and fields. The following options become available for selection when you click Insert or
right-click in the message to invoke the context menu:
• Call Context - Choose to set up substitution of the value in a selected BPM Call Context field.
To use this action, the directive must also include an action that sets the corresponding BPM call
context variable. For example you may have an Execute Custom Code action that includes logic
that sets a callContextBpmData or callContextClient variable, which you can then select as a Call
Context substitution.
• Field Query - Choose to open the Select Table Field(s) dialog box and set up substitution of
the value from a selected field in the directive table. Selection is limited to one field.

The default name of the query is


MyFieldQuery. You can enter a different name
for your query.

• Table Query - Choose to open the Select Table Field(s) dialog box and set up substitution of
values from multiple fields in the directive table. In the message, the default behavior of a table
query is to insert a comma-delimited list of the selected table field names followed by a
comma-delimited list of the corresponding table values.

The default name of the query is


MyTableQuery. You can enter a different
name for your query.

• Scalar Variables - Choose to set up substitution of values using directive-level variables of simple
type. The first five variables you define for the directive are available for selection directly from
the context menu. By clicking More ..., you are presented with the Select and Argument/Variable
window that lists all simple variables including their types.
For more information on how to utilize variables, see the Directive Level Variables section.

You can also select if the BPM message displays as an individual message or as a grid item.

with Click this link to launch the Execution Rule program. If the data transaction supports multiple dirty
rule rows (rows that contain unsaved data), you can use this program to select how the action performs.
Read the Support for Multiple Dirty Rows section in this chapter for details about each option in this
program. This variable is not visible if the method data transaction does not support multiple dirty
row updates.

620 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Setters

Use the items found within the Setters group to change values of selected fields.

Set BPM Data Field

Use this action to set the value of a field in a BPM data table.

This table is used with the custom data storage functionality available through CallContext tables. You can check
the field value in a condition of a further directive or pass this value on to the client application.
You can use this action with the following Directives Types:

Method Data Updatable BAQ


All All All

Use the below statement to configure parameters of this action:


Set the specified field of BPM Data to the specified expression

specified (call Click this link to launch the Select Table Field(s) program. Use this program to specify a call
context) context field that is part of the BPM action.
specified Click this link to launch the Specify C# expression program. Use this program to compose an
expression used as the call context variable value. The expression can contain literal values, data
from the current transaction, Method Parameters, Directive-Level Variables and functions that
can perform calculations and data type conversions.
BPM/BAQ code editors support intelligent code editing, which includes syntax highlighting
and code completion working for C# keywords, parameters, directive variables, member
lists, etc. Start typing and then press Ctrl + Space to bring up suggested options. For example,
to invoke a list of columns for a table, enter the name of the table followed by a dot (.) and
press Ctrl + Space. Select the column you need, it will be added to the table name:
ttABCCodeRow.Company.

Use the Check Syntax button to verify the syntax of your expression. Note the validation process
reacts on:
• Empty Expression Statement
• Syntax Error
• Security Issue (non-advanced BPM users)

10.2.700 621
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Set By Query

Run this action to use a query to change the value of a selected field.

This action is only available to users having Advanced BPM User rights.

In Epicor Cloud ERP - Multi Tenant, this program or feature


may not be available or may operate under certain restrictions.

You can use this action with the following Directives Types:

Method Data Updatable BAQ


All All All

Use the below statement to configure parameters of this action:


Set the specified field of all rows identified by the designed query to the specified expression with rule

specified Click this link to launch the Select Table Field(s) program. Use this program to specify a standard
(field) or custom field that is changed through this action.
On this dialog, the Table field displays tables within the query. These refer to subsets of the
corresponding data of a dataset table or Directive-level variable of tableset type that matches
conditions and relations defined in the query.

designed Click this link to launch the Compose Query program. Use this program to build a Business
Activity Query (BAQ) used with this action. In addition to standard tables, the query phrases can
be run against in-memory tables to analyze values passed in tablesets or linq row sets. Note the
BPM query data access is restricted by the current company the directive runs in.
specified Click this link to launch the Specify C# expression program. Use this program to compose an
(expression) expression that is evaluated against the comparison.
BPM/BAQ code editors support intelligent code editing, which includes syntax highlighting
and code completion working for C# keywords, parameters, directive variables, member lists,
etc. Start typing and then press Ctrl + Space to bring up suggested options. For example,
to invoke a list of columns for a table, enter the name of the table followed by a dot (.) and
press Ctrl + Space. Select the column you need, it will be added to the table name:
dsABCCodeRow.Company where ds is a method parameter or variable of tableset type.

Use the Check Syntax button to verify the syntax of your expression. Note the validation process
reacts on:
• Empty Expression Statement
• Syntax Error

622 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

• Security Issue (non-advanced BPM users)

This is a very advanced feature that is mainly


geared toward a developer.

The expression can contain literal values, data from the current transaction, method parameters,
directive-level variables, functions that can perform calculations and data type conversions.
with rule Click this link to launch the Execution Rule program. If the data transaction supports multiple
dirty rows (rows that contain unsaved data), you can use this program to select how the action
performs. Read the Support for Multiple Dirty Rows section in this chapter for details about
each option in this program. This variable is not visible if the method data transaction does not
support multiple dirty row updates.

Set Field

Use this action to change a selected field to a different value, using a row set action that you define.

You can use this action with the following Directives Types:

Method Data Updatable BAQ


All All All

Use the below statement to configure parameters of this action:


Set the specified field of the changed row to the specified expression with rule

specified (field) Click this link to launch the Select Table Field(s) program. Use this program to specify a
standard or custom field that is changed through this action. Use this program to select a
field from any dataset table included in the current method's parameters.
the changed
Click this link to specify which row set is affected when the rule activates. You can toggle
row
between six values: the added row, the deleted row, the changed row, the unchanged
row, the updated row and all rows.

specified Click this link to launch the Specify C# expression program. Use this program to compose
(expression) an expression used as method argument value. The expression can contain literal values, data
from the current transaction, method parameters, directive-level variables, functions that can
perform calculations and data type conversions.
BPM/BAQ code editors support intelligent code editing, which includes syntax highlighting
and code completion working for C# keywords, parameters, directive variables, member
lists, etc. Start typing and then press Ctrl + Space to bring up suggested options. For
example, to invoke a list of columns for a table, enter the name of the table followed by
a dot (.) and press Ctrl + Space. Select the column you need, it will be added to the table
name: dsABCCodeRow.Company.

10.2.700 623
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Use the Check Syntax button to verify the syntax of your expression. Note the validation
process reacts on:
• Empty Expression Statement
• Syntax Error
• Security Issue (non-advanced BPM users)

with rule Click this link to launch the Execution Rule program. If the data transaction supports multiple
dirty rows (rows that contain unsaved data), you can use this program to select how the
action performs. Read the Support for Multiple Dirty Rows section in this chapter for details
about each option in this program. This variable is not visible if the method data transaction
does not support multiple dirty row updates.

Set Argument/Variable

Use this action to set the method argument/variable value to the expression you define.

Usage of this action requires presence of either:


• Simple parameters within the selected method.
• Directive-level variables of simple type such as String, Decimal, Boolean, DateTime, Long and so on.
You can use this action with the following Directives Types:

Method Data Updatable BAQ


All All None

Use the below statement to configure parameters of this action:


Set the specified argument to the specified expression

specified Click this link to launch the Select an Argument program. Use this program to select a method
argument that passes data into the database. The Name column displays the name of the argument.
The Type field displays the .NET classification for each argument.
specified Click this link to launch the Specify C# expression program. Use this program to compose an
expression used as method argument value. The expression can contain literal values, data from
the current transaction, method parameters, directive-level variables, functions that can perform
calculations and data type conversions.
BPM/BAQ code editors support intelligent code editing, which includes syntax highlighting and
code completion working for C# keywords, parameters, directive variables, member lists, etc.
Start typing and then press Ctrl + Space to bring up suggested options. For example, to invoke
a list of columns for a table, enter the name of the table followed by a dot (.) and press Ctrl +
Space. Select the column you need, it will be added to the table name:
ttABCCodeRow.Company.

624 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Use the Check Syntax button to verify the syntax of your expression. Note the validation process
reacts on:
• Empty Expression Statement
• Syntax Error
• Security Issue (non-advanced BPM users)

Fill Table By Query

Use this action to add data into a target in-memory table. In-memory table can be either a dataset table passed
as a parameter to the service method, or it can be a directive-level variable of tableset type.

Configure this action through a three-step process:


• First, design a BPM query. When you construct the query, you can reference both in-memory tables, such as
ds.Customer and standard database tables such as Erp.Customer. To complete the query, you must explicitly
set which columns you want to display in the result set. You can then use these columns to fill target table
columns with data.
• Select a single in-memory table serving as the target.

If you need to update more than one table within a


Tableset, for example, OrderHed and OrderDtl, you must
use two Fill Table By Query actions within the workflow.

• Configure in-memory table mappings. You can use the following input for table fields:
• Source data retrieved from the BPM Query
• Custom expressions
• Directive-level variables - these variables can be created anytime within the BPM workflow design process
using the Variables tab, or, you can create them on the fly while you configure table column mappings.

The number of records added to the selected table is equal to


the number of records returned from the BPM Query.

You can use this action with the following Directives Types:

Method Data Updatable BAQ


All All None

Use the below statement to configure parameters of this action:


Use the designed query to insert data into the specified table with not configured mapping

10.2.700 625
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

designed
Click this link to launch the Compose Query program. Use this program to build a BPM Query
used with this action. In addition to standard database tables, the query phrases can be run against
in-memory dataset tables to return data you need. Note the BPM query data access is restricted by
the current company the directive runs in.
Use the Display Fields tab to define which columns display in the BPM Query result set and fill the
selected target table.

specified
Click this link to launch the Select Table window. Use this window to specify a table you want to
fill with data through this action. Number of rows added to the table is equal to the number of
unique rows the BPM query returns.
On this dialog, use the Table field to select either target dataset tables included in the current
method parameter (these have the parameter name in their prefix - for example, ds.Part), or
directive-level variables of tableset type.

In-memory dataset tables are not available for


selection when the Fill Table by Query action is
used in an In-Transaction Data Directive.

not
Click this link to launch the Setup Table Mapping window to configure field assignments within
configured
a target table.
Use the Binding drop-down list to create fields mappings. The list of options includes the following:
• [ignore] - default state. Accept this value for all fields where no data assignments should be
performed by this action.
When the table is filled with data, fields with no mappings are assigned their default values. For
example, a field of the string type is assigned an empty string.
• Field: [TableName_ColumnName] - Displays the list of columns you selected on the Display Fields
tab within the BPM Query. Use this option to fill target table column rows using rows retrieved
by a BPM Query.
You can use the Bind Automatically option to create automatic column mappings. By selecting
this button, BPM Query display fields with the matching name and type are automatically mapped
to the corresponding target table columns. This function does not overwrite existing column
mappings created manually.

Example The BPM Query uses ds.Customer


and ERP.Customer tables. For the display
columns, you select Customer_CustID and
ds_Customer_CustID columns in this order.
When you use the automatic mapping option,
in the target ds.Customer table, the CustID
column is mapped to the first BPM Query
matching column, in this case, field:
Customer_CustID.

• Create new variable - use this option to create a new directive level variable that has the same
type as the field from which this option was launched.
• Existing directive level variables of the same type. Note only simple variable types such as string
display on this list.
• Specified expression - Use this option to launch the Specify C# expression window to compose
an expression assigned to this table column.

626 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Use the Check Syntax button to verify the syntax of your expression. Note the validation process
reacts on:
• Empty Expression Statement
• Syntax Error
• Security Issue (non-advanced BPM users)

To remove all column mappings, use the Clear Bindings option. This includes manual and automatic
column mappings created for a table.

Update Table By Query

Use this action to update data within an in-memory table. In-memory table can be either a dataset table passed
as a parameter to the service method, or it can be a directive-level variable of tableset type.

Configure this action through the following process:


• First, design a BPM query. When you construct the query, you can reference both in-memory tables, such as
ds.Customer and standard database tables such as Erp.Customer. To complete the query, you must explicitly
set which columns you want to display in the result set. You can then use the query rows to update the
information within a target table.
• Specify which row set within an in-memory table is affected, when this action activates. You can select added
rows, deleted rows, updated rows, added and updated rows, changed rows, unchanged rows and all rows.
• Select a single in-memory table serving as the target for the data update.

If you need to update more than one table within a


Tableset, for example, OrderHed and OrderDtl, you must
use two Update Table By Query actions within the
workflow.

• Specify the relation between the target table and the BPM Query. This relation defines how rows returned
by the query are associated with existing table rows.
• Specify how data is assigned to the target table columns.

When this action executes, the data is first retrieved from a


BPM Query. This data is then matched with selected set of
rows from a target in-memory table, for example, with added
rows. This matching is based on rows returned by the query
and the relation specified between the query and the target
table defined on the Setup Table Mapping window.
If the BPM Query returns more than one row matching a target
table row, only the first row found in the query is used to
perform data assignments. The remaining query rows are

10.2.700 627
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

ignored. The other way around, if for a target table row, no


matching rows are returned by the query, the row is excluded
from update.

You can use this action with the following Directives Types:

Method Data Updatable BAQ


All All None

Use the below statement to configure parameters of this action:


Use the designed query to update all rows of specified table with not configured mapping

designed
Click this link to launch the Compose Query program. Use this program to build a BPM Query
used with this action. In addition to standard database tables, the query phrases can be run against
in-memory dataset tables to return data you need. Note the BPM query data access is restricted by
the current company the directive runs in.
Use the Display Fields tab to define which columns display in the BPM Query result set. You can
then use the data retrieved from the query to update the rows within the target in-memory table.

all rows
Select the state of in-memory table record rows you want to update through this action. The state
of each record row is defined in the RowMod column. Select one of the following row sets:
• all rows - default state
• added rows
• deleted rows
• updated rows
• added and updated rows
• changed rows
• unchanged rows

specified
Click this link to launch the Select Table window. Use this window to specify a single in-memory
table you want to update using this action.
On this dialog, use the Table field to select either target dataset tables included in the current
method parameter (these have the parameter name in their prefix - for example, ds.Part), or
directive-level variables of tableset type.

If you need to update more than one table within


a Tableset, for example, OrderHed and OrderDtl,
you must use two Update Table By Query actions
within the workflow.

not
Click this link to launch the Setup Table Mapping window to configure field assignments within
configured
a target table.
Use the Binding drop-down list to create fields mappings. The list of options includes the following:
• [ignore] - default state. Accept this value for all fields where no data updates should be performed
by this action. This option preserves the original value of fields.

628 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

• Field: [TableName_ColumnName] - Use this option to update target table column rows using
rows retrieved by a BPM Query. Note only query columns selected for display and those with a
matching data type as a target column display on the list.
You can use the Bind Automatically option to create automatic column mappings. By selecting
this button, BPM Query display fields with the matching name and type are automatically mapped
to the corresponding target table columns. This function does not overwrite existing column
mappings created manually.

Example The BPM Query uses ds.Customer


and ERP.Customer tables. For the display
columns, you select Customer_CustID and
ds_Customer_CustID columns in this order.
When you use the automatic mapping option,
in the target ds.Customer table, the CustID
column is mapped to the first BPM Query
matching column, in this case, field:
Customer_CustID.

• Create new variable - use this option to create a new directive level variable that has the same
type as the field from which this option was launched.
• Existing directive level variables of the same type. Note only simple variable types such as string
display on this list.
• Specified expression - Use this option to launch the Specify C# expression window to compose
an expression assigned to this table column.
Use the Check Syntax button to verify the syntax of your expression. Note the validation process
reacts on:
• Empty Expression Statement
• Syntax Error
• Security Issue (non-advanced BPM users)

To remove all column mappings, use the Clear Bindings option. This includes manual and automatic
column mappings created for a table.

Processing Asynchronous Actions

BPM system tasks running behind the scenes automatically process BPM actions configured to be executed
asynchronously.
Users cannot modify this automated process, it automatically runs every 20 seconds and performs the following:
• processes asynchronous Execute Custom Code actions
• processes asynchronous calls to Functions
• invokes External Method actions in the queue
• fires E-Mails sent asynchronously (the same applies to all Send-email task consumers across the ICE general
framework)
• deletes outdated BPM Data Form states

All asynchronous calls in BPM, except Function calls, use the


default session of a Task Agent. During an asynchronous
Function call, the system creates a temporary session where

10.2.700 629
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

the Company, User, and Plant (Site) ID values of the original


session the Function was invoked from are used instead of the
ones from the default Task Agent session. Please refer to the
Invoke Function topic of this guide (BPM Workflow
Designer > Callers > Invoke Function) for details.

When you configure Call ESC workflow action to execute asynchronously, the call is executed immediately, but
the action does not wait until the ESC workflow is finished and the results are processed. Asynchronous Call ESC
workflow actions do not require BPM system tasks to process them.

Before you modify a directive containing asynchronous calls


to Execute Custom Code, Invoke External Method, or
Invoke Function use the System Monitor to verify there are
no pending asynchronous execution requests raised by the
directive.
The below list displays possible use cases when execution of
pending asynchronous tasks will fail:
• A BPM directive is modified, for example by removing the
asynchronous Execute Custom Code or Invoke External
Method and saved.
• A BPM directive is disabled and saved.
• A BPM call execution is switched from asynchronous to
synchronous.
• A BPM call requires additional data that was not available
at the time the asynchronous call was raised. For example,
a new variable is added to the directive and used by the
Execute Custom Code action.

To log asynchronously executed BPM actions, add the following trace URI in the server's trace.config file:
<add uri="trace://ice/fw/extensibility" />
For more information on BPM Logging, review the BPM Server Logging topic found in the Business Process
Management Utilities chapter.

Support for Multiple Dirty Rows


A dirty row is a row of data modified but not yet saved to the database. For example, when the user modifies a
row, like a currency exchange rate, then moves to another row (another exchange rate), modifies it, and then
saves the two rows together, these two rows are called multiple “dirty” rows.
Some methods only allow changed rows to process one at a time, and so do not support multiple dirty rows.
However, some methods can send multiple dirty rows together as a set to the server for update.
When multiple rows are sent to the server at the same time, you can specify a directive to take action on the
batch of rows in a specific way. These actions are available for method directives, if the method is marked as
supporting Multiple Dirty Rows, and standard data directives:
• Once passing all matching rows - The action executes once as it moves through the data within the set of
dirty rows, but it only gets the rows that match the selection criteria.
• Once passing all existing rows - The action executes one time as it moves through the data within the set
of dirty rows, and it checks all rows within the dirty row set.
• For each matching - The action executes as many times as the number of rows that match the selection
criteria in the dirty row set. Each row processes individually.

630 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

• For each existing - The action executes as many times as the number of rows within the dirty row set (the
overall number of dirty rows). Each row processes individually.

Dependent Directives

You can establish relationships between directives created for the same service method. These relationships are
dependent; if one directive executes successfully, the application runs the other directive. This first directive is
called the Primary Directive, and it becomes the condition for the second, or Dependent, directive. Dependent
directive processing applies only to method directives, and not to data directives.
Using dependent directives helps prevent errors. Leverage this function when you do not want to update a record
or send a confirmation email until you are sure the transaction completed successfully. If an action is run before
the transaction, there may be an error in the data – but the action runs anyway. For example, a confirmation
email may be sent indicating the transaction was successful, whereas actually it was not. If the condition for the
email, however, is on a dependent directive, you know for certain the transaction was successful before the email
was sent.
You first create the primary directive and then the dependent directive. Both directives are created for the same
method.

Primary Directive
The primary directive must be either a pre-processing or a base processing directive. Typically, first you define
the condition for the directive and then use the Enable Post Directive item within the workflow.
This indicates the result of the primary directive – success or failure – is passed to another directive belonging to
the same method.

Dependent Directive
This directive must be a post-processing directive. To create the dependent directive, place the Condition block
onto the workflow surface and select the "This directive has been enabled from the specified directive"
statement. Click the “specified” link to select the pre-processing or base processing directive.
This condition statement indicates the application runs the dependent post-processing directive based on the
condition(s) specified in the primary directive.

Epicor Functions
Epicor Functions allow for creating your own processes and calculations as a function.
They also offer a solution to a number of challenges in Epicor ERP customization:
• Client
Client customization allows you to change the user interface (UI), define some interactions in the UI through
rules on the data elements exposed in the UI and call services to query or update data on the server. But client
customizations do not have access to database transactions, cannot be reused across different clients and in
integrations (Service Connect, Jitterbit, etc.)
• BPM Directives
The BPM on the server allows you to intercept existing logic and change behaviors. But there is limited abilities
to change the shape of the data of the existing services. The custom logic you wish to leverage across many
BPM Directives must be copied to each service method, which makes maintenance a challenge. External

10.2.700 631
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

assemblies can be a solution for on premises installations but in the Cloud, supporting external assemblies
can be problematic.

Functions can call into the application server logic or database tables just as you can with BPMs. You can then
validate, manipulate, or execute actions based on the data passed through the Function with parameters as you
define. Because they are server side customization, you can reuse the Function across any client as well as from
BPM directives. It is also exposed via REST to external callers.
Functions give you the ability to define exactly the service, method and parameters you wish to expose dynamically.
It also allows you to define exactly which parts of Epicor ERP you wish to interact with - ERP Services, Assemblies,
or Database Tables. Due to this declarative approach, upgrades can be handled more easily.
Functions are created within a library. Library is Functions' single unit of deployment.

Functions Roles

There are three predefined roles related to Functions in Epicor ERP.


These roles - Functions Administrator, Functions Developer, and Functions Power Developer - are
implemented in the application as Security Groups. System administrators can assign users to these groups in
User Account Security Maintenance > Groups.
These Security Groups possess various levels of access to the Epicor Functions maintenance.

Functions Administrator

By default, Security Managers and Global Security Managers


are treated as Functions Administrators even if they are not
explicitly added to the Functions Administrator security group.

Functions Administrators maintain existing libraries and can edit some of its properties. They cannot add new
libraries.

Functions Developer
Functions Developers can create new libraries and edit the existing ones. They can create Widget Functions and
design their workflow with the help of the Function Designer.

If a Functions Developer becomes an owner of a library that


was previously created by a Functions Power Developer and
that has advanced options (like allowed Custom Code
Widgets and DB Access from Code) selected, such Functions
Developer will not be able to add new or edit existing Widget
Functions with Code (if any), but will be able to delete any
functions from the library including Widget Functions with
Code.

Functions Power Developer

Functions Power Developer rights include the rights of Functions


Developer.

In addition to the rights of Functions Developers, Functions Power Developers also have rights to enable Custom
Code Widgets in the Function Designer and allow access to database tables from the custom code added within
the Execute Custom Code actions.

632 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Assigning Users to Functions Security Groups


Follow the steps below to assign a user account to a Functions Security Group.

1. In User Account Security Maintenance, open a user record.

2. Navigate to the Group sheet.

3. From the Available column, select a group you wish to assign to the user.

4. Use the Right Arrow buttons to authorize the selected group for this user account.

5. Click Save.

Summary of Security Rights by Role

Use the table below to see what operations can be performed by users from the Functions Security Groups
depending on the ownership of the library and the security group it is shared with.

A library displays in Read-Only (RO) mode if:


• the current user is not the owner of the library, or is not a
member of the Security Group the library is shared with.
• the current Company is not the one the library has been
created in.
• the library is published.

10.2.700 633
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Table 1: Library

Action Administrator Developer Power Developer


Add No Yes Yes
Import Yes Yes for non-RO libraries Yes for non-RO
with Widget Functions
only
Export Yes Yes for non-RO Yes for non-RO
Delete Yes, incl. RO Yes for non-RO Yes for non-RO
Map to a Company Yes, incl. RO No No
Enable/Disable Yes, incl. RO Yes for non-RO Yes for non-RO
Change owner or shared with Yes for unpublished Yes for non-RO in the Yes for non-RO in the
groups libraries in any Owning Company Owning Company
Company, incl. RO
Enable Custom Code Widgets No No Yes for non-RO
Enable Custom Code Functions No No Yes for non-RO
Allow access to database from code No No Yes for non-RO

Table 2: Function

Action Administrator Developer Power Developer


Edit Function workflow/Run Designer No Yes for non-RO. Yes for non-RO
Note Functions that
contain custom code
widgets or have access
to database display in a
Read-Only mode.

Add No Yes, but Widget Yes for non-RO


Functions only
Copy No Yes for non-RO, Widget Yes for non-RO
Functions only
Delete No Yes for non-RO Yes for non-RO
Enable/Disable Yes, incl. RO Yes for non-RO Yes for non-RO
Edit functions' options (Notes, No Yes for non-RO Yes for non-RO
Signature, etc.)

Types of Functions

Three types of Functions are available.

Widget Functions
By default, Functions Developers and Power Functions Developers can add Widget Functions to a library. You
construct the workflow of these Functions in Function Designer using available widgets that you configure to
the needs of your process.

634 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Widget Functions with Code


These are available only to Functions Power Developers in libraries with enabled Custom Code Widgets. In
Function Designer, Custom Code widgets include the Execute Custom Code action and the Custom Code
Condition (The custom code... condition is valid).
In addition to that, Widget Functions with Code can be allowed access to the database tables specified in the
library Table References from expressions and custom code of your Function. This access is enabled if the library's
DB Access from Code property is set to either Read Only or Read Write.
The DB Access from Code setting provides three options on the library level (meaning that it will affect all
Functions with custom code in that library):
• None - Select this option if you do not wish that the expressions and custom code actions from the function
workflow had access to the Epicor database.
• Read Only - Select this option if you want to enable a read-only access from expressions and custom code
workflow actions of your Function to the database tables specified in the library Table References.
• Read Write - Select this option if you want to be able to update the database tables that are specified in the
library Table References from expressions and custom code workflow actions of your Function.

On the References > Tables sheet, you must additionally


mark each table you wish to be able to update as
Updatable. Please refer to the References > Tables topic
for details.

Regardless of the option selected in the DB Access from Code


field, any query-based actions and conditions in the Function
workflow have access to the database tables specified in the
library Table References.

Custom Code Functions


Only Functions Power Developers can add such Functions to the library if the Custom Code Functions option is
enabled.
Custom Code Functions are created and edited in the Function Editor using C# programming language. Please
refer to the Function Editor topic for detailed information on the available functionality.

Creating Function

This section contains topics that describe the process of creating a new Function.
Functions' single unit of deployment is a library. You first create a library and then a Function within it. You can
add Functions to existing libraries if their settings match the Function's requirements - for example, availability
of Custom Code Widgets or visibility to external callers.

Add a Library

1. Open the Epicor Functions Maintenance program.


By default, the Summary sheet displays.

10.2.700 635
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

2. In the Library field, type in the ID of your new library - in this example, MyLib. Then press Tab.
To the message offering to add a new record, click Yes.
You can also activate a new library entry form by clicking:
• File > New > Add Library from the Main Menu, or
• New > Add Library from the Main Toolbar.
Please have in mind the library naming conventions described in the Business Process Management >
Epicor Functions > Summary > Fields topic in the Application Help.

3. Enter a short Description of your new library - for example, My first library of Epicor Functions.

4. Select the options you need.

Please remember that these settings will apply to all


Functions in this library.

a. For this example, select the Custom Code Widgets option so that your library can contain Functions
with custom code.

b. Select the Custom Code Functions option if you plan to add custom code Functions. You don't need
this option in this example.

c. In the DB Access from Code field, keep the default option.


Three available options are:
• None - Keep this default option if you do not wish that the code from your functions had access to
the Epicor database.
• Read Only - Select this option if you want to enable a read-only database access from the custom
code or expressions used in your Functions.
• Read Write - Select this option if you want to enable updates of database tables from the custom
code or expressions used in your Functions.

On the References > Tables sheet, you must


additionally mark each table you wish to be able

636 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

to update as Updatable. Please refer to the Add


References topic for details.

Only members of the Functions Power Developer


security group can edit this field.

d. For this example, do not select the For Internal Use Only option otherwise the library will be unavailable
to external calls via REST.

e. For this example, do not select the Disabled option. When a library is disabled, all of its Functions are
also disabled. Disabled libraries can be browsed by external callers, but their Functions cannot be called.

When this option is selected, the Inactive shape


displays in the top right corner of the form.

5. Click Save.

Add References

Define server and database context for the library's Functions.


The references to assemblies, database tables, services, and other libraries specified on this sheet will be available
for use within any Function in this library.

1. Navigate to the References sheet.


By default, the Assemblies sheet displays.

2. Click Add to specify server assemblies that can be used by the library's Functions.
The Select Assembly window displays.

10.2.700 637
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

3. Select an assembly - for example, Erp.Contracts.BO.ABCCode.dll, and click OK.

4. To add tables, navigate to the References > Tables sheet and click Add again.

Only the database tables added to the library as references


can be used in:
• Query-based actions - for example, Fill Table by
Query or Set by Query.
• Query-based conditions - for example, number of
rows in the designed query is more than or equal
to 1
• Custom code and expressions if the library's DB Access
from Code setting is set to Read Only or Read
Write.

The DB Table Search window displays.

5. In the Starting At field, type in ABC and click Search.

6. For this example, select the ABCCode table and click OK.

7. If you need to enable database updates in a library that allows Read Write database access from expressions
and custom code widgets, you must do it on a table-by-table basis. Select the Updatable option for each
table you wish to be able to update from your Functions.

638 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

8. To add services, navigate to the References > Services sheet and click Add.
The Service Search window displays.

Note that you can select services of four types - Business Objects, Simple Services, Processes, and
Reports - that belong to either ERP or ICE System Code. In this example, you add reference to the ABCCode
service of Business Object type.

9. Enter ABC into the Name Starts With filter field and click Search.

10. Select ABCCode service and click OK.

11. To add libraries, navigate to the References > Libraries sheet and click Add.
The Library Search window displays.

10.2.700 639
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

12. Specify search parameters and click Search.

This search results do not include the current library. The


system also does not allow adding libraries that can
contain a direct or nested circular reference to the current
library. For example, Lib 2 references Lib 1, and Lib 3
references Lib 2. Adding Lib 3 as a reference to Lib 1
would cause an error:

640 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

13. Select a library and click OK.


The selected library is added to the list of library references.

Set Up Security
Use the Security sheet to map your library to a specific Company or a group of Companies, change the library's
owner or the security group it is shared with.

1. For this example, keep the values of the Change Owner and Shared With Group fields intact.

2. From the Available Companies list, select Companies that you wish to authorize for your library and click
the Right Arrow button.

To be able to call a published library via REST or from a


BPM directive, you must explicitly map it to a Company.
Calling an unpublished library from the current Company
via REST does not require mapping this library to a
Company. However, the mapping is required if the
unpublished library is called via REST from a different
Company. Please refer to the Epicor Functions topic of
the REST Services v.2 Guide in the Application Help for
details on Epicor Functions availability via REST.

3. Click Save.

10.2.700 641
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Add a Widget Function

Use the topics below to add, configure, and design a Function.


From the Tool bar, go to New > Add Widget Function or New > Add Widget Function with Code.

Remember that the second option is available only if the library


has the Custom Code Widgets option enabled.

Set Up Main Properties

1. Enter a Function ID - for example, MyFunc.

A function ID must be at least one character long and can contain only letter characters, digits, or dashes.
It must begin with a letter and cannot end with a dash. It must not match, but can contain keywords used
in C# programming - for example, new, class, private, public, etc.).

Private cannot be a Function ID, while SuperPrivate


can.

If you enter any restricted character, an error message displays.

You cannot change the ID once the function is saved.

642 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

2. Enter a short Description of your Function - for example, This is my demo Function.

3. If necessary, select options for your Function:

a. Select the Disabled option to disable the function. If disabled, the function will be unavailable to internal
(from a BPM Directive) and external (REST) calls.

b. Select the Requires Transaction option if you want your Function to create a transaction. In this example,
do not select this option as you will design a simple Function that does not involve any database
transactions.
You can use this option in Functions that involve updating the database to ensure the whole workflow
rolls back if an error occurs. This will prevent data corruption.
You can also use this option when your Function orchestrates several service calls where one or more
of these calls depend on the successful completion or failure of the other(s).

c. For this example, do not select the For Internal Use Only option. This option allows making selected
Functions within a library unavailable to external REST calls. You don't need to select this option for
Functions if it is selected on the library level. If a library is marked as For Internal Use Only, all its
Functions become internal too.

Define Parameters

1. On the Function > Signature sheet, click Edit to add new parameters.

2. Select a line in the Request Parameters section.


For this example, add two input parameters:

Name Data Type


Left System.Int32

10.2.700 643
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Name Data Type


Right System.Int32

3. Type in the parameter's Name.

Names of request and response parameters must be


unique within the group and must be compliant with C#
programming syntax. They can contains letters and digits
and must start with a letter. The Function parameter name
is not valid warning displays if the name fails validation.

4. Select the parameter's Data Type.

You can select one of the predefined types or select a


Tableset from the available assemblies. To select a
Tableset:

1. Click Select Type at the end of the Data Type


drop-down list.
The Select variable type dialog window displays.

2. In the Available assemblies list, expand the node


of the assembly that contains the tableset.

3. Select the Tableset you need and click OK.

5. Select a line in the Response Parameters section and add one output parameter:

644 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Name Data Type


Result System.Int32

6. When you are done with adding Function parameters, click Complete.
Now, the parameter details display in read-only mode.

Design Function

Click Design to launch the Function Designer program. Use the available widgets to construct the workflow
of your function.
Please refer to the Function Designer topics for details on its general principles and available widgets.

In this example, create a simple calculator Function that will add values of two input parameters and return their
sum.

1. From the Setters panel, select the Set Argument/Variable widget and drag it to the Designer canvas.

2. Connect it to the Start widget.

3. Select the Set Argument/Variable widget on the canvas.


The details of the widget action display: Set the specified argument/variable to the specified expression.

4. Click the first specified link.


The Select an Argument/Variable window displays the list of available Function parameters.

10.2.700 645
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

5. Select Result and click OK.

6. Click the second specified link.


The Specify C# expression window displays.

7. In the Editor, enter the following expression:


Left + Right

8. In the Specify C# expression window, click OK.


Your action statement should look like this: Set the Result argument/variable to the Left + Right...
expression.

646 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

9. Validate your workflow.

10. Save it and exit the Function Designer.


The Function > Overview sheet displays a preview of the workflow.

10.2.700 647
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

11. Optionally, add Notes to your Function. Click Edit to activate the Notes editor.
At any point, you can add as many notes as you need.

12. From the Main Menu or from the Main Toolbar, click Save.

Function Designer

Use the widgets available in the Function Designer to build the workflow of your function.
You can access the Function Designer from the Epicor Functions Maintenance program. To open the designer,
navigate to the Function sheet and click Design.
General Principles

This section discusses general principles of the Function Designer.


Function creates a custom method for orchestrating the work of ERP business object(s). Designing a Function
workflow is similar to designing a BPM Directive workflow. Therefore, the Function Designer inherited its general
principles from the BPM Workflow Designer that is used for developing Data and Method Directive workflows.
The topics below highlight the workflow design principles specific to the Function Designer.
Construct Function Workflow

This topic discusses general principles of creating a Function workflow by using the workflow elements.

1. The available items display in the left pane of the Designer. Workflow elements are grouped by categories
and except the Flow Chart category, they all represent Actions the workflow will take.

2. For each workflow element representing Actions, you can select the Terminate on Error option to halt
the workflow execution when it encounters an error.

For the Raise Exception action, it is mandatory to have


this option selected. The system does this by default.

648 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

3. The Condition block found in the Flow Chart category represents a set of conditions the Function workflow
may evaluate prior to executing the following workflow element.

4. To use a Function element in the workflow, drag it and drop it in the Function Designer surface.

5. Connect the workflow elements in the logical order they should be executed. When you hover your cursor
over each element, the small black triangles surrounding the element represent the available connectors.
To connect elements, click your mouse, select any of the connector symbols, drag the line and point it to
another element's connector.

6. The initial point of the Function workflow is the Start element.

7. The following workflow elements may utilize multiple inbound connectors but only one outbound connector.
The exception is the Condition block that allows usage of two outbound connectors True and False.
To delete a workflow element, select it and press the Delete button on your keyboard. When a workflow
element is deleted, its links are automatically removed too.

8. You can use editing buttons in the top toolbar for smother and more efficient workflow design process.
• Copy/Paste - use these buttons to copy and paste workflow elements within the currently open directive
or to another directive. Note you can perform the same actions using the Ctrl+C and Ctrl+V keyboard
shortcuts.

You can paste copied elements within Function


Workflow Designer only (in the same or different
directive). You will not be able to paste them to any
other Epicor ERP/ICE program or external application.

• Undo/Redo - use these buttons to revert or restore your previous design actions with workflow elements
and connectors.

The Undo/Redo function stores up to 20 previous


user actions.

9. To set up the behavior of a workflow element representing Action, click on it and supply required parameters
in the pane below the designer surface.
For the Condition block, build criteria using pre-built condition statements. You can enter more than one
condition statement within a single block and use the And/Or logical Operators to define the relationship
between the current statement and the preceding statement.

10. At any stage of a workflow preparation, you can use the Variables tab to create custom, Function-specific
variables and make them available for actions and conditions within the Function. You can then bind these
variables to external method parameters, reference them across available conditions and actions, pass and
receive data from BO call actions or to hold intermediate results during Function execution.
For more information, read the Function-Level Variables topic.

11. The Method Parameters tab displays the signature for the current Function method. You can review this
information at any time during your workflow design process without exiting the Function Designer.

12. The Use extensions button turns on/off Extension tables. The Use extensions button provides access to
Extension tables for all elements in Function Designer except Function query. Extension table exposure in

10.2.700 649
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Function query currently is not supported. Extension tables can be used as target tables, as well as expression
elements of Function actions and conditions.

If actions or conditions in the Function are recognized to


reference an Extension table (not within expressions),
disabling Extension tables exposure is disallowed.

13. Once you finish, click Save to save your workflow design. The Save button will become inactive and the
designer window will remain open.

If you exit the Designer without saving changes, you will


be prompted to save them. In the Save Confirmation
dialog choose an appropriate action.

14. To return to the Function Summary from which you called the Designer, use the Close button in the top
right corner of the window.

Execution Rule

This topic lists the rules that can be applied to the execution of a Function.
Functions can handle one or more table rows in a single call. When multiple rows are sent to the server at the
same time, you can specify a Function to take action on the batch of rows in a specific way.
For the Send E-Mail and Set by Query widgets, you need to specify an execution rule. The available options
are:
• Once for All Passed Rows - The action will be executed for all passed table rows.
• Per each Row in Table - The action will be executed for each row of a specific table selected from the list
of tables available for this Function.
Certain Function widgets have default execution rules. The following table lists these Actions and their default
execution rules:

Function Widget Execution Rule


Raise Exception Once for All Passed Rows
Send Message Once for All Passed Rows
Set Field Per each Row in Table
Attach/Remove Data Tag Once for All Passed Rows
Execute Custom Code Once for All Passed Rows

Function-Level Variables

You can create custom, Function-specific variables and make them available for actions and conditions within
the Function.
You can use these variables to bind them to external method parameters, reference them across available
conditions and actions, pass and receive data from BO call actions or to hold intermediate results during Function
execution.

Usage of Function-level variables is limited to the Function


where they were defined. Intermediate data they hold cannot
be passed between multiple Functions.

650 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

The basic flow of utilizing Function-level variables within the Function workflow includes the following:

1. Define Function-level variables. You can create simple variables such as a string or decimal, or complex
variables of TableSet type.

The list of available TableSets is limited to the Assembly


and Service references of the library.

2. Assign data to variables using the available actions or through a custom code.

3. Use the Invoke BO Method action and map variables to parameters as needed.

4. If needed, process returned values. Returned values may end up in variables that were mapped to return.

Callers

Use the caller widgets to invoke a Business Object method or perform a custom code action
Invoke BO Method

Use this action to call a service method from within a Function.


Function is a part of the customization which runs as a part of the call to the service method initiated by the
Epicor Client, another service or an external software. Within the Function, the service method exposes its
parameters and if present, also the return value. Method parameters can be either simple parameters such as a
string or a decimal, or complex parameters of tableset type. In Functions, complex parameter tables are exposed
in the following format: <functionParameterName>.<tableName> - for example, ds.CustomerDocs.
To configure this action:
• Specify the service method you want to call.
• Configure parameters exposed by the selected method. You define what data you want to pass to the method
as well as what to do with the data the call returns. You can use the following input for the parameters:
• Function-level variables of the same type as the selected method parameter - simple or TableSet type.
• Specified expression - use this option compose an C# expression assigned to the selected parameter.
• [ignore] - The method accepts this option for non-mandatory parameters that have the OUT direction.

You can use this action with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

Parameters

Parameters of the current workflow items are listed in this topic.


Invoke specified BO method with specified parameters
Specified (BO method)
Click this link to launch the Method Search window. Use this dialog window to locate a specific method within
a service you want to invoke.
The list of services contains only the services that you added to Library References > Services.
Select the service you wish to invoke and click Search.
From the Search Results grid, select the method you want to call.
Specified (parameters)

10.2.700 651
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Click this link to launch the Setup Method Parameters window.


The following information display on this window:

Field Description
Business Displays the name of the selected service.
Object
Method Name Displays the name of the selected service method.
Name Displays the name of the service method parameter (argument).
Type Displays the .NET classification for each parameter. Method parameters can be either simple
parameters such as a string or a decimal, or complex parameters of TableSet type.
Direction
Indicates how the data flows through the argument.
• in - Indicates the arguments that pass data into the database.
• out - Indicates the arguments that push the data back to the client for display. The Business
Object method does not require any data from the parameters of this direction. You can
either assign these method parameters to variables of the same type, or, you can select the
[ignore] binding if you do not need to assign any value.
• in-out - Indicates the arguments that pass data back and forth between the database and
the client.
• retval - Defines the argument that determines the return value.

Binding Use the drop-down list to provide input for the method parameters. The following options are
available:
• Function-level variables of the same type - simple or TableSet type.

Typically, you assign values to simple


types of variables using the Set
Argument/Variable action. To prepare
row data for the variables of TableSet
type, you can use Fill Table By Query
and Update Table By Query actions.

• Function parameters of the same type - simple or TableSet type


• [ignore] - select if do not want to pass any data to the method parameter; this option is
only available for non-mandatory parameters that have the OUT direction.
• expr: specified expression - use this option to launch the Specify C# expression window
to compose an expression assigned to a method argument. This option is only available for
input arguments.
Use the Check Syntax button to verify the syntax of your expression. Note the validation
process reacts to:
• Empty Expression Statement
• Syntax Error
• Security Issue

• create new variable - use this option to create a new Fucntion-level variable that has the
same type as the field from which this option was launched.

Execute Custom Code

652 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Use this action to create a custom method of the Function. Leverage this feature to build a custom action that
runs when the condition(s) on a Function workflow activate; you create these actions using the C# programming
language.

This action is only available to users belonging to the Functions


Power Developer security group.

You can use this action with the following Function Types:

Widget Function Widget Function with Code


No Yes

Parameters

The parameters of the current workflow item are listed in this topic.
Synchronously execute custom code...
Code...
Click this link to launch the Enter Custom Code program.
The following controls are available within this item:
• Code - Use this sheet to enter a code snippet written in C# language you want the Function to execute
• Usings & References - This button launches the Directive Usings and References dialog. When you design
a custom code, you can use this window to specify additional C# Usings for the Function. Also, you can use
this window to add additional References to assemblies from the Server\Assemblies or
\Server\Customization\Externals folders of your Epicor ERP installation.
This dialog is accessible from either the Custom Code Editor and directly from the Function Designer at any
stage from a workflow preparation.

Following the same security restrictions applied to the


Execute Custom Code action, accessing the Directive Usings
& References window from the main BPM Designer window
is only allowed to users who belong to the Function Power
Developer security group.

Any changes made on the Using & References dialog are automatically applied to the Function.
Loading of assemblies from the application server may take a while. You can interrupt and resume the
process by using the Pause button. To quickly allocate the assembly you need, use the Assembly name
filter field.

• Check Syntax - as you create or complete code expressions, click this button to perform C# code syntax
validation. You can perform validations on code expressions at any time during the entry process. The validation
process reacts on:
• Empty code statement

• Syntax errors

Any error messages are reported in the grid under the Code editor, stamped with the corresponding error
type icon. Double-clicking the error brings up the details of the problematic code.

10.2.700 653
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Context Menu

Several context menu options are available to help you design custom code.
To activate the context menu, select the Code... variable in the Execute Custom Code widget statement and
right-click anywhere in the code designer area.
The list of options includes:
• Edit - This menu allows you to manipulate items within the current code. For example, you can cut, copy,
and paste text or undo the latest changes you have made.
• Parameters - Use this option to insert Function signature parameters. Function parameters can be either
simple parameters such as a string or a decimal, or complex parameters of tableset type. Complex parameter
tables are exposed in Functions in the following format: <functionParameterName>.<tableName> - for
example, input.ABCCode. When referencing tables, a list of table columns displays after you type a period
(.) after the table name.

Example input, inputCustomerRow.CustNum

• Call Context - Use this option to insert reference to callContextBpmData or callContextClient tables and
fields.
Type in a dot (.) after the table name and press Ctrl + Space to invoke the list of available columns of this
table. Select the column you need, it will be added to the table name.

Example callContextClient.CurrentCompany

• Variables - This menu becomes available if at least one function-level variable has been created for the current
Function. You can reference both simple variable types and complex variable types of a tableset type.
The Variables sub-menu is organized as follows:
• The first level sub-menu displays all variables you created within the Function; the list of variables is sorted
alphabetically. When you click on a variable of simple type, its name is inserted into the code.
• For a tableset type variable, click on its title to expand additional sub-level. On this list, a name of the
complex variable is listed first, followed by the list of tables it contains. When you double-click on a variable
name at the top, it again gets inserted into the code. Double-clicking on a table inserts the reference using
the "VariableName.TablesetTableName" format.

Example CustomerVariable, CustomerContainer.ShipTo

Invoke Function

Use this action to call one Function from another.


Use the Invoke Function widget to incorporate a Function into a Widget Function workflow.

Prior to configuring this action, make sure the library containing


the Function you are going to call is added to the current library
as a reference.

To configure this action:


• Specify the Function library and the Function you want to call.
• Map the parameters of the selected Function. You can use the following bindings:
• Function parameters or variables of the same type as the selected Function parameter - Simple or
Tableset type.

654 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

• Specified expression - Use this option to compose a C# expression and assign it to the selected parameter.
• [ignore] - Use this option if the caller Function does not need to accept the response (out) parameter of
the invoked Function.

Parameters
Call library / function using specified parameters
Library
Click this link to launch the Select Library window. This window displays the list of available libraries that are
defined on the References > Libraries sheet of the current library.
Select the library that contains the Function you want to call and click OK.
Function
Click this link to launch the Function Search window. You can use the Starting At field to narrow your search.
By default, the Search Results grid contains the list of all Functions of the previously selected library. Select the
Function you want to call and click OK.
Specified
Click this link to launch the Setup Function Parameters window that contains the parameters defined in the
selected Function.
The Parameters grid displays the following information:

Field Description
Name Displays the name of a Function parameter.
Type Displays the .NET data type of each parameter. Function parameters can be either simple
parameters such as a string or decimal, or complex parameters of Tableset type.
Direction
This field indicates how the data flows through the parameter.
• in - Indicates the parameters that pass data into the Function.
• out - Indicates the parameters that return data to the Function caller, in this case another
Function. You can either assign an out Function parameter to an existing or new Function-level
variable of the same type or select the [ignore] binding if you do not need the data returned
from the Function.

Binding Select the type of binding for a Function parameter from a drop-down list. The following options
are available:
• Existing Function parameter or variable of the same type - Simple or Tableset type.
• Create new variable - Use this option to create a new Function-level variable that has the
same type as the corresponding Function parameter.
• [ignore] - Select this option if you do not want to consume any data from a Function out
parameter.

This option is only available for parameters


that have the out direction.

• Expr: specified expression - Use this option to launch the Specify C# expression window
to compose an expression assigned to a Function parameter.

This option is only available for input


parameters.

10.2.700 655
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Field Description
Use the Check Syntax button to verify the syntax of your expression. The validation can fail
due to:
• An empty expression statement
• A syntax error
• A security issue.

Flow Chart

Use the Condition widget to make sure that your workflow executes appropriate actions only if a certain condition
is met.
Condition

The conditions define when the Function actions will execute.


To add a condition, drag the Condition widget to the designer area and click New on the Condition tab of the
widget Properties. There are several condition statements available. Please go to the Flow Chart > Condition
> List of Available Conditions topic for details. Each condition statement contains one or more links. Click
each link in the statement to open a program where you can configure details of the statement. After you
configure each link and return to the Conditions properties, the link text is replaced with the values you selected.
If you enter more than one condition statement, you can use a logical Operator, such as And or Or, to define
the relationship between the current statement and the preceding statement. You can also group statements by
adding parentheses in the Prefix and Postfix fields. The system evaluates the condition statements in the order
they appear and according to how they are grouped. To change the order of the statements, click the Up or
Down Arrow buttons in the toolbar. Condition statements that appear higher in the grid supersede those that
appear lower.
Within the workflow, the Condition element may have multiple inbound connections and two outbound
connections (exit points). The Function condition can be evaluate to either True or False. This gives you a flexibility
in designing the processing flow through directives.
List of Available Conditions

The list of conditions contains the following statements:


• Number of rows in the designed query is more than or equal to 1
Use this condition to create a query and evaluate the number of rows it returns. If this comparison evaluates
to True, the Function workflow continues the path using the True exit point.
You can use this condition with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

Variables Description
designed Click this link to launch the Compose Query program similar to Business Activity Query
Designer. The query you create evaluates the number of rows returned by the query
against the comparison value you select later in this statement. In addition to standard
tables, the query phrases can run against in-memory tables to analyze values passed in
datasets or linq row sets. Note the Function query data access is restricted by the current
company the directive runs in.

656 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Variables Description
is more than or Click this link to toggle between six values: is equal to, is not equal to, is less than,
equal to is less than or equal to, is more than or is more than or equal to. Select a
comparison option that is used against the number of rows returned by the selected
query.
1 Click this link to launch the Specify a Value program. Use this program to enter a
numeric value that evaluates against the number of rows returned by the query.

• The specified argument/variable is equal to the specified expression


Use this condition to evaluate a Function method argument.
You can use this condition with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

Variables Description
specified (argument) Click this link to launch the Select an Argument program. Use this program to select
which parameter you would like to evaluate against the other variables in the condition
statement.
is equal to Click this link to toggle between eight values: is equal to, is not equal to, is less
than, is less than or equal to, is more than, is more than or equal to, begins
with, ends with, contains or matches. Select a comparison option used to compare
the selected field against the value defined in the expression later in this statement.
specified Click this link to launch the Specify C# expression program. Use this program to
(expression) compose an expression that evaluates against the comparison. The expression can
contain literal values, data from the current transaction, and functions that can perform
calculations and data type conversions.
Use the Check Syntax button to verify the syntax of your expression. Note the
validation process reacts to:
• Empty Expression Statement
• Syntax Error
• Security Issue

• The specified argument/variable contains the specific text


Use this condition to evaluate if the specific argument includes the specific word expression. If this comparison
evaluates to True, the Function’s actions are run.

Do not enclose the text in double-quotes, except for the


quotes that are a part of the text.

You can use this condition with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

10.2.700 657
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Variables Description
specified (argument) Click this link to launch the Select an Argument program. Use this program
to select which parameter you would like to evaluate against the other variables
in the condition statement.
contains Click this link to toggle between six values: equals to, not equals to, begins
with, ends with, contains or matches. Select a comparison option that is
used against the argument variable.
specified (expression) Click this link to launch the Enter Word program. Use this program to enter a
word expression that evaluates against the argument.

• The specified field has been changed from any to another


Use this condition to monitor a specific field contained within the current transaction. If the field’s value
changes to another value that you define, the comparison evaluates to True and the Function workflow
continues the path using the True exit point.
You can use this condition with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

Variables Description
specified Click this link to launch the Select Table Field(s) program. Use this program to specify
a field that is part of the Function condition statement. You can choose a field from any
table included in the Function Library references (References > Tables). The application
compares the field value to a value (any to another) you specify.
any Click this link to launch the Specify a Value program. Use this program to enter a value
that is evaluated. You can also select the Null Value or Any value you want to include
in the comparison.
another Click this link to launch the Specify a Value program. Use this program to enter a value
that is evaluated. You can also select the Null value or Any value you want to include
in the comparison.

• The specified call context field is equal to the specified expression


Use this condition to monitor the value of a context variable in the current data transaction, such as the
CurrentCompany or CurrentUserId. The application compares this argument against an expression that
you specify. If this comparison evaluates to True, the Function workflow continues the path using the True
exit point.
You can use this condition with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

Variables Description
specified call Click this link to launch the Select Table Field(s) program. Use this program to specify
context a call context field from one of two available Call Context tables. These tables are
available for each business method, and you leverage them for custom data storage on
both the client and server. The application compares the field value to a value that you
specify.

658 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Variables Description
is equal to Click this link to toggle between eight values: is equal to, is not equal to, is less than,
is less than or equal to, is more than,is more than or equal to, begins with, ends
with, contains or matches. Select a comparison option that is used against the call
context variable.
specified Click this link to launch the Specify C# expression program. Use this program to
compose an expression that evaluates against the comparison. The expression can contain
literal values, data from the current transaction, and functions that can perform
calculations and data type conversions.
Use the Check Syntax button to verify the syntax of your expression. Note the validation
process reacts to:
• Empty Expression Statement
• Syntax Error
• Security Issue

• The specified field of the changed row is equal to the specified expression
This condition statement monitors a specific field within the data transaction. The Function then compares
this field value to the comparison option and a final value that you specify. If this comparison evaluates to
True, the BPM workflow continues the path using the True exit point.
You can use this condition with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

Variables Description
specified (field) Click this link to launch the Select Table program. Use this program to specify a field
that is part of the statement. You can select a field from any table included in the
Function Library references (References > Tables).
the changed row
Click this link to specify which row set is affected when the rule activates. You can
toggle between six values: the added row, the deleted row, the changed row, the
unchanged row, the updated row and all rows.

is equal to Click this link to toggle between eight values: is equal to, is not equal to, is less
than, is less than or equal to, is more than,is more than or equal to, begins
with, ends with, contains or matches. Select a comparison option used to compare
the selected field against the value defined in the expression later in this statement.
specified Click this link to launch the Specify C# expression program. Use this program to
(expression) compose an expression that evaluates against the comparison. The expression can
contain literal values, data from the current transaction, and functions that can perform
calculations and data type conversions.
Use the Check Syntax button to verify the syntax of your expression. Note the
validation process reacts to:
• Empty Expression Statement
• Syntax Error
• Security Issue

10.2.700 659
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

• The custom code... condition is valid


Use this condition to evaluate a code snippet written in C# language.
You can use this condition with the following Function Types:

Widget Function Widget Function with Code


No Yes

Variables Description
code Click this link to launch the Enter Custom Code editor. The code written in editor should return
a boolean value - for example, True;
The following controls are available within the Editor:
• Code - Use this sheet to enter a code snippet written in C# language you want the Function
to execute.
• Usings & References - This button launches the Directive usings and references dialog.
When you design a custom code, you can use this window to specify additional C# usings
for the Function. Also, you can use this window to add additional References to assemblies
from Server\Assemblies or \Server\Customization\Externals folders of your Epicor ERP
installation.
Note this dialog is accessible from either the Custom Code Editor and directly from the Function
Designer at any stage from a workflow preparation. Any changes made on the Using &
References dialog are automatically applied to the Function.
• Check Syntax - as you create or complete code expressions, click this button to perform C#
code syntax validation. You can perform validations on code expressions at any time during
the entry process. The validation process reacts on:
• Empty code statement
• Syntax errors
Any error messages are reported in the grid under the Code editor, stamped with the
corresponding error type icon. By double-clicking the error, the problematic part of the code
is presented to the user.

valid Click this link to select how the condition evaluates the result of the custom code. If valid is
specified, the result of the custom code is compared with True. When you select invalid, the
result is compared with False.

• The method is called by specified user


Use this condition to determine whether a specific user did or did not launch the current transaction. This
condition statement can be useful for testing directives so that they are activated only by a specific user
account. If this comparison evaluates to True, the Function workflow continues the path using the True exit
point.
You can use this condition with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

660 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Variables Description
is called Click this link to toggle between is called or is not called options. Select the option
you need; these options determine whether the user did or did not initiate the data
transaction.
specified user Click this link to launch the User Account Search window. All the user records in
the current database display. Use this window to select a user that is used for this
condition statement.

• The user who called the method belongs to specified group


Use this condition to determine if the current user is or is not a member of a specific security group. The
application compares the groups of the user who initiated the transaction with the security group you specify
in the condition. If this comparison evaluates to True, the Function workflow continues the path using the
True exit point.
You can use this condition with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

Variables Description
belongs Click this link to switch between belongs or does not belong options. Select the
option you need; these options determine whether the user is or is not a member
of the security group you specify later in this condition statement.
specified group Click this link to launch the Security Group Search window. Use this window to
specify a security group evaluated against the selected user.

• There is at least one updated row in the specified table


This condition compares the value of a field included in the row set to a table you specify. If this comparison
evaluates to True, the Function workflow continues the path using the True exit point.
You can use this condition with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

Variables Description
updated Click this link to specify which row set is affected when this rule activates. You can
select the added row, the deleted row, the updated row or unchanged row.
specified Click this link to launch the Select Table program. Use this program to specify a
table that is monitored by this condition statement. Use this program to choose any
table linked to the current data transaction.

• This application instance is a Non-Production instance


Use this condition to specify the status of the application server instance your workflow will apply to.

The application server status is set up in the Epicor


Administration Console (EAC). For more information, please
refer to the EAC help documentation.

10.2.700 661
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

You can use this condition with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

Variables Description
Non-Production Click this link to toggle between two values: Production and
Non-Production. Select the status of the application server instance you
need for the workflow.

• Time is in the specified time frame


Use this condition to check if the directive execution time matches the indicated time frame. If this comparison
evaluates to True, the Function workflow continues the path using the True exit point.
You can use this condition with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

Variable Description
specified Click this link to launch the Specify a Time Frame program. Use this program
to define a time frame that is part of this condition statement.

Labels

Use the items from the Labels group to attach or remove Data Tags.

The Attach Data Tag and Remove Data Tag labels are
enabled in the Function Designer only if at least one
function-level variable of TableSet type is defined in the
Function.

The tags are unstructured text values that provide a way to group otherwise unrelated records so that you or
other users can search for them. Epicor Functions can leverage data tags to create custom application functionality.

Example You can use a condition statement to check for the


presence of a data tag on a record. This condition statement
could be used as part of a directive that sends you an e-mail
when a record you tagged has been modified. Also, actions
can be used to add one or more tags to a record being
processed or remove tags from a record. Adding a tag to a
record means that a previously untagged record would appear
in your Data Tag search results after it has been updated.

Attach Data Tag

Use this action to attach a data tag to a record. You can apply data tags to records throughout the application.
A common use of data tags may be to group related records for searches or so that Epicor Functions can run
when the records are modified.
You can use this action with the following Function Types:

662 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Widget Function Widget Function with Code


Yes Yes

Parameters

Parameters of the current workflow items are listed in this topic.


Attach the specified public data tag to the changed row of the specified table
Specified (data tag)
Click this link to launch the Specify a Value program. Use this program to enter a free-form text value that
matches the data tag you want to apply to the current record. If the data tag has not been previously defined,
it will be created.
Public
Click this link to toggle between two values: public and current user. Select public to attach a public data tag
to the current record. Select current user to attach a private data tag for the current user to the current record.
The changed row
Click this link to launch the Select a Row Set program. Use this program to specify which row is affected when
this rule activates - like the added row, the deleted row, the updated row, and so on.
Specified (table)
Click this link to launch the Select Table program. Use this program to specify the table that is changed through
this action.
Remove Data Tag

Use this action to remove a data tag from a record. You can apply data tags to records throughout the application.
A common use of data tags may be to group related records for searches or so that Functions can run when the
records are modified.
You can use this action with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

Parameters

Parameters of the current workflow items are listed in this topic.


Remove the specified public data tag from the changed row of the specified table
Specified (data tag)
Click this link to launch the Specify a Value program. Use this program to enter a free-form text value that
matches the data tag you want to remove from the record.
Public
Click this link to toggle between two values: public and current user. Select public to remove a public data tag
from the current record. Select current user to remove a private data tag from the current record for the user
that initiated the transaction.
The changes row
Click this link to launch the Select a Row Set program. Use this program to specify which row is affected when
this rule activates – like the added row, the deleted row, the updated row, and so on.
Specified (table)

10.2.700 663
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Click this link to launch the Select Table program. Use this program to specify the table that is changed through
this action.
Other

Use the workflow items from the Other group to perform various Function actions
The Function workflow can execute the following actions:
• Display an exception message.
• Send an e-mail notification to a user or a group of users.
• Display an informational message.
Raise Exception

Use this action to display an exception message when the execution of th Function stops.
When this action is reached on a Function workflow, execution of this Function is stopped, and execution of the
server code which launched the Function is also stopped.

The transactions that were not committed at the time an


exception occurred are rolled back only if the Requires
Transaction option is selected in the Function settings.

Function exception messages are transmitted to alternate clients - Epicor Mobile Access, Epicor Web Access, Web
Services and Service Connect.
You can use this action with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

Parameters

Parameters of the current workflow item are listed in this topic.


Raise exception based on the designed template
Designed
Click this link to launch the Design Exception Template program. Use this program to build an exception
message generated when the application executes the directive action. You can select one of the following
Severity modes when setting up a message: Information, Warning, Error, and Update Conflict.
Within the message, you can include call context data, simple variables or values queried from related tables and
fields. The following options become available for selection when you click Insert or right-click in the message
to invoke the context menu:
• Call Context - Choose to set up substitution of the value in a selected Function Call Context field. To use
this action, the Function must also include an action that sets the corresponding Function call context variable.
For example, you may have an Execute Custom Code action that includes logic that sets a
callContextBpmData or callContextClient variable, which you can then select as a Call Context substitution.
• Field Query - Choose to open the Select Table Field(s) dialog box and set up substitution of the value from
a selected field in the directive table. Selection is limited to one field.
• Table Query - Choose to open the Select Table Field(s) dialog box and set up substitution of values from
multiple fields in the directive table. In the message, the default behavior of a table query is to insert a
comma-delimited list of the selected table field names followed by a comma-delimited list of the corresponding
table values.

664 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

• Scalar Variables - Choose to set up substitution of values using function-level variables of simple type. The
first five variables you define for the Function are available for selection directly from the context menu. By
clicking More..., you are presented with the Select and Argument/Variable window that lists all simple
variables including their types.
Design Exception Message

1. Click the Raise Exception icon and drag it to the workflow design area. Typically, place this action after a
condition item, to display an exception message when a certain condition is met.

2. Define inbound and outbound connections of this workflow action as necessary.

3. Navigate to the Actions tab of the Properties and click the designed link.
The Design Exception Template displays.

4. By default, the Name of the message is MyError. You can manually enter a different name for the exception
template.

5. Select one of the following Severity modes when setting up a message: Information, Warning, Error
and Update Conflict.

6. Enter the text of the message.


When you compose a message, you can click Insert or right-click in the message to invoke the context
menu. This way, you can add parameters, simple variables or queried values to the message. The following
options are available:
• Call Context - Choose to set up substitution of the value in a selected Function Call Context field. To
use this action, the Function must also include an action that sets the corresponding Function call context
variable. For example, you may have an Execute Custom Code action that includes logic that sets a
callContextBpmData or callContextClient variable, which you can then select as a Call Context
substitution.
• Field Query - Choose to open the Select Table Field(s) dialog box and set up substitution of the value
from a selected field in the directive table. Selection is limited to one field.
• Table Query - Choose to open the Select Table Field(s) dialog box and set up substitution of values
from multiple fields in the directive table. In the message, the default behavior of a table query is to
insert a comma-delimited list of the selected table field names followed by a comma-delimited list of the
corresponding table values.
• Scalar Variables - Choose to set up substitution of values using function-level variables of simple type.
The first five variables you define for the Function are available for selection directly from the context
menu. By clicking More..., you are presented with the Select and Argument/Variable window that
lists all simple variables including their types.

7. Click OK.

Send E-Mail

Use this action to send an e-mail notification when the function executes.
You can select to send an e-mail synchronously or asynchronously. Use the Design E-mail template program to
define e-mail parameters such as subject, recipients and the body of an e-mail.
You can use this action with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

10.2.700 665
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Parameters

Parameters of this workflow item are listed in this topic.


Send e-mail asynchronously based on the designed template with rule
Asynchronously
Click this link to toggle between asynchronous and synchronous execution:
• Synchronously - The call is made immediately when the action executes.
• Asynchronously - The call is queued and executed by the Function system tasks which are part of the Epicor
ICE Task Agent service running behind the scenes. The system task runner performs calls to the server every
20 seconds and processes asynchronous actions in the queue. Users cannot configure this system task.
Designed
Click this link to launch the Design Email Template program to build an e-mail message when the BPM action
fires.
With Rule
Click this link to launch the Action Execution Rule program. You can use this program to define how the action
performs. There are two options:
• Once for All Passed Rows - The action will be executed for all passed table rows.
• Per each Row in Table - The action will be executed for each row of a specific table selected from the list
of tables available for this Function.
Design E-Mail Message

1. Click the Send E-Mail icon and drag it to the workflow design area.

2. Define inbound and outbound connections of this workflow action as necessary.

3. Select if you want to trigger this action synchronously (when the Function executes) or asynchronously
using the automated Function system task.

4. Click the designed link to launch the Design E-mail Template program.

5. By default, the Name of the template is MyEmail. You can manually enter a different name for the e-mail
template.

6. Enter e-mail addresses in the From, To, CC, BCC and Reply to fields as appropriate. The From, CC, BCC,
and Reply to fields are optional.

When you leave the From field empty, the Function first
takes the current user's email address defined in User
Account Security Maintenance. If the user's email
address is not specified, the email specified in Company
Maintenance is used.

7. Enter a main Subject.

8. Construct the body of the message.

Within the From, To, CC, BCC, Reply to, Subject, and
email body, you can include call context data, simple
variables or values queried from related tables and fields.

666 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

The following options become available for selection when


you click Insert or right-click in a field and invoke the
context menu:
• Call Context - Choose to set up substitution of the
value in a selected Function Call Context field. To use
this action, the Function must also include an action
that sets the corresponding Function call context
variable. For example, you may have an Execute
Custom Code action that includes logic that sets a
callContextBpmData or callContextClient variable,
which you can then select as a Call Context
substitution.
• Field Query - Choose to open the Select Table
Field(s) dialog box and set up substitution of the value
from a selected field in the directive table. Selection
is limited to one field.
• Table Query - Choose to open the Select Table
Field(s) dialog box and set up substitution of values
from multiple fields in the directive table. In the
message, the default behavior of a table query is to
insert a comma-delimited list of the selected table field
names followed by a comma-delimited list of the
corresponding table values.
• Scalar Variables - Choose to set up substitution of
values using function-level variables of simple type.
The first five variables you define for the Function are
available for selection directly from the context menu.
By clicking More..., you are presented with the Select
and Argument/Variable window that lists all simple
variables including their types.

9. Click OK.

Show Message

Use this action to display an informational message that you create.


After users read the message and click OK, the Function continues processing. Function informational messages
are transmitted to alternate clients - Epicor Mobile Access, Epicor Web Access, Web Services and Service Connect.
You can use this action with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

Parameters

The parameters of this field are listed in this topic.


Design Informational Message

1. Select the Show Message icon and drag it to the workflow design area.

2. Define inbound and outbound connections of this workflow action as necessary.

10.2.700 667
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

3. Navigate to the Actions tab of the Properties and click the designed link in the action statement.
The Design Informational Message Template displays.

4. By default, the Name of the message is MyMessage. You can manually enter a different name.

5. Enter the text of the message.


When you compose a message, you can click Insert or right-click in the message to invoke the context menu.
This way, you can add parameters, simple variables or queried values to the message. The following options
are available:
• Call Context - Choose to set up substitution of the value in a selected Function Call Context field. To
use this action, the Function must also include an action that sets the corresponding Function call context
variable. For example, you may have an Execute Custom Code action that includes logic that sets a
callContextBpmData or callContextClient variable, which you can then select as a Call Context
substitution.
• Field Query - Choose to open the Select Table Field(s) dialog box and set up substitution of the value
from a selected field in the directive table. Selection is limited to one field.
• Table Query - Choose to open the Select Table Field(s) dialog box and set up substitution of values
from multiple fields in the directive table. In the message, the default behavior of a table query is to
insert a comma-delimited list of the selected table field names followed by a comma-delimited list of the
corresponding table values.
• Scalar Variables - Choose to set up substitution of values using function-level variables of simple type.
The first five variables you define for the Function are available for selection directly from the context
menu. By clicking More..., you are presented with the Select and Argument/Variable window that
lists all simple variables including their types.

6. Click OK.

Setters

Use the items found within the Setters group to change values of selected fields.
Fill Table by Query

Use this action to add data into a target in-memory table. In-memory table can be a table from a dataset parameter
or a Function-level variable of tableset type.
Configure this action through a three-step process:
• First, design a Function query. When you construct the query, you can reference standard database tables
such as ERP.Customer or Function-level variables of tableset type. To complete the query, you must explicitly
define which columns you want to display in the result set. You can then use these columns to fill target table
columns with data.
• Select a single in-memory table serving as the target.

If you need to update more than one table within a tableset,


for example, OrderHed and OrderDtl, you must use two
Fill Table By Query actions within the workflow.

• Configure in-memory table mappings. You can use the following inputs for table fields:
• Source data retrieved from the Function Query
• Custom expressions

668 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

• Function-level variables - These variables can be created anytime within the Function workflow design
process on the Variables tab or while configuring table column mappings.

The number of records added to the selected table is equal to


the number of records returned from the Function Query.

You can use this action with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

Parameters

Parameters of the current widget are listed in this topic.


Use the designed query to insert data into the specified table with specified mapping
Designed
Click this link to launch the Compose Query program. Use this program to build a Function Query used with this
action. In addition to standard database tables, the query phrases can be run against dataset tables to return
data you need. Note the Function query data access is limited by the tables specified in the Function Library
references.
Use the Display Fields tab to define which columns display in the Function Query result set and fill the selected
target table.
Specified (table)
Click this link to launch the Select Table window. Use this window to specify a table you want to fill with data
through this action. Number of rows added to the table is equal to the number of unique rows the Function
query returns.
On this dialog, use the Table field to select either target dataset tables included in the current Function or
Function-level variables of tableset type.
Specified (mapping)
Click this link to launch the Setup Table Mapping window to configure field assignments within a target table.
The following information displays on this window:

Field Description
Table Name Displays the name of the selected in-memory table.
Columns Filter Use this field to search for a specific column within the selected table.
Name Displays the list of columns within the selected table.
Type Displays the .NET classification for each field.
Custom If selected, this check box indicates the field is a custom, user-defined field serving as an
extension of the selected table.
Binding Use the drop-down list to create fields mappings. The list of options includes the following:
• [ignore] - default state. Accept this value for all fields where no data assignments should
be performed by this action.
When the table is filled with data, fields with no mappings are assigned their default
values. For example, a field of the string type is assigned an empty string.

10.2.700 669
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Field Description
• Field: [TableName_ColumnName] - Displays the list of columns you selected on the
Display Fields tab within the Function Query. Use this option to fill target table column
rows using rows retrieved by Function Query.
• Create new variable - use this option to create a new Function-level variable that has
the same type as the field from which this option was launched.
• Existing Function-level variables of the same type. Note only simple variable types such
as string display on this list.
• Specified expression - Use this option to launch the Specify C# expression window
to compose an expression assigned to this table column.
Use the Check Syntax button to verify the syntax of your expression. Note the validation
process reacts on:
• Empty Expression Statement
• Syntax Error
• Security Issue

Bind Automatically
By selecting this button, Function Query display fields with the matching name and type are automatically mapped
to the corresponding target table columns. This function does not overwrite existing column mappings created
manually.
Note the automatic binding uses the first matching column from the query display fields.
The auto-mapping feature uses the information about the table, field name and its type. The following rules are
applied when two or more fields having the same name are selected from two or more tables:
• Only the fields from the Action's source query with matching type as target fields are considered as candidates
for auto-mapping.
• Only fields with matching name are considered as candidates for auto-mapping. This includes incremental
naming such as Company and Company1.
• If the target field is found on the list of source query's display fields, it is taken as the source of mapping and
the search stops.
• A display field from the Action's source query having the matching name and type is taken as the auto-mapping
source. If there is more than one candidate, the one whose full name (Table_FieldName) comes first in
alphabetical order is selected.
• A display field from the Action's source query having the matching name and type, but another instance, is
considered as a candidate for auto-mapping.
In Functions, this would be a dataset table or variable.table having the same C# type as the target table. If
there is more than one candidate, the one whose full name (Table_FieldName) comes first in alphabetical
order is selected.
• A display field from the Action's source query having the matching name and type, which belongs to or is
derived from the same database table as the target one, is considered as a candidate for auto-mapping.
In Functions, it would be a field from {Erp./Ice.}Table from which the target dataset table is derived.
If there is more than one candidate, the one whose full name (Table_FieldName) comes first in alphabetical
order is selected.

Clear Binding

670 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

By selecting this option, all existing table column mappings are removed. This includes manual and automatic
column mappings created for a table.
Set Argument/Variable

Use this action to set the Function argument/variable value to the expression you define.
Usage of this action requires presence of either:
• Simple parameters within the Function.
• Function variables of simple type such as String, Decimal, Boolean, Long, DateTime and so on.
You can use this action with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

Parameters

Parameters of this workflow widget are listed in this topic.


Set the specified argument/variable to the specified expression
Specified (argument/variable)
Click this link to launch the Select an Argument program. Use this program to select a Function argument that
passes data into the database. The Name column displays the name of the argument. The Type field displays
the .NET classification for each argument.
Specified (expression)
Click this link to launch the Specify C# Expression program. Use this program to compose an expression used
as Function argument value. The expression can contain literal values, data from the current transaction, and
functions that can perform calculations and data type conversions.
The Function code editor supports intelligent code editing, which includes syntax highlighting and code
completion working for C# keywords, parameters, directive variables, member lists, etc. Start typing and then
press Ctrl + Space to bring up suggested options. For example, to invoke a list of columns for a table, enter
the name of the table followed by a dot (.) and press Ctrl + Space. Select the column you need, it will be
added to the table name - for example, dsABCCodeRow.Company where ds is the name of a method
parameter or variable of tableset type.

Click the Check Syntax button to verify the syntax of your expression. Note the validation process reacts on:
• Empty Expression Statement
• Syntax Error
• Security Issue
Set BPM Data Field

Use this action to set the value of a field in a BPM data table.
This table is used with the custom data storage functionality available through CallContext tables. You can check
the field value in a condition of a further Function or pass this value on to the client application. For more
information, review the Call Context topics within application help.
You can use this action with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

10.2.700 671
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Parameters

The parameters of this workflow widget are listed in this topic


Set the specified field of BPM Data to the specified expression
Specified (field)
Click this link to launch the Select Table Field(s) program. Use this program to specify a call context field that
is part of the Function action.
Specified (expression)
Click this link to launch the Specify C# expression program. Use this program to compose an expression used
as the call context variable value. The expression can contain literal values, data from the current transaction,
Function Parameters, Function-Level Variables and functions that can perform calculations and data type
conversions.
The Function code editor supports intelligent code editing, which includes syntax highlighting and code
completion working for C# keywords, parameters, directive variables, member lists, etc. Start typing and then
press Ctrl + Space to bring up suggested options. For example, to invoke a list of columns for a table, enter
the name of the table followed by a dot (.) and press Ctrl + Space. Select the column you need, it will be
added to the table name: ttABCCodeRow.Company.

Click the Check Syntax button to verify the syntax of your expression. Note the validation process reacts on:
• Empty Expression Statement
• Syntax Error
• Security Issue.
Set by Query

Run this action to use a query to change the value of a selected field.

This action is only available to users belonging to the Functions


Power Developer security group.

Within the Epicor ERP Cloud, this program or feature may not
be available or may operate under certain restrictions.

You can use this action with the following Function Types:

Widget Function Widget Function with Code


No Yes

Parameters

The parameters of the current Widget are listed in this topic.


Set the specified field of all rows identified by the designed query to the specified expression with
rule
Specified (field)
Click this link to launch the Select Table Field(s) program. Use this program to specify a standard or user-defined
field that is changed through this action.
On this dialog, the Table field displays tables used within the query. These refer to subsets of the corresponding
data of dataset table or Function-level variable of tableset type that matches conditions and relations defined in
the query.
Designed

672 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Click this link to launch the Compose Query program. Use this program to build a Function query used with
this action. In addition to standard tables, the query phrases can be run against in-memory tables to analyze
values passed in datasets or LINQ row sets. Note the Function query data access is limited by the tables specified
in the Function Library references.
Specified (expression)
Click this link to launch the Specify C# expression program. Use this program to compose an expression that
is evaluated against the comparison. The expression can contain literal values, data from the current transaction,
method parameters, Function-level variables, functions that can perform calculations and data type conversions.
Function code editor supports intelligent code editing, which includes syntax highlighting and code completion
working for C# keywords, parameters, directive variables, member lists, etc. Start typing and then press Ctrl
+ Space to bring up suggested options. For example, to invoke a list of columns for a table, enter the name
of the table followed by a dot (.) and press Ctrl + Space. Select the column you need, it will be added to the
table name: dsABCCodeRow.Company where ds is the name of a method parameter or variable of tableset
type.

Click the Check Syntax button to verify the syntax of your expression. Note the validation process reacts on:
• Empty Expression Statement
• Syntax Error
• Security Issue
With rule
Click this link to launch the Action Execution Rule program. You can use this program to select how the action
performs. The available options are:
• Once for All Passed Rows - The action will be executed for all passed table rows.
• Per each Row in Table - The action will be executed for each row of a specific table selected from the list
of tables available for this Function.
Set Field

Use this action to change a selected field to a different value, using a row set action that you define.
You can use this action with the following Function Types:

Widget Function Widget Function with Code


Yes Yes

Parameters

Parameters for this workflow widget are listed in this topic.


Set the specified field of the changed row to the specified expression
Specified (field)
Click this link to launch the Select Table Field(s) program. Use this program to specify a standard or user-defined
field that is changed through this action. Use this program to select a field from a database table included in the
Function Library references or an in-memory dataset table from method parameters of tableset type.
The changed row
Click this link to launch the Select a Row Set program. Use this program to specify which row set is affected
when this rule activates – for example, the added row, the deleted row, the updated row, and so on.
Specified (expression)

10.2.700 673
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Click this link to launch the Specify C# expression program. Use this program to compose an expression that
is evaluated against the comparison. The expression can contain literal values, data from the current transaction,
method parameters, directive level variables, functions that can perform calculations and data type conversions.
Function code editor supports intelligent code editing, which includes syntax highlighting and code completion
working for C# keywords, parameters, directive variables, member lists, etc. Start typing and then press Ctrl
+ Space to bring up suggested options. For example, to invoke a list of columns for a table, enter the name
of the table followed by a dot (.) and press Ctrl + Space. Select the column you need, it will be added to the
table name: dsABCCodeRow.Company.

Click the Check Syntax button to verify the syntax of your expression. Note the validation process reacts on:
• Empty Expression Statement
• Syntax Error
• Security Issue
Update Table by Query

Use this action to update data within an in-memory table. In-memory table can be a dataset table or a Function-level
variable of tableset type.
Configure this action through the following process:
• First, design a Function query. When you construct the query, you can reference both in-memory tables and
standard database tables. To complete the query, you must explicitly set which columns you want to display
in the result set. You can then use the query rows to update the information within a target table.
• Specify which row set within an in-memory table is affected, when this action activates. You can select added
rows, deleted rows, updated rows, added and updated rows, changed rows, unchanged rows and all rows.
• Select a single in-memory table serving as the target for the data update.
• Specify the relation between the target table and the Function Query. This relation defines how rows returned
by the query are associated with existing table rows.
• Specify how data is assigned to the target table columns. When you create column mappings, the following
options are available for use:
• By default, in the Binding column, all fields are set to [ignore]. This state indicates the original state of
a fields is preserved and no data updates are performed.
• Update a target table column rows using column rows retrieved by a Function Query. Note only query
columns selected for display and those with a matching data type as a target column display on the list.
• Create custom expressions.
• Use existing Function-level variables of the matching type.
• Create new Function-level variables. These variables can be created anytime within the Function workflow
design process on the Variables tab or while configuring table column mappings.

When this action executes, the data is first retrieved from a


Function Query. This data is then matched with selected set
of rows from a target in-memory table, for example, with
added rows. This matching is based on rows returned by the
query and the relation specified between the query and the
target table defined on the Setup Table Mapping window.

If the Function Query returns more than one row matching a target table row, only the first row found in the
query is used to perform data assignments. The remaining query rows are ignored. The other way around, if for
a target table row, no matching rows are returned by the query, the row is excluded from update.
You can use this action with the following Function Types:

674 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Widget Function Widget Function with Code


Yes Yes

Parameters

Parameters of this workflow widget are listed in this topic.


Use the designed query to update all rows of specified table with specified mapping
Designed
Click this link to launch the Compose Query program. Use this program to build a Function Query used with
this action. In addition to standard database tables, the query phrases can be run against dataset tables to return
data you need. Note the Function query data access is limited by the tables and service tablesets specified in the
Function Library references.
Use the Display Fields tab to define which columns display in the Function Query result set. You can then use
the data retrieved from the query to update the rows within the target in-memory table.
All rows
Select the state of in-memory table record rows you want to update through this action. The state of each record
row is defined in the RowMod column. Select one of the following row sets:
• all rows - default state
• added rows
• deleted rows
• updated rows
• added and updated rows
• changed rows
• unchanged rows
Specified (table)
Click this link to launch the Select Table window. Use this window to specify a single in-memory table you want
to update using this action.
On this dialog, use the Table field to select either target dataset tables included in the current Function or
Function-level variables of tableset type.
Specified (mapping)
Click this link to launch the Setup Table Mapping window to configure field assignments within a target table.
The following information displays on this window:

Field Description
Table Name Displays the name of the selected in-memory table.
Columns Filter Use this field to search for a specific column within the selected table.
Name Displays the list of columns within the selected table.
Type Displays the .NET classification for each field.
Custom If selected, this check box indicates the field is a custom, user-defined field serving as an
extension of the selected table.
Binding Use the drop-down list to create fields mappings. The list of options includes the following:
• [ignore] - default state. Accept this value for all fields where no data assignments should
be performed by this action.

10.2.700 675
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Field Description
When the table is filled with data, fields with no mappings are assigned their default
values. For example, a field of the string type is assigned an empty string.
• Field: [TableName_ColumnName] - Displays the list of columns you selected on the
Display Fields tab within the Function Query. Use this option to fill target table column
rows using rows retrieved by Function Query.
• Create new variable - use this option to create a new Function-level variable that has
the same type as the field from which this option was launched.
• Existing Function-level variables of the same type. Note only simple variable types such
as string display on this list.
• Specified expression - Use this option to launch the Specify C# expression window
to compose an expression assigned to this table column.
Use the Check Syntax button to verify the syntax of your expression. Note the validation
process reacts on:
• Empty Expression Statement
• Syntax Error
• Security Issue

Add a Custom Code Function

Follow these steps to add a new Custom Code Function.


This action is available to members of the Functions Power Developer security group in libraries with enabled
Custom Code Functions.

1. From the Main Menu of the Epicor Function Maintenance program, navigate to File > New > Add
Custom Code Function or click the Down Arrow next to the New icon in the Main Toolbar and select
Add Custom Code Function.
The Function sheet displays with an active entry form.

2. Enter the Function ID.

3. Enter a short Description of your function.

4. If necessary, select additional options for your function.

5. If necessary, define Function parameters on the Signature sheet.

6. Click Edit to add the code of your Function.


The Function Editor displays. Use this free-from C# editor to add or edit your custom code. Please refer to
the Function Editor topics for more information on its functionality.

7. Optionally, add Notes to your function. Click Edit to activate the Notes editor.
At any point, you can add as many notes as you need.

8. From the Main Menu or from the Main Toolbar, click Save.

676 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Function Editor

Use this code editor to add and edit the C# code of your Function.

Only Functions Power Developers can edit Custom Code


Functions.

Review the topics of this section to learn more about the components of the Function Editor.
Here are the three elements that are available regardless of the current layout combination:

Check Syntax
Use this button to validate your code. If the code compiles with errors, their description will be displayed on the
Error List sheet below the Editor panel.

Cancel
Click this button to close the Function Editor window. If you have unsaved changes, you will be offered to save
them prior to closing the program. Select Yes to save or No to ignore unsaved changes and exit the program.

OK
Click this button to save your code.

Prior to saving the changes, the system runs code check to


ensure its validity. In case compilation errors are detected, a
warning message displays. At this stage, you may temporarily
ignore the errors and save the code as is.

Code
Use this sheet to enter the C# code of your Function.
Editor
Enter your code here.

The Function Editor supports intelligent code editing, which


includes syntax highlighting and code completion working for
C# keywords, parameters, directive variables, member lists,
etc. Start typing and then press Ctrl + Space to bring up
suggested options. For example, to invoke a list of columns
for a table, enter the name of the table followed by a dot ( . )
and press Ctrl + Space. Select the column you need, it will be
added to the table name - for example,
ABCCodeRow.Company.

Context Menu
• Edit - This menu allows you to manipulate items within the current code. For example, you can cut, copy,
and paste text or undo the latest changes you have made.
• Parameters - Use this option to select Function parameters and insert them into your code. Parameters are
added in the following format: this.[ParamName], where [ParamName] is the name of the parameter - for
example, this.input1.

10.2.700 677
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Tables from the tablesets of complex parameters are exposed on the Current Scope panel as child nodes of
these parameters - for example, Tip, Customer, etc. Double-click on a parameter table in the tree to bring
it into your code. You can also type a period (.) after parameter name, press Ctrl + Space, and select a table
from the list of options. Tables of complex parameters of Tableset type are added to the code in the following
format: this.[ParamName].[Table] - for example, this.input2.Customer, where Customer is the table
from the parameter's tableset.
Use an indexer to address a row in a parameter's table. For example, this.input2.Customer[0].C
ustNum reads the value of the CustNum field from a row at position 0.

• Call Context - Use this option to insert reference to callContextBpmData or callContextClient tables and
fields.
Type in a dot (.) after the table name and press Ctrl + Space to invoke the list of available columns of this
table. Select the column you need, it will be added to the table name.

Example callContextClient.CurrentCompany

Coding Examples

This topic contains some basic code snippets that explain how you can include Epicor objects into your code.

Function-to-Function Calls
Use the following format to call another Function: this.EfxLib.[LibraryID].[FunctionID] ([FunctionParameter1],
[FunctionParameter2]). For example, a call to the function-1 of the NewLib library can coded like this:
this.EfxLib.NewLib.function_1(1,2);

Use an underscore instead of a dash in a Function ID when


you call the Function from your C# code.

Handling Function Output


Single output can be assigned to a Function variable as shown in the below example:
var result = this.EfxLib.NewLib.function_1();
If the called Function returns several response parameters, you need to map each response parameter - for
example:
var result =this.EfxLib.Lib_1.Func_1();
this.myTsVar = result.r1;
this.myStrVar = result.r2;
this.myBoolVar = result.r3;
where r1, r2, and r3 are names of response parameters.

Usings

Use this sheet to review standard and add custom using statements.
Standard Usings
This panel contains a read-only list of using statements that the Functions framework, by default, adds to the
generated custom code. This list depends on the type of application environments and is either ICE or ERP specific.
Usings
This panel contains custom using statements. You can add new and edit existing statements here.

678 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Current Scope

This sheet displays the summary of a Function's scope.


Request/Response
These two nodes list the Function's request and response parameters defined on the Signature sheet.

These nodes do not display in the tree if no input or output


parameters are defined in the Function.

Tablesets of complex parameters are displayed as child nodes of these parameters.


BPM Context
This node contains the default call context options - callContextBpmData and callContextClient. Expand these
nodes to view available columns.
Advanced
This node contains the following child nodes:
• Session - lists session properties.
• BAQ Constants - lists the available system BAQ Constants.
Please refer to the System Management > Business Activity Query > Query Builder > Display Fields >
Column Select > Calculated Field > BAQ Constants List topic in the Application help.
• DB Context - lists database tables from the library's Table References if database access from custom code
is allowed (DB Access from Code option is not set to None).

Make sure that all referenced database tables that can be


updated from your custom code or expressions are marked
as Updatable. All custom update logic for read-only tables
will be ignored by the system, and the database will not
get updated.

Functions

The tree on this sheet contains two child nodes - Functions and Operators. These are standard functions and
operators that are also available in the BPM Expression Editor.
Functions

This topic contains the list of functions available in the Function Editor.
Math
Mathematical functions execute mathematical operations usually based on input values that are provided as
arguments, and return a numeric value as the result of the operation.

Function Editor View Description

(x % y) (%) (top expression % bottom expression)


Returns the remainder of the top numeric expression divided by
the bottom numeric expression.

Abs(x) Math.Abs() abs(expression)

10.2.700 679
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Function Editor View Description


Returns the absolute value of a numeric expression.

Log(x) Math.Log() Log(expression)


Calculates the natural (e) logarithm of a decimal expression.

Log10(x) Math.Log10() Log10(expression)


Calculates the base-10 logarithm of a decimal expression.

Negate (-x) decimal.Negate() negate function


Reverses the sign of a decimal expression.

Pow (x,y) Math.Pow(, ) Pow(expression, exponent)


Returns the floating-point expression raised to the power of a
floating-point exponent.

Round(x, y) Math.Round(, ) round(expression , precision )


Rounds a decimal expression to a specified number of places
after the decimal point.

Sqrt(x) Math.Sqrt() sqrt(expression)


Returns the square root value of a floating-point expression.

Truncate(x, y) Math.Truncate() round (expression, precision, 1)


Truncates a decimal expression to a specified number of decimal
places, returning a decimal value.

String
String functions manipulate a string or query information about a string.

Function Editor View Description

Format(x,y,...) string.Format("{0}", ) string.Format(format, object1, ...)


Converts a value of any data type into a character value using
format string.

Replace(x,y,z) BpmFunc.Replace(, , ) Replace(expression ,search ,replace)


Performs a search and replace function on a string expression.

ToLower(x) BpmFunc.ToLower() ToLower(expression)


Converts any uppercase characters in a string expression to
lowercase characters.

ToUpper(x) BpmFunc.ToUpper() ToUpper(expression)


Converts any lowercase characters in a string expression to
uppercase characters.

680 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Function Editor View Description

x.Length .Length expression.Length


Returns the number of characters in an expression.

x.Substring(y,z) .Substring(, ) expression.Substring(position, length)


Extracts a portion from a string expression.

x.ToString() .ToString() expression.ToString()


Converts a value of any data type into a string value.

x.Trim() .Trim() expression.Trim()


Removes leading and trailing white spaces from a string
expression.

x.TrimEnd() .TrimEnd() expression.TrimEnd()


Removes trailing white space from a string expression.

x.TrimStart() .TrimStart() expression.TrimStart()


Removes leading white spaces from a string expression.

Date
The following is the list of date functions available for use within an expression.

Function Editor View Description

AddInterval(x,y) BpmFunc.AddInterval(, ) AddInterval(expression, timespan)


Adds the specified TimeSpan to the specified DateTime expression
and returns the result as a new DateTime.

AddInterval(x,y,z) BpmFunc.AddInterval(, , AddInterval(expression, interval-amount, interval-unit)


)
Adds a date interval to, or subtracts a date interval from specified
expression.
Expression should be of date type.
Interval-unit is a character constant with one of the following
values: IntervalUnit.Years, IntervalUnit.Months,
IntervalUnit.Weeks, IntervalUnit.Days, IntervalUnit.Hours,
IntervalUnit.Minutes, IntervalUnit.Seconds.

Date(yyyy, mm, dd) BpmFunc.Date(, , ) Date(year, month, day)


Initializes a DateTime value with a set of year, month, and day.

Day(x) BpmFunc.Day() Day(expression)


Evaluates a date expression and returns a day of the month as
an integer value from 1 to 31.

10.2.700 681
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Function Editor View Description

Month(x) BpmFunc.Month() Month(expression)


Evaluates a date expression and returns a month integer value
from 1 to 12.

Now BpmFunc.Now() Now


Returns the current company date and time.

Today BpmFunc.Today() Today


Returns the current company date.

WeekDay(x) BpmFunc.WeekDay() WeekDay(expression)


Evaluates a date expression and returns the day of the week as
an integer value from 1 (Sunday) to 7 (Saturday) for that date.

Year(x) BpmFunc.Year() Year(expression)


Evaluates a date expression and returns the year value of that
date in the Gregorian calendar, including the century, as an
integer value.

Conversion
Conversion functions transform an expression of one data type to another.

Function Editor View Description

Convert.ToBoolean(x) Convert.ToBoolean() Convert.ToBoolean(expression)


Converts any data type into the boolean data type.

Convert.ToDecimal(x) Convert.ToDecimal() Convert.ToDecimal(expression)


Converts an expression of any data type to a decimal
value.

Convert.ToInt32(x) Convert.ToInt32() Convert.ToInt32(expression)


Converts an expression of any data type to a 32-bit
integer value, rounding that value if necessary.

Date(yyyy,mm,dd) BpmFunc.Date(, , ) Date(year, month, day)


Initializes a DateTime value with a set of year, month,
and day.

DateTime(x) new DateTime() DateTime(ticks)


Initializes a DateTime value with an integer number of
ticks.

DateTime.Parse("x") DateTime.Parse("") DateTime.Parse(expression)

682 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Function Editor View Description


Converts a string expression into a datetime value.

Format(x,y, ....) string.Format("{0}", ) string.Format(format, object1, ...)


Converts a value of any data type into a string value using
format string.

x.ToString(date format) .ToString("MM-dd-yyyy") expression.ToString(format)


Converts a date value into a string value using a date
format string.

x.ToString(decimal format) .ToString("N") expression.ToString(format)


Converts a decimal value into a string value using a
decimal format string.

x.ToString(integer format) .ToString("G") expression.ToString(format)


Converts an integer value into a string value using an
integer format string.

x.ToString(time format) .ToString("HH-mm-ss") expression.ToString(format)


Converts a date value into a string value using a time
format string.

x.ToString() .ToString() expression.ToString()


Converts a value of any data type into a string value.

Operators

This topic contains the list of operators available in the Function Editor.
Operators are mathematical expressions either used with a single function or used to process two or more
functions.

Arithmetic
The following is the list of available arithmetic operators; a mathematical functions that takes two operands and
performs a calculation on them.

Operator Editor View Description

Add (x + y) (+) + Addition operator


Adds two numeric expressions.

Divide (x / y) (/) / Division operator.


Divides one numeric expression by another numeric
expression.

Modulo (x % y) (%) % Modulo operator.

10.2.700 683
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Operator Editor View Description


Determines the remainder after division.

Multiply (x * y) (*) * Multiplication operator


Multiplies two numeric expressions.

Substract (x - y) (-) - Substraction operator


Subtracts one numeric expression from another numeric
expression.

Boolean
The following is the list of available Boolean (Logical) operators. Boolean operators evaluate the values and return
true or false as output.

Operator Editor View Description

And (x && y) && && And operator


Returns a true value if each logical expression is true.

Equal (x == y) ( == ) == Equal operator.


Returns a true value if two expressions are equal.

Not (!x) !() ! Not operator.


Returns true if an expression is false and false if an expression
is true.

Or (x II y) || || Or operator.
Returns a true value if either of two logical expressions is true.

Comparison
The following is the list of available comparison operators used to compare two operands. These operators return
true or false based on comparison.

Operator Editor View Description

Equal (x == y) == == Equal operator.


Returns a true value if two expressions are equal.

Greater or Equal (x >= y) >= >= Greater or Equal operator.


Returns a true value if the first of two expressions is greater than
or equal to the second expression.

Greater Than (x > y) > > Greater Than operator.


Returns a true value if the first of two expressions is greater than
the second expression.

684 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Operator Editor View Description

Less or Equal (x <= y) <= <= Less or Equal operator.


Returns a true value if the first of two expressions is less than or
equal to the second.

Less Than (x < y) < < Less Than operator.


Returns a true value if the first of two expressions is less than the
second.

Not Equal (x != y) != != Not Equal operator.


Compares two expressions and returns a true value if they are not
equal.

Condition
This section holds the conditional (ternary) operator.

Operator Editor View Description

x?y:z () ? : If-Then-Else condition.


Evaluates and returns one of two expressions, depending on
the value of a specified condition.

Other
This section holds other operators you can use to test or compare string expressions.

Operator Editor View Description

Begins( x,y ) BpmFunc.Begins(, ) Begins with ... condition.


Tests a string expression to see if that expression begins with a
second string expression.

Ends( x,y ) BpmFunc.Ends(, ) Ends with ... condition.


Tests a string expression to see if that expression ends with a
second string expression.

Matches( x,y ) BpmFunc.Matches(, ) Matches( expression, pattern )


Compares a string expression to a pattern and evaluates to a
true value if the expression satisfies the pattern criteria.

x.Compare( y ) .Compare() left.Compare( right )


Compares two case-insensitive string expressions; the result is
less than 0 if left string is less than right string, 0 if the strings
are equal, and greater than 0 if right string is greater than left
string.

x.Contains( y ) .Contains() Contains condition.

10.2.700 685
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Operator Editor View Description


Tests a string expression to see if that expression contains a
second string expression.

x.StringEqual( y ) .StringEqual() left.StringEqual( right )


Compares two string expressions and returns true if strings are
equal and false otherwise.

Libraries

This sheet displays the list of library references of the current library.
If the library has references to other libraries, these library references appear in the tree view.
You can expand each library node to view its Functions (if any). You can then perform the following operations:
View Function Details
Select a Function in the tree view to display its signature and short description on the Online Help Panel.
Add a Function to the Code
• Automatically - Double-click on a Function or use drag-and-drop to bring it into your code. The Function is
added in the following format: this.EfxLib.[LibraryID].[FunctionID](); For example,
this.EfxLib.MyLibrary.MyFunction();
• Manually - Double-click on a library in the tree view or drag and drop it into the Code Editor area. This action
pastes the library name into your code in the following format: this.EfxLib.[LibraryID] - for example,
this.EfxLib.MyLibrary. As the Function Code Editor supports code completion, you can type in a dot (.) and
press Ctrl + Space to invoke the list of available entities. From this list, you can manually select a Function
that belongs to this library.

If the library or Function ID you are adding to your code


contains a dash, this dash is automatically replaced with an
underscore to comply with C# syntax rules - for example,
function-1 from the my-lib library is added as
this.EfxLib.my_lib.function_1();

Online Help

This panel displays description for a selected function or operator from the Functions sheet.
Select any function or operator on the Functions sheet to display its description on the Online Help sheet below
the Editor panel.
This panel also displays the signature and description of the Functions from the libraries added to the current
one as references.

Error List

This sheet displays the code and message of error(s) detected during validation.
Code validation reacts to:
• Absence of code in the editor
• Incorrect syntax in code and using statements

686 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

• Security issues.
Click Check Syntax or OK (Save) to trigger code validation. In case compilation errors are detected during saving,
an error warning message displays. At this stage, you may temporarily ignore the errors and save the code as is.
If you need to save an unfinished Function that may fail to compile, mark it as Disabled. Disabled Functions
are not compiled by the system and can be successfully saved for later editing.

Copying Function

Use this action to create a copy of a Function within a library.

When you copy a Function, all of its settings (ID, Description,


Disabled/Enabled status, etc.) and properties (workflow design,
request and response parameters, and notes) are also copied.

Functions Developers and Power Functions Developers can copy Functions owned by or shared with them.
You cannot copy Functions in published libraries.
Follow the steps below to create a copy of the previously created MyFunc Function:

1. Open the MyFunc Function.

2. From the Actions menu, select Copy Function.

3. The Function sheet of the program displays the copy of the selected Function is a default function-2 ID.

By default, the ID of the newly created Function displays


in the following format: function-[index], where index
is used to ensure the ID of the newly created Function is
unique.

10.2.700 687
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

4. You can now edit the newly created Function as you like. For example:
• Change the ID to MyFunc2.
• In the Function Designer, change the expression to Left - Right to calculate the difference instead.

Exporting Library

Use this action to create a backup of your library.

1. Open the previously created MyLib library.

2. From the Actions menu, select Export Library.


The Export Library window displays.

3. Specify the path for the export file.

4. Keep the original file name.

By default, the file name displays the original system name


of the exported library. You can specify a different name.

688 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

5. In the Save as type field, select Binary format (.efxb).

Two formats are available:


• Binary format (.efxb) - A binary JavaScript Object
Notation with a Functions-specific header
• JSON format (.efxj) - A plaint text JSON

6. Click Save.

You can now import this file into a different environment.

Importing Library

Use this action to import function libraries from other Epicor ERP instances.
Functions Administrators can import any libraries regardless of their published status. If a published library is
imported by a Functions Administrator, the library keeps its published status in the system. However, when
imported by Functions Developers and Functions Power Developers a published library becomes unpublished and
has to be manually promoted to production via Epicor Functions Maintenance. Please refer to the Actions >
Promote Library for Production topic for details. Functions Developers and Functions Power Developers
can import only libraries that they own or that are shared with them.
Cloud-Specific Information: In Multi-Tenant environments, only Global Security Managers can import libraries
with allowed code widgets.

During import, the owning company of a library can change:


• if a library is imported by a developer and its original
Owning Company is different from the current one, the
Current Company becomes the owning company of this
library;
• If a library is imported by a Functions Administrator and its
original Owning Company does not exist or is not available
to the user, the Current Company becomes the owning
company of this library.

Follow the steps below to import a library. But prior to that, make some significant change to the MyFunc
Function - for example, change the name of the output parameter to Output and specify it accordingly in the
expression. The current version of the Function will change. This prerequisite will allow demonstration of different
Overwrite modes during import. The updated library may look like this:

10.2.700 689
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

1. From the Actions menu, select Import Library.


The Import Epicor Functions Library window displays.

2. In the File field, specify the path to the function library file. You can either enter the path manually or use
the Browse button to select file location.

690 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

When you click Browse, the Import Library window


displays. The File name drop-down field contains the list
of files of the format selected in the Files of type field
(Binary format by default). Change the format to JSON
to view the available files of this type. Once you locate
the file, click Open.

3. Keep the default Overwrite mode - None and click Import.

The import fails because this option prevents importing a library with the same Library ID as the ID of some
existing library. The Import process messages panel displays an error.

4. Now, select Upgrade and click Import.

10.2.700 691
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

The import fails again. This time because the version of the imported library is lower than the current version
of the existing library.
You can import this library under a different ID to keep several versions of the same library in the system or
use the Force overwrite mode.

Logic If there is a library with a Library ID that matches


the imported library ID, the system compares their
OriginalID and GlobalID. If these IDs match and the
version of the imported library is later than the version of
the existing one, the system overwrites the existing library.
If a New Library ID is not specified during import, the
imported library's ID is taken from the LibraryID property
specified in the library file.
OriginalID is the ID that a developer assigns to a library
in the Library ID field during its creation. If you change
Library ID in Epicor Functions Maintenance, OriginalID will
not change. GlobalID is a GUID assigned to a library by
the system. Both of these IDs are not visible in the user
interface.

5. Finally, select Force and click Import.

692 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

The import completes successfully.

Logic This option ignores version and Library ID


validation. The system overwrites the library with a
matching Library ID even it has different OriginalID and
GlobalID or is an earlier version of an existing library.

6. Click Close.

If the original MyLib library is still open in the program, click the Refresh icon in the Tool bar and notice that
the name of the output parameter changes back to Result because the library has been completely overwritten
by the imported backup version:

10.2.700 693
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Publishing/Unpublishing Library

This topic explains how you can publish (promote to production) and unpublish (demote from production) a
library.
When you promote a library to production mode, or in other words publish it, most of its settings become
read-only even for its owner because no changes to library Functions are allowed while the library is available for
public use. However, Functions Administrators can disable/enable a published library, add/remove Company
mapping, and demote it from the production mode for editing.

By default, any library installed as part of a solution is published.

To be able to call a published library via REST or from a BPM


directive, you must explicitly map it to a Company on the
Security sheet of the Library Maintenance. Calling an
unpublished library from the current Company does not require
mapping this library to a Company. However, the mapping is
required if the unpublished library is called from a different
Company. Please refer to the Epicor Functions topic of the
REST Services v.2 Guide in the Application Help for details on
Epicor Functions availability via REST.

To publish a library:

1. Open the library you wish to publish (promote).

694 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

2. From the Actions menu, select Promote Library to Production.


Click Yes to the warning message.

The library and all its Functions have been moved to the public space.

A Published shape appears in the top right corner of the


form when the library is published.

You can unpublish a library when you need to edit or update an existing library to make sure it is not called by
users during maintenance.

Libraries installed as part of a solution cannot be demoted from


production.

For development purposes, unpublished libraries are still


available via REST by using a special 'staging' URL of the
Library/Function. Please refer to the Epicor Functions topic
of the REST Services v.2 Guide in the Application Help for
details on Epicor Functions availability via REST.

To unpublish a library:

1. Open the library you wish to demote.

10.2.700 695
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

2. From the Actions menu, select Demote Library from Production.


Click Yes to the warning message.

The library and all its Functions have been removed from the public space.

Calling Function from BPM Directive

Use this example to see how you can reuse a Function in several BPM Directives.
In this example, you will:

1. Create a Function that takes a Customer Number as an input parameter, queries the database, calculates,
and returns the sum of total order charges for the Customer since the beginning of the year until the moment
of the request.

2. Create two BPM Method Directives for two different methods called from the Sales Order Entry and
Customer Shipment Entry programs.

3. Call the Function from these two Directives.


In two different service methods, these directives will invoke the same Function, evaluate the returned value
against a condition, and if the condition is satisfied, show an informational message when a new sales order
or a new shipment is created.

696 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Add a New Function

Use the MyLib library from previous examples or create a new


one.

1. From the Tool bar, click New > Add Widget Function.

2. For a Function ID, type in OrderSum.

3. The Function will query the Customer and OrderHed tables. It will also use a UD01 table to return the
value of total charges. Therefore, add the following references to the library:

Reference Type Reference ID


Assemblies Ice.Contracts.BO.UD01.dll
Tables ERP.Customer
Tables ERP.OrderHed

4. Add the custNumber request parameter of integer type.

5. Add the orderSum response parameter of decimal type.

Your Function should look similar to this:

Proceed to designing the Function workflow.

Design Function Workflow

1. Click Design to design the Function workflow that in the end will look like this:

10.2.700 697
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

2. Navigate to the Properties > Variables list and add the following Function-level variables:

Name Type
startDate DateTime
endDate DateTime
orderSumTable UD01Tableset

The startDate and endDate variables will be used to


define the period of time based on Order Date. The
orderSumTable variable will be used to store the sum
returned from the Function.

3. From the Setters Panel, drag a Set Argument/Variable widget to the canvas. Connect it to the Start
widget.

a. Click the first specified link and select the startDate variable.

b. Click the second specified link and enter the following expression into the editor: new DateTime(D
ateTime.Now.Year, 1, 1)

698 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

This will set the query start date to the first day of the
current year.

4. Add another Set Argument/Variable widget to the canvas. Connect it to the previous Set Argument/Variable
widget.

a. Click the first specified link and select the endDate variable.

b. Click the second specified link and enter the following expression into the editor: DateTime.Now

10.2.700 699
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

This will set the query end date to the current time of
the request.

5. Add a Fill Table by Query widget and connect it to the last Set Argument/Variable widget.

a. Click the designed link.


The Compose Query window displays.

b. Drag the ERP.Customer and ERP.OrderHed tables to the query designer canvas.

c. Select the Customer table and add the following Table Criteria:

Field Operation Filter Value


CustNum = specified argument/variable

Click the specified link and select the custNumber


parameter.

700 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

d. Select the OrderHed table and add the following Table Criteria:

Field Operation Filter Value


OrderDate >= @startDate argument/variable
OrderDate <= @endDate argument/variable
Company = BAQ CompanyID constant

10.2.700 701
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

e. Navigate to the Display Fields sheet and from the OrderHed table, select the TotalCharges field.

702 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

f. Click OK and return to the action statement.

g. Click the first specified link and select the Number01 decimal field of the orderSumTable.UD01 table.

10.2.700 703
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

h. Click the second specified link.


The Setup Table Mapping window displays.

i. Bind the Company field to the following expression: callContextClient.CurrentCompany.

704 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

j. Bind the Number01 field to the OrderHed_TotalCharges query field.

6. Add the third Set Argument/Variable widget to the canvas.

a. Click the first specified link and select the orderSum output parameter.

b. Click the second specified link and add the following expression: this.orderSumTable.UD01.Su
m(current=>current.Number01)

7. Validate and Save the workflow.

8. Close the Function Designer and save the Function.

Create an Order (Optional)

The designed Function will query the database for customer orders dated from the beginning of the current year
until present time. To be able to test the Function, you need to have a customer with orders in the current year.
You may skip this step if you have one in your database. In this example, Addison is used for testing. Addison
does not have any orders that fall within designed time period. Therefore, a new order for Addison needs to be
created.

1. In the Sales Order Entry program, go to New > New Order.

2. In the Customer field, type in Addison and click Tab.

3. From the Tool bar, go to New > New Line.

10.2.700 705
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

4. On the Lines > Detail sheet, click the Part/Rev button to select a part.
The Part Search window displays.

5. Search for and select part 00C1. Click OK in the search window.

6. Set Order Quantity to 100.

7. Save and close the order

Take note of the newly created order number. You will


need it for testing the Function call from the second BPM
Directive.

Add BPM Directive 1


After selecting a customer in a new order, this directive will invoke the previously designed Function and, if the
returned value is over 1000 dollars, show an informational message. In the end, the Directive workflow should
look like this:

1. In the Method Directives Maintenance, navigate to the Detail sheet and click the Method Code button.
The Method Search window displays.

2. Enter SalesOrder for Business Object and click Search.

3. From the search results, select the ChangeCustomer method and click OK.

4. From the Tool bar, go to New > New Post-Processing.

706 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

5. Enter a Directive Name - for example, CheckSumNewOrder.

6. Click Design.
The BPM Workflow Designer displays.

7. On the Propeties > Variables sheet, add a new variable of decimal type - for example, totalCharges.

8. From the Callers panel, select the Invoke Function widget, drag it to the canvas and connect to Start.

9. In the action statement, select MyLib for library and OrderSum for function.

10. Click the specified link to map Function parameters.

a. Bind the custNumber input parameter to the following expression: ttOrderHedRow.CustNum

b. Bind the orderSum output parameter to the Directive's totalCharges variable.

11. Add a Condition widget to the canvas and connect it to the preceding Invoke Function widget.

a. Select The specified argument/variable is equal to the specified expression condition.

b. For the first specified link, select the totalCharges variable.

c. Change is equal to to is more than.

d. Click the second specified link, and for the expression, enter 1000.

12. Add a Show Message widget to the canvas and connect it to the True end of the condition.

a. Click the designed link.


The Design Informational Message Template window displays.

b. Enter the following text with inserted totalCharges variable:


From the beginning of the year this customer has ordered goods for the amount of
<totalCharges/> dollars. Please apply a 5% discount to any new order.

c. Click OK.

13. Save and copy the entire workflow to clipboard. Close the Designer.

14. Enable and save the Directive.

Add BPM Directive 2

After adding an order number to a new shipment, this directive will invoke the previously designed Function and,
if the returned value is over 1000 dollars, show an informational message. In the end, the Directive workflow
should look like this:

10.2.700 707
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

1. In the Method Directives Maintenance, navigate to the Detail sheet and click the Method Code button.
The Method Search window displays.

2. Enter CustShip for Business Object and click Search.

3. From the search results, select the BuildShiptoList method and click OK.

4. From the Tool bar, go to New > New Post-Processing.

5. Enter a Directive Name - for example, CheckSumNewShip.

6. Click Design.
The BPM Workflow Designer displays.

7. Paste the entire workflow of the previously created Directive from the clipboard.
Note the totalCharges variable is copied to the new workflow too.

8. Select the Invoke Function widget.

a. In the action statement, click the configured link.

b. Change the expression bound to the custNumber parameter to: iShipToCustNum

c. Click OK in the Specify C# expression and Setup Function Parameters windows.

9. Select the Show Message widget and edit the message. For example:

708 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

From the beginning of the year this customer has ordered goods for the amount of <totalCharges/>
dollars. Please apply a 5% discount to handling charge.

10. Save the workflow and close the Designer.

11. Enable and save the directive.

Test Function Calls

1. Open the Sales Order Entry program.

2. From the Tool bar, click New > New Order.

3. For Customer, type in Addison and click Tab.


The BPM Directive 1 is triggered and an informational message displays:

4. Now, open the Customer Shipment Entry program.

5. From the Tool bar, click New > New Pack.

6. If you created an order for Addison in Step 2 of this walkthrough, enter its number into the Order Number
field and click Tab.

If you used a different customer, enter the number of an


order for that customer.

10.2.700 709
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

The BPM Directive 2 is triggered and an informational message displays:

You've been able to call a single Function from two different directives. You can now proceed to the next topic
and test a Function call via REST.

Calling Function via REST

In this example, you will use the Postman application to test a Function call via REST.

Epicor Functions are available in Epicor REST API v.2 only. Please
review the REST Services v.2 Guide in the Application Help
prior to completing this walkthrough.

To be able to connect to Epicor ERP server, you must pass in


a valid API Key.

1. Open Postman.

2. In the request URL field, select the POST HTTP verb.

3. Enter the request URL in the following format:


https://[EpicorServer]/[ERPInstance]/api/v2/efx/[CompanyID]/MyLib/OrderSum

710 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

If your library is not published, you must add a 'staging' segment to the URL, for example:
https://[EpicorServer]/[ERPInstance]/api/v2/efx/staging/[CompanyID]/MyLib/OrderSum

4. On the Authorization tab, select the Basic Auth authorization type and specify valid Epicor user credential
to access the application server. For example:

5. On the Headers tab, specify the following request headers:

KEY VALUE
x-api-key [API Key value]
Content-type application/json

10.2.700 711
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

6. On the Body tab, switch to raw > JSON (application/json) mode and enter the following:
{ "
custNumber":2
}

712 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

7. Click Send.
In case of success, the response body contains the value of the Function's response parameter (orderSum)
- for example as shown on the image above.

Use the Code button in the top right corner of the screen to generate call request code in the programming
language you need.

Calling Function from Client Customization

This topic explains how you can call a Function via REST from a WinForms client customization.
The Epicor REST API C# Client provides a simple way of calling Epicor Functions. Calling a Function via REST
from a WinForms client customization can be broken into four parts: creating a C# client, specifying call parameters,
executing a call, and handling the response.

Create the REST Client

This topic explains how you can create an instance of the REST API Client.

1. Add reference to the REST Client Builder assembly.


To do this, follow the steps below depending on the type of your customization project.
WinForms Client Customization

a. Enable Developer Mode and add your customization layer - for example add a new control to the
program user interface (UI).

10.2.700 713
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

b. Open the ERP program you wish to customize - for example, Tip of the Day.

c. In the Customization Tools Dialog, go to Tools > Assembly Reference Manager.


The Custom Assembly Reference Manager window displays.

d. Click Add Custom Reference.

e. From the Client folder, select the Epicor.Ice.Lib.RestClient.dll assembly and whatever contract
assemblies you intend to use.

Select All files (*.*) from the file name filter to be


able to select this assembly.

f. Click OK.
At this point, you should be able to reference the RestClientBuilder to create your REST clients. You
will want to add the following C# using declarations as well as any contract assemblies you need to work
with:
using Ice.Lib.RestClient;
using Ice.Tablesets;
using Ice.Common;

Standalone C# Project

a. Create a new project - for example, a .NET Framework 4.8 console project, or use an existing .NET project.

b. From the Client folder, add a reference to Epicor.Ice.Lib.RestClient.dll to your project.

c. Add references to whatever contract assemblies you intend to use.

If you are using this from outside the standard Epicor


client directory, then you will need to copy the
Epicor.ServiceModel.dll and Newtonsoft.Json.dll
assemblies to your execution directory.

2. Create the REST API Client.

a. Set an API Key for your client.

A valid API Key must be passed with any call against


the Epicor REST API v.2. API Keys are managed through
the API Key Maintenance program (System Setup
> Security Maintenance > API Key Maintenance).
You can set the default API key with the REST Client
Builder, as shown in the below examples, with
SetDefaultApiKey, or you can set it in the content
of each individual REST call.

The below examples show how to set the default API key as well as using a user name and password
for authentication. The second example uses basic authentication. Directly using token authentication
is currently not supported. If token authentication is required then create a client Session and use
UseSession instead.

b. If you have a client Session, you can use it to configure your client, including the Company ID that also
must be specified in any call against the Epicor REST API v.2.

714 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

In this example we are inside an Epicor WinForms customization and have access to the Session through
this.oTrans.CoreSession. This is the simplest way to create a REST client:
private const string ApiKey = "MyApiKey";
var restClient = new RestClientBuilder()
.SetDefaultApiKey(ApiKey)
.UseSession(this.oTrans.CoreSession)
.Build();

c. If you do not have a client Session, you must provide the following information: application server URL,
Company ID, API Key, and credentials. Here is a simple code sample for setting this up:
private const string ApiKey = "MyApiKey";
var restClient = new RestClientBuilder()
.SetAppServerUrl("https://host/ERP10")
.SetCompanyId("Company")
.SetDefaultApiKey(ApiKey)
.UseBasicAuthentication("UserName", "Password")
.Build();

The above approach uses basic authentication. If you


use Single Sign On, replace the
'.UseBasicAuthentication' with the following code:
.SetIsSingleSignOn(true)

Note that directly using token authentication is currently not supported. If token authentication is required,
create a client 'Session' and use 'UseSession' instead.

Specify Call Context

This topic explains how you create call content.


In call content, you need to specify a valid API Key to authenticate against the Epicor REST API and Custom
Method or Function input parameters.
If you need to specify an API key specific to your call, you can do the following:
private const string ApiKey = "MyApiKey";
var getByIdContent = new RestContent(new { mfgSys = "EP", tipNum = 123 })
.SetApiKey(ApiKey);

This works with any of the different ways of specifying the


parameters below.

There are two supported ways of making REST calls: HTTP GET and HTTP POST. Each method sends the
parameters to the server in sa lightly different way. For HTTP GET, the parameters are specified at the end of the
URL. For HTTP POST, the parameters are specified as content in the request body as a JSON document.
Additionally, there are a number of ways of building the parameters. Depending on what you are calling, parameter
names may be case sensitive. For example, names are case sensitive when calling service methods (sometimes
referred to as "custom methods"), but not when calling Epicor Functions. Order of parameters is not important.
You can use the same parameter "sets" for different calls as long as the necessary parameters are specified and
of the correct type.
The following are the examples of building parameters for HTTP GET and HTTP POST methods:

1. Anonymous Type Parameters

10.2.700 715
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

The easiest way of doing this is to use anonymous types. This is a C# feature that allows you to define classes
in a very simple and concise manner.
• For HTTP GET:
var getByIdParameters = new { mfgSys = "EP", tipNum = 123 };

• For HTTP POST:


var getByIdContent = new RestContent(new { mfgSys = "EP", tipNum = 123 })
;

Here, we are setting up the call content to call the Tip


service's GetByID method. This method takes a string
parameter named mfgSys and an integer (Int32) named
tipNum.

2. POCO Parameters
POCO (Plain Old C# Object) are classes that you define to hold your parameters. This is what anonymous
types do in a more verbose way. This would work better for sets of parameters you use more than once or
for more complex sets of parameters. The below shows how to define the class to use for parameters:
internal class GetByIdParameters
{
public GetByIdParameters(string mfgSys, int tipNum)
{
this.mfgSys = mfgSys;
this.tipNum = tipNum;
}

public string mfgSys { get; set; }

public int tipNum { get; set; }


}
• For HTTP GET:
var getByIdParameters = new GetByIdParameters("EP", 123);

• For HTTP POST:


var getByIdContent = new RestContent(new GetByIdParameters("EP", 123));

3. Dictionary Parameters
If you need to dynamically build a set of parameters then you can simply build a Dictionary<string, object>
that holds the parameters and their values - for example:
• For HTTP GET:
var getByIdParameters = new Dictionary<string, object> { ["mfgSys"] = "EP
", ["tipNum"] = 123 };

• For HTTP POST:


var getByIdContent = new RestContent(new Dictionary<string, object> { ["m
fgSys"] = "EP", ["tipNum"] = 123 });

4. JSON Parameters - HTTP POST only

716 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

All the above mechanisms for specifying a set of HTTP POST parameters convert the specified parameters
into a JSON document. If you want, you can specify the JSON content directly as a string:
var getByIdContent = new RestContent("{ \"mfgSys\": \"EP\", \"tipNum\": 123
}");

5. Query string parameters - HTTP GET only


All the above mechanisms for specifying a set of HTTP GET parameters just converts the specified parameters
into a query string in the URL. If needed, you can specify the query string directly.
var parameters = "mfgSys=EP&tipNum=123";
This approach provides most control over your parameters, however, it assumes understanding of how the
query is used.

Special considerations for HTTP GET method parameters:


• The individual values must be encoded correctly. In .NET Framework, the System.Uri class can be used to build
the URI with the correct encoding. For example, 'A & B' needs to passed as 'A %26 B'.
• Complex parameters such as DataSets or other classes need to be serialized to JSON, for example: 'https:
//localhost/ERP/api/v2/Ice.BO.SomeService/GetData?request={ "viewId": "Ice.UI
Rpt.ChgLogReport", "properties": { "layers": [ "MyLayer", "MyLayer2" ] } }'
The request parameter represents a class, defined as per the below example:
public class MyClass
{
public string ViewId { get; set; }
public MyChildClass Properties { get; set; }
}

public class MyChildClass


{
public string[] Layers { get; set; }
}

• To specify arrays using IEnumerable<>, IList<> or List<> parameter types, make sure to specify each value
separately using the same parameter, for example:
https://localhost/ERP/api/v2/Ice.BO.SomeService/GetData?value=A&value=B&value=C.
Each value in the array is specified as if it were the only value. Because the parameter is defined as one of the
above types, on the server side, it will build up the list of values from the individual values.

There is no way to send a 'null' value for the list parameter.


Any null value in the list will be lost and the value on the
server will be an empty list if no values are sent.

Execute Call

This topic explains how you execute a call against Epicor REST API.

The client currently supports Epicor Functions and Custom


Methods of the Epicor REST Services v.2. The REST client can
be used multiple times and is thread-safe.

10.2.700 717
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Asynchronous versus synchronous calls


Calls can be either synchronous or asynchronous. The asynchronous methods all have Async at the end of the
method name. When calling from a WinForms customization, you will usually use the synchronous calling style.
In other areas, you should default to asynchronous calls, if possible. Asynchronous programming gives a good
overview of asynchronous programming in C#.
Asynchronous calls can be used from the WinForms client, but are more complicated than synchronous calls. For
example, you can use the standard C# async/await style, on an event such as a button Click. When you call
the REST server, the Click event will immediately return before the server responds. If the server call takes a long
time, such as 20 seconds, the user will see control being returned to the UI and they will be able to do whatever
they like including closing the UI. If you choose to use asynchronous calls, you may want to disable the UI before
making the call. In any case, understand that there are additional complexities you need to consider when using
asynchronous calls.

Calling Epicor Functions


Epicor Functions require you to specify the library and Function names. You can also specify whether you are
calling the staged (unpublished) or published version of the Function:
• Sync Call
var getByIdResponse = restClient.Function.Post("LibraryName", "FunctionName",
getByIdContent, published: true);

• Async Call
var getByIdResponse = await restClient.Function.PostAsync("LibraryName", "Fun
ctionName", getByIdContent, published: true);

Calling Custom Methods


Calling a Custom Method of a REST Service requires specifying the service and method names. You can find the
service name, method name, parameters and return values in the Epicor REST API v.2 Interactive Help Page that
can be found at the following URI: https://[EpicorServer]/[ERPInstance]/api/help/v2/.
Please refer to the REST Service v.2 Guide in the Application Help (System Management > Working with
System Management > REST Services v.2) for details on the latest version of the Epicor REST API.

• For HTTP GET:


• Sync Call
var getByIdParameters = new { mfgSys = "EP", tipNum = 123 };
var getByIdResponse = restClient.Service.Get("Ice.BO.TipSvc", "GetByID", g
etByIdParameters);

• Async Call
var getByIdParameters = new { mfgSys = "EP", tipNum = 123 };
var getByIdResponse = await restClient.Service.GetAsync("Ice.BO.TipSvc", "
GetByID", getByIdParameters);

• For HTTP POST:


• Sync Call
var getByIdContent = new RestContent(new { mfgSys = "EP", tipNum = 123 });
var getByIdResponse = restClient.Service.Post("Ice.BO.TipSvc", "GetByID",
getByIdContent);

718 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

• Async Call
var getByIdContent = new RestContent(new { mfgSys = "EP", tipNum = 123 });
var getByIdResponse = await restClient.Service.PostAsync("Ice.BO.TipSvc",
"GetByID", getByIdContent);

Handle Response

This topic explains how you handle different types of response.


Like the content you send, the response that comes back can be processed in many different ways. As with
parameters, in some cases you must be case-specific in your naming and in some you don't.
The different "get result" methods described below are extension methods. To see and use them, you must add
a using declaration for the Ice.Lib.RestClient namespace:
using Ice.Lib.RestClient

1. JSON Response
All communications between the client and the server are done through JSON. You can use this directly,
but it requires fiddling around more than you might want to do:
var functionResult = functionResponse.GetJsonResult();
The response will look something like this:
{
"nextTipNum": 124
}
where nextTipNum is the Function's response parameter.

You have to be careful using this because the serializer


will assume data types since there is no way to determine
the exact type just from the returned JSON. Use the other
get result methods if you want guaranteed data types.

2. Dynamic Response
C# has the dynamic type allows you to use the GetJsonResult and code more easily. Simply change the
returned type to dynamic as shown here:
dynamic functionResult = functionResponse.GetJsonResult();

Data types will be assumed as they are when using the


JSON response directly.

3. Anonymous Type Response


If your result is simple enough, you can use an anonymous type as we did for the call content. You define
the structure of the result data by creating an instance of the anonymous class. This is a much shorter syntax
than defining your own C# class. Note that you actually create an instance of your anonymous class specifying
values of the appropriate types. The instance you create is not actually used so the values you specify do
not matter - for example:
var functionResult = functionResponse.GetAnonymousResult(
new { nextTipNum = 0 });

4. POCO Response

10.2.700 719
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

If you choose, you can define the response as a C# class and specify it as the result value - for example:
var updateResult = updateResponse.GetTypedResult<UpdateResponse>();
...
private class UpdateResponse
{
public TipTableset ds { get; set; }
}

Scheduling Functions

Use the Schedule Epicor Function program to define when your Function is executed.
The Function scheduling functionality can be used for automation of various one-time or recurring tasks - for
example, processing files from a folder, dropping files in a cloud storage, reading emails from a pop3 account,
etc.

A Function can only be executed when called from a Company


authorized in its library.

Schedule a Function

This topic explains how you can schedule a Function.

1. Launch the Schedule Epicor Function program.


Menu Path: System Management > Business Process Management > Schedule Epicor Function.

2. Click the Library ID button.


The Library Search window displays.

3. Click Search to search for all libraries in the system - both published and unpublished.
You can use the Library ID Starts With field and the In Production check box limit your search.

4. Select a library from the search results.


The selected library ID and description display in the form.

5. Select a Function from the Function ID drop-down list.


The ID and description of the selected Function display in the form. If the selected Function has request
parameters, they display under the Parameters section.

6. Specify values for the Function input parameters.

7. From the Schedule drop-down list, select one of the available options:
• Now - Select this option to run Function immediately.
• Startup Task Schedule - Select this option to run Function at client startup.
This list also contains any other user-defined schedule(s) created for your company.
Select the Recurring check box to indicate that the Function should be run on a repeating basis. It is
available only if a schedule other than Now is selected.

8. Select File > Submit or click the Submit icon in the Tool Bar to submit the task to the System Agent.

720 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

If you need to run this task as part of a Process Set, click the Save Process Set icon in the Tool Bar instead.

Process Sets can contain an extensive number of tasks -


like reports, processes, executive queries, and Functions.
When a process set is activated by the System Agent,
these tasks are automatically run through a sequence you
define. You use this functionality to automate many tasks
throughout your Epicor ERP application.

Installing Libraries

This section explains how you can install a Function library as part of a solution.

Only Security Managers (on premises installations and Cloud


ERP) and Global Security Managers (multi-tenant environments)
can access Solution Workbench where they can build and install
solutions with Epicor Function library elements. Additionally,
make sure the user account has the following options enabled:
• Can Create Solutions - for creating new solutions
• Can Install Solutions - for installing solutions

In Solution Workbench, you can add only one library to a solution. When you install a library, it is automatically
published (promoted to production). Installed libraries cannot be demoted from production.
By default, Solution Workbench installs the library to the current Company in upgrade mode trying to overwrite
the previously installed (if at all) version of this library. The upgrade of a library does not affect its company
mapping. However, if the existing library does not have a mapping to the current Company, such mapping is
added during the upgrade.

Solution Tracking does not support Epicor Functions.

Add Library to Solution

This topic contains steps for adding a Function library to a solution.

1. Open Solution Workbench and create a new solution per standard procedure.
Menu Path: System Management > Solution Management > Solution Workbench

This program is not available in Epicor Web Access.

Please refer to Solution Workbench documentation in


Application Help for detailed information on CRUD
operation related to solutions.

10.2.700 721
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

2. Select ALL for Solution Type.

3. Click the Add to Solution button.


The Solution Element Search window displays.

4. From the Available Elements list, select EfxLibrary and click Search.
The Advanced Element Search window displays.
Alternately, on the Solution Element Search window, navigate to the User Defined sheet. Click Get
Adapters, select the LibrarySearchAdapter and click Search to launch the standard library search
window.

5. Click Search again. If necessary, use the Starting At field to enter criteria that will narrow the search.

Disabled libraries and libraries that have previously been


installed in the system as part of a solution are not
available for selection and do not display in search results.
Only one library can be added to a solution.

6. Select the library from the Search Results - for example, MyLib, and click OK.
The library is added to the Selected Items list.

7. Click Add to Solution.


The library is added to the Detail > Solution sheet.

722 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

8. Build the solution.


A .cab solution file is saved to the specified location.

In case there already is a library with the same ID in your system, when you install the solution, you are prompted
to confirm the update of the existing library record. Click Yes to continue or No to abort the installation. If you
click Yes, the system then verifies the OriginalID and GlobalID of the library being installed and the existing
one match and performs the update, otherwise the installation fails.
Functions from installed libraries are exposed to BPM, other library, or REST calls just like the Functions created
and designed through Epicor Functions Maintenance. However, you cannot demote installed libraries from
production. You can change their company mapping and disable/enable the library and/or its Functions. All other
changes to the library are done through reinstallation of the solution.

Debugging Function Source Code

You can enable dumping of the Function's source code for further debugging.
To do this:

1. In the appSettings section of the web.config file (<...>\Server\web.config), add this property:
<add key="DumpEfxSources" value="true" />

Logic Function's source files are saved on the server if


this property is present in the web.config file and its value
is set to true. If it's not added to web.config or is set to
false, the source files are not saved.

2. Verify the customizationSettings are enabled and the intermediateFolder setting contains a valid path
and the value of the loadPdb parameter is set to true - for example:
<customizationSettings disabled="false" intermediateFolder="C:\inetpub\wwwr
oot\ERP102500\Server\BPM" loadPdb="true">

This is the default location for the Functions' source files.


You can define your own location.

Once this setup is complete, every time you save a Function in Epicor Functions Maintenance, its C# source
code is saved to the specified location. After the first save, the system creates a path for source files in the

10.2.700 723
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

following format: <...>\Sources\#Efx\efx.[LibraryID]\[Revision]\. For example, if you keep the default


BPM intermediateFolder, the system puts the files into the following location:
C:\inetpub\wwwroot\ERP102500\Server\BPM\Sources\#Efx\efx.testlib\1. When a subsequent revision
of a Function is saved, the system creates folder 2, 3, etc.:

3. To debug the code, open the folder containing source files in a code editor:

724 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Case Studies

This section of the chapter explores some step-by-step case studies. Each case study explains a different aspect
of the functionality you can leverage within the BPM module.

Make a Field Mandatory

Many customers want to ensure when they create new parts, they have a part class or product group named. In
this example, the naming depends on whether the part type is purchased or manufactured. This example
demonstrates the Business Process Management (BPM) features to make a field mandatory based on a condition.
Key concepts are:
• Use built-in BPM functionality.
• Use conditional actions.

Select Business Object Method


In this task, create a new method directive using the Update method of the Part Business Object.
Navigate to Method Directives.
Menu Path: System Management > Business Process Management > Method Directives Maintenance

This program is not available in Epicor Web Access.

1. On the Detail sheet, click the Method Code button.

2. The Method Search window displays.

10.2.700 725
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

3. In the Search by Service section, verify ERP is selected for the System Code.
By selecting this option, the services belonging to the application part of the system become available for
selection.

4. In the Type field, select Business Object.

5. In the Service Name field, select Part.

6. In the Where Method Name Starts At field, enter update.

7. Click Search.

8. In the Search Results grid, select the Update method.

9. Click OK.
The Business Object returns on the form.

10. In the Method Description field, enter Set Part Class or Product Group as Mandatory.

726 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

11. Click Save.

Add a Pre-Processing Directive

1. From the New menu, select New Pre-Processing.

2. In the Directive Name field, enter Mandatory Part Class and Group.

10.2.700 727
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

3. In the Group field, enter My Group.


This field signifies the group to which the current directive belongs. You can select an existing value or enter
a value to create a new group. This field is optional but can help organize directives for searches and is used
when exporting directives.

4. Click Save.

5. Click Design to launch the BPM Workflow Designer.


The available workflow items display on the left portion of the screen. In the following tasks, you will use
the items to build a BPM workflow.

Add First Condition

1. In the workflow items toolbar, click the Condition icon and drag it to the workflow pane of the Designer,
below the Start item.

2. Hover your mouse over the Start item.


The small black triangles surrounding the item represent the available connectors.

728 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

3. Click your mouse, select any of the Start connector symbols, drag the line and point it to any of the Condition
element entry points.
The connection between the two elements is now established.
You will now build the first condition that checks if the Part Type is set to Purchased and Part Class is empty.

4. In the workflow, click the Condition item.

5. In the Condition pane at the bottom, click the Add Line icon.

6. In the Condition field, invoke the list and select The specified field of the changed row is equal to the
specified expression.

7. Click the first specified.

8. In the Table field, verify ds.Part displays.

The Table selection dialog displays the dataset tables


included in the current method parameters (arguments).
The ds prefix is the name of the method parameter of
tableset type that contains a dataset table (Part). ds.Part
is an in-memory table used to validate data before it is
saved to your physical database.

9. In the Fields search box, enter type.

10. From the list of available fields, select the TypeCode check box.

11. Click OK.

12. At the end of the Condition field, click specified.

10.2.700 729
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

13. In the Editor text box, enter "P" (this expression stands for Purchased parts, remember to include the
quotation marks).

14. Verify the directive is able to resolve the expression you entered. To do so, click the Check Syntax button.
Note the validation process reacts on:
• Empty Expression Statement
• Syntax Error
• Security Issue (non-advanced BPM users)

15. To the Syntax is OK message, click OK.

16. In the Specify C# expression window, click OK to close it.

Each expression is automatically validated after you press


the OK button. If BPM encounters a validation error, a
warning message is presented to the user. If the user
decides to accept a wrongly configured expression, the
corresponding action or condition is marked as invalid.

Extend First Condition

1. In the Condition pane, click the Add Line icon.

730 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

2. In the second line, in the Operator field, verify And displays.

3. In the Condition field, from the list, select the specified field of the changed row is equal to the
specified expression.

4. Click the first specified.

5. In the Table field, verify ds.Part displays.

6. Select the ClassID field name check box.

7. Click OK.

8. At the end of the Condition field, click specified to launch the Specify C# expression window.

10.2.700 731
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

9. In the Editor text box, enter "" (quotation marks represent a blank).

10. In the Specify C# Expression window, click OK.

11. The Condition pane should now read:

Operator Prefix Condition Postfix


None The ds.Part.TypeCode field of the changed row is equal to
the "P" expression
And The ds.Part.ClassID field of the changed row is equal to the
"" expression

732 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

This states that when the Type field in Part Maintenance of the changed row is P (for Purchased) and the
Class field of the changed row is blank, execute the following action(s). You will define these actions in the
following workshops.

12. Click Validate and verify BPM reports no errors.

Add First Action


Complete this step to display an error message which halts user actions. This action will display when the condition
evaluates to True, which means, when in a purchased part, the Part Class field is left blank.

1. In the workflow items tollbar, click the Raise Exception icon and drag it to the workflow pane of the
Designer, below the Condition item.

10.2.700 733
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

2. Click the Condition element.

3. On the left side of the Condition element, verify True displays.

4. Select the True exit point, drag the line and point it to any of the Raise Exception element entry points.

5. Click the Raise Exception element.

6. In the Actions pane, verify raise exception based on the designed template displays.

7. Select designed to launch the Design Exception Template window.

8. In the Name field, enter Mandatory Part Class.

9. For the Severity level, select Warning.

10. In the text box, enter Purchased parts must have a Part Class - BPM.

11. In the Design Exception Template window, click OK.

12. The Actions pane should now read:

Action Name Action Terminate on error


Raise Exception 0 Raise exception based on the Mandatory Part selected
Class template

734 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

You are now ready to extend the workflow by adding a second condition to make the Group field mandatory
for manufactured or kit parts.

Add Another Condition


Recall the first Condition evaluates to True when purchased part has no part class selected. When this condition
is not met, for example, when the Update Method is triggered with manufacturing or sales kit part in focus, the
BPM Condition sends the information to the False exit point and routes the BPM using another workflow branch.
You will now add another Condition that will be called when first condition evaluates to False. This condition
checks if manufacturing or kit parts have the part group selected. If not, the BPM will raise another exception.

1. In the workflow items tollbar, click the Condition icon and drag it to the workflow pane of the Designer,
to the right of the first Condition.

10.2.700 735
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

2. Create a connection between the False end of the first Condition and any entry point of the second
Condition.

3. In the workflow, click the newly added Condition widget.

4. In the Condition pane at the bottom, click the Add Line icon.

5. In the Condition field, invoke the list and select The specified field of the changed row is equal to the
specified expression.

6. Click the first specified.

7. In the Table field, verify ds.Part displays.

8. In the Fields search box, enter type.

9. From the list of available fields, select the TypeCode check box.

10. Click OK.

11. At the end of the Condition field, click specified.

736 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

12. In the Editor text box, enter "M" for (Manufactured, including the quotations).

13. In the Specify C# expression window, click OK.

Check for Sales Kit Part

1. In the Conditions window, click the Add Line icon.

10.2.700 737
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

2. In the Operator field, select Or.

3. In the Condition field, invoke the list and select The specified field of the changed row is equal to the
specified expression.

4. Click the first specified.

5. In the Table field, verify ds.Part displays.

6. In the Fields search box, enter type.

7. From the list of available fields, select the TypeCode check box.

8. Click OK.

9. At the end of the Condition field, click specified.

10. In the Editor text box, enter "K" for Sales Kit, including the quotations.

11. In the Specify C# expression window, click OK.


You now extend the condition by adding another line.

Extend Second Condition

1. In the Condition pane, click the Add Line icon.

738 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

2. In the third condition line, in the Operator field, verify And displays.

3. In the Condition field, from the list, select the specified field of the changed row is equal to the
specified expression.

4. Click the first specified.

5. In the Table field, verify ds.Part displays.

6. In the Fields search box, enter prod.

7. Select the ProdCode field name check box.

8. Click OK.

9. At the end of the Condition field, click specified.

10.2.700 739
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

10. In the Editor text box, enter "" (recall quotation marks represent a blank).

11. In the Specify C# Expression window, click OK.

12. You need the PartTypeCode statements to logically resolve first. To do this, place a open parenthesis in the
Prefix column for the first statement.

740 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

13. Now in the second statement, place a closing parenthesis in the Postfix column.
This indicates these statements evaluate first. If they resolve to true, the logic next checks the third statement.

14. The Condition pane should now read:

Operator Prefix Condition Postfix


( The ds.Part.TypeCode field of the changed row is equal to the
"M" expression
Or The ds.Part.TypeCode field of the changed row is equal to the )
"K" expression
And The ds.Part.ProdCode field of the changed row is equal to the ""
expression

This states when the Type field in Part Maintenance is M (for manufactured) or K (for sales kit) and the
Group field blank, then execute the following workflow action.

15. Click Validate and verify BPM reports no errors.

Add Second Action


This action will display when the second condition evaluates to True, which means, when in a manufactured or
kit part, the Part Group field is left blank.

1. In the workflow items tollbar, click the Raise Exception icon and drag it to the workflow pane of the
Designer, below the second Condition item.

10.2.700 741
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

2. Click the Condition 1 widget.

3. Connect the True end of the Condition to the Raise Exception 1 widget.

4. Click the Raise Exception 1 widget.

5. In the Actions pane, verify raise exception based on the designed template displays.

6. Select designed to launch the Design Exception Template window.

7. In the Name field, enter Mandatory Group.

8. For the Severity level, select Warning.

9. In the text box, enter Group is mandatory for manufactured or kit parts - BPM.

10. In the Design Exception Template window, click OK.

11. The Actions pane should now read:

Action Name Action Terminate on error


Raise Exception 1 Raise exception based on the Mandatory selected
Group template

742 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

12. Click Validate and verify the BPM reports no errors.

13. Click Save and exit the BPM Workflow Designer .

14. On the Pre-Processing > Detail sheet, select the Enabled check box.

10.2.700 743
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

15. Click Save.

Test the BPM for the Part Class


Navigate to Part Maintenance.
Menu Path: Sales Management > Order Management > Setup > Part

1. In the Part field, enter a new part. In this example, enter MyNewPart.

2. In the Add New Confirmation dialog box, click Yes.

3. In the Description field, enter Purchased Part.

4. Leave the Type field as Purchased.

5. Click Save.
The first BPM condition is met and the exception message is fired.

6. To the error message from the BPM that says you must specify a Part Class, click OK.

744 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

7. In the Class field, select Hardware.

8. Click Save.
The part saves with no errors.

9. Remain in Part Maintenance.

Test the BPM for the Part Group

1. To test the second branch of the BPM workflow, click New to enter a new part.

2. In the Part field, enter MyMfgPart.

3. In the Description field, enter Manufactured Part.

4. In the Type field, select Manufactured and click Save.


The second BPM condition is now met and activates the exception.

10.2.700 745
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

5. To the error message from the BPM that says you must specify a Group field, click OK.
To test the second part of the condition, select Sales Kit for the part Type and verify the same exception
displays.

6. To the error message, click OK.

7. In the Group field, select Configured Parts.

8. Click Save.
The part now saves with no errors.

Create and Use a Hold Type

BPM Holds can prohibit data transaction processing for specified reasons. In this example, a simple condition
checks if the State field is entered for a Customer record. If not, a Customer Review BPM hold is attached to
the record. You then prevent creation or update of sales orders for customers on a Customer Review hold.
In this example, place or remove the hold during the Post Update process for a customer. You do not want to
accidentally place a record on hold before it passes through validation and update. It is not possible to use
condition tests that rely on the RowMod identifier (Add, Update, or Delete) during the Post Update Process.
Use a Pre-Processing directive to test for conditions to place or remove holds, but use a Post-Processing directive
to perform the actions.

Create the Hold Type


Navigate to Hold Type Maintenance.
Menu Path: System Management > Business Process Management > Hold Type Maintenance

This program is not available in Epicor Web Access.

1. Click New.

746 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

2. In the Hold Type field, enter Customer Review.

3. Click the Business object button.

4. In the Starting At field, enter Cus and click Search.

5. Select Customer and click OK.

6. In the Description field, enter Customer Review.

10.2.700 747
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

7. Click Save.

8. Exit Hold Type Maintenance.

Select Business Object Method


Navigate to Method Directives.
Menu Path: System Management > Business Process Management > Method Directives Maintenance

This program is not available in Epicor Web Access.

1. On the Detail sheet, click the Method Code button.

748 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

2. The Method Search window displays.

3. In the Search by Service section, verify ERP is selected for the System Code.
When you select this option, the services that belong to the application part of the system become available
for selection.

4. In the Type field, select Business Object.

5. In the Service Name field, select Customer.

6. In the Where Method Name Starts At field, enter u.

7. Click Search.

8. Select the Update method and click OK.


The Business Object returns on the form.

9. In the Method Description field, enter Customer Review.

10.2.700 749
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

10. Click Save.

Add a Pre-Processing Directive

1. From the New menu, select New Pre-Processing.

2. In the Directive Name field, enter Condition Test to Set Hold.

750 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

3. Click Design to launch the BPM Workflow Designer.

4. In the workflow items tollbar, click the Condition icon and drag it to the workflow pane of the Designer,
below the Start item.

10.2.700 751
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

5. Click your mouse, select any of the Start connector symbols, drag the line and point it to any of the Condition
element entry points.
The connection between the two elements is now established.

6. In the workflow, click the Condition item.

7. In the Condition pane at the bottom, click the Add Line icon.

8. In the Condition field, invoke the list and select The specified field of the changed row is equal to the
specified expression.

9. Click the first specified.

10. In the Table field, verify ds.Customer displays.

11. In the Fields search box, enter Sta.

12. From the list of available fields, select the State check box.

13. Click OK.

14. At the end of the Condition field, click specified.

15. In the Editor text box, enter "".


This indicates that directive should execute when the Customer.Update method initiates and the State
field is blank.

752 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

16. In the Specify C# expression window, click OK.

Add an Action

1. In the workflow items tollbar, click the Enable Post Directive icon and drag it to the workflow pane of
the Designer, below the Condition item.

2. Click the Condition's True exit outbound connector (found on the left) and connect it to any of the Enable
Post Directive entry points.

3. Click Validate and verify the BPM reports no errors.

4. Click Save and exith the BPM Workflow Designer to return to Method Directives.

5. Select the Enabled check box.

10.2.700 753
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

6. Click Save.

Add a Pre-Processing Directive

1. From the New menu, select New Pre-Processing.

2. In the Directive Name field, enter Condition Test to Remove Hold.

754 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

3. Click Design to launch the BPM Workflow Designer.

4. In the workflow items tollbar, click the Condition icon and drag it to the workflow pane of the Designer,
below the Start item.

5. Click your mouse, select any of the Start connector symbols, drag the line and point it to any of the
Condition element entry points.

10.2.700 755
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

6. In the workflow, click the Condition item.

7. In the Condition pane at the bottom, click the Add Line icon.

8. In the Condition field, invoke the list and select The specified field of the changed row is equal to the
specified expression.

9. Click the first specified.

10. In the Table field, verify ds.Customer displays.

11. In the Fields search box, enter Sta.

12. From the list of available fields, select the State check box.

13. Click OK.

14. In the Condition field, click the drop-down next to is equal to.

15. From the list, select is not equal to.

16. At the end of the Condition field, click specified.

756 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

17. In the Editor text box, enter "".


This indicates that directive should execute when the Customer.Update method initiates and the Customer
State field is NOT blank.

18. In the Specify C# expression window, click OK.

Add an Action

1. In the workflow items tollbar, click the Enable Post Directive icon and drag it to the workflow pane of
the Designer, below the Condition item.

10.2.700 757
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

2. Click the Condition's True exit outbound connector (found on the left) and connect it to any of the Enable
Post Directive entry points.

3. Click Validate and verify the BPM reports no errors.

4. Click Save and exit the BPM Workflow Designer to return to Method Directives.

5. Select the Enabled check box.

6. Click Save.

Add a Post-Processing Directive

1. From the New menu, select New Post-Processing.

758 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

2. In the Directive Name field, enter Take Customer Off Hold.

3. Click Design to launch the BPM Workflow Designer.

4. In the workflow items tollbar, click the Condition icon and drag it to the workflow pane of the Designer,
below the Start item.

10.2.700 759
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

5. Click your mouse, select any of the Start connector symbols, drag the line and point it to any of the
Condition element entry points.

6. In the workflow, click the Condition item.

7. In the Condition pane at the bottom, click the Add Line icon.

8. In the Condition field, invoke the list and select this directive has been enabled from the specified
directive.

9. In the Condition text, click specified.

10. In the Stage field, verify Pre (Pre-Processing directive) is selected.

11. In the Directive field, select Condition Test to Remove Hold and click OK.
This way, you specify which pre-processing directive enables the post-processing directive you are currently
configuring.

Add an Action

1. In the workflow items tollbar, click the Remove Holds icon and drag it to the workflow pane of the Designer,
below the Condition item.

760 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

2. Click the Condition's True exit outbound connector (found on the left) and connect it to any of the Remove
Holds entry points.

3. Click the Remove Holds item.

4. Verify the Action displays Remove holds of the specified type.

5. In the Action text, click specified.

6. In the Hold Type field, select Customer Review and click OK.
Recall you created this hold type at the beginning of this workshop.

7. Click Validate and verify the BPM reports no errors.

8. Click Save and exit the BPM Workflow Designer to return to Method Directives.

9. Select the Enabled check box.

10.2.700 761
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

10. Click Save.

Add a Post-Processing Directive


Add a Post-Processing Directive to set the hold.

1. From the New menu, select New Post-Processing.

2. In the Directive Name field, enter Place Customer on Hold.

762 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

3. Click Design to launch the BPM Workflow Designer.

4. In the workflow items tollbar, click the Condition icon and drag it to the workflow pane of the Designer,
below the Start item.

5. Click your mouse, select any of the Start connector symbols, drag the line and point it to any of the
Condition element entry points.

6. In the workflow, click the Condition item.

7. In the Condition pane at the bottom, click the Add Line icon.

10.2.700 763
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

8. In the Condition field, invoke the list and select this directive has been enabled from the specified
directive.

9. In the Condition text, click specified.

10. In the Stage field, verify Pre (Pre-Processing directive) is selected.

11. In the Directive field, select Condition Test to Set Hold and click OK.
This indicates the directive should execute after the Condition Test to Set Hold directive executes.

Add an Action

1. In the workflow items tollbar, click the Attach Hold icon and drag it to the workflow pane of the Designer,
below the Condition item.

2. Click the Condition's True exit outbound connector (found on the left) and connect it to any of the Attach
Hold entry points.

3. Click the Attach Hold item.

4. Verify the Action displays Attach hold of the specified type.

5. In the Action text, click specified.

6. In the Hold Type field, select Customer Review.

7. In the Comment field, enter BPM Hold - Customer.Update and click OK.

8. Click Validate and verify the BPM reports no errors.

9. Click Save and exit the BPM Workflow Designer to return to Method Directives.

764 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

10. Select the Enabled check box.

11. Click Save.

Add a Method Code


Now you will create another method directive for the Sales Order business object. The directive will raise an
exception when a customer used on a sales order does not have the State field specified in Customer Maintenance.

1. Click the Method Code button.

10.2.700 765
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

2. In the Search by Service section, keep the default values in the System Code and Type fields - ERP and
Business Object, respectively.

3. In the Service Name field, select SalesOrder.

4. In the Where Method Starts At field, enter master.

5. Click Search.

6. Verify the MasterUpdate method is selected and click OK.

766 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

7. The method defaults to Erp.BO.SalesOrder.MasterUpdate.

8. Enter a brief Description. In this example, enter Check Customer Record.

9. Click Save.

10.2.700 767
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Add a Post-Processing Directive

1. From the New menu, select New Post-Processing.

2. In the Directive Name field, enter Customer Sales Order.

3. Click Design to launch the BPM Workflow Designer.

4. In the workflow items tollbar, click the Condition icon and drag it to the workflow pane of the Designer,
below the Start item.

768 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

5. Click your mouse, select any of the Start connector symbols, drag the line and point it to any of the Condition
element entry points.

6. In the workflow, click the Condition item.

7. In the Condition pane at the bottom, click the Add Line icon.

8. In the Condition field, invoke the list and select the hold of the specified type is attached to the
business object.

9. Click specified type is attached to the business object.

10. The Select Business Object window displays.

10.2.700 769
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

11. Expand the following nodes: Erp.SalesOrder > Objects, linked with the object "Erp.Sales Order" >
via OrderHed.

12. Select the first Erp.Customer object.

13. In the Hold Type field, verify XXX Customer Review (where XXX are your initials) and is attached
populates.

14. In the Select Business Object window, click OK.


This indicates the directive should execute when the MasterUpdate method is called and the customer on
the order is on Customer Review hold.

Add an Action
Define an action to display an exception message.

1. In the workflow items tollbar, click the Raise Exception icon and drag it to the workflow pane of the
Designer, below the Condition item.

770 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

2. Click the Condition element.

3. On the left side of the Condition element, verify True displays.

4. Select the True exit point, drag the line and point it to any of the Raise Exception element entry points.

5. Click the Raise Exception element.

6. In the Actions pane, verify raise exception based on the designed template displays.

7. Select designed to launch the Design Exception Template window.

8. In the Name field, enter Customer Hold.

9. In the text box, enter This customer is on hold because a required field has not been entered - BPM.

Since you created a Post-Processing directive, this action


executes after the base method executes completely and
specified conditions are met.

10. In the Design Exception Template window, click OK.

11. Click Validate and verify BPM reports no errors.

12. Click Save and exit the BPM Workflow Designer to return to Method Directives.

13. Click the Enabled check box.

10.2.700 771
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

14. Save the directive.

Test the BPM


Menu Path: Sales Management > Order Management > General Operations > Order Entry

1. To test the BPM, enter a sales order for a customer with no State defined in master record. When you add
a customer to an order, the application displays an exception. In this example, remove the State entry for
the customer Addison.

772 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

2. Navigate to Sales Order Entry.


Menu Path: Sales Management > Order Management > General Operations > Order Entry

3. Click New.

10.2.700 773
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

4. In the Customer field, enter Addison.

5. Save the record.

6. The BPM detects the hold is attached to the selected customer and fires the exception message. At this
stage, a user is prevented to complete the order until the customer has a valid state entered in the customer
master record. To the message, click OK.

7. To test the BPM Hold removal, return to Customer Maintenance. In the State field, enter WI (Wisconsin).

774 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

8. Save the record.


As a result, the BPM Hold is removed from the customer record.

9. Navigate back to Sales Order Entry and click Save.


The exception message no longer displays, allowing you to complete the order.

10.2.700 775
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Use Auto Print Action

You can use BPM to automatically preview or print a report when a data directive executes.
To configure the Auto Print action, select a report, a printer, and print options, and configure the mapping of
input values for report parameters. The Auto Print action is typically triggered after a certain condition is met.
In this example, you create a standard data directive for the OrderHed table to preview the Sales Order
Acknowledgment report. When a user selects the Auto-Print Ready check box and saves the sales order, the
print preview window appears. The current sales order displays in this window.

Locate the OrderHed Table


Navigate to Data Directives.
Menu Path: System Management > Business Process Management > Data Directives Maintenance

This program is not available in Epicor Web Access.

1. Click the Table button.

776 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

2. The Table Search window displays.

3. Verify Search by Table option is selected.

4. In the Table Name Starting At field, enter Order.

5. Click Search.

6. Select OrderHed and click OK.

Add Standard Directive

1. Click New and select New Standard Directive.

2. In the Directive Name field, enter Auto Print.

10.2.700 777
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

3. Click Design to launch the BPM Workflow Designer.

4. Click the Condition icon and drag it to the workflow pane of the Designer, below the Start item.

5. Create a connection between the Start and Condition elements.

6. In the workflow, click the Condition item.

7. In the Condition pane at the bottom, click the Add Line icon.

8. In the Condition field, invoke the list and select The specified field has been changed from any to
another.

778 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

9. Click the specified link.

10. In the Table field, verify ttOrderHed displays.

11. From the list of available fields, select the AutoPrintReady check box and click OK.

12. Click the another link.

13. Clear the Any Value check box.

14. In the Value field, select true and click OK.


This condition will trigger the subsequent action when a user selects the Auto-Print Ready check box found
on Sales Order's Summary sheet.

Add an Action

1. In the workflow items tollbar, click the Auto Print icon and drag it to the workflow pane of the Designer,
below the Condition item.

10.2.700 779
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

2. Click the Condition's True exit outbound connector connect it to any of the Auto Print entry points.

3. Click the Auto Print workflow element.

4. In the Actions pane, verify Automatically print specified report with specified options with rule
displays.

5. Click the first specified link.

6. In the search dialog box, the Basic tab presents fields for entering search criteria specific to reports.

7. In the Report Type, select the available type of report you want to use. In this example, select SQL Server
Reporting (SSRS) type.

8. In the Report Table Level field, select 'OrderHed' is the Primary table option.
This means only the reports where OrderHed is defined as the primary table will become available for
selection.

9. Click Search.

10. From the list, select OrderAck (Sales Order Acknowledgment) and click OK.

780 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

11. Click the specified link.

12. In the Run Schedule field, verify Immediate displays.


This means the action will execute right after the condition is satisfied.

10.2.700 781
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

13. In the Print Action field, you can select if you want to automatically send the report to the printer or if you
want to preview it first. In this example, select Auto Preview.

Define Report Parameters

Now you must specify the Report Parameters. On this sheet, you can add or edit the actions associated with
the listed parameters so that values can be passed to the report in the context of the Auto Print action.

1. Select the Report Parameters sheet.

2. The Sales Order Acknowledgment report uses the OrderList parameter to define which orders are to be
printed or print-previewed. In the OrderList parameter, click the arrow on the right-hand side and select
The specified expression.

3. Click the specified link to launch the Specify C# expression window.

4. From the Available variables, expand ttOrderHed table and double-click the OrderNum column. This
adds ttOrderHedRow.OrderNum into the expression.

5. Within the expression, you want to convert the selected sales order number to a string and pass it as a
parameter to the report. From the list of available Functions, expand the String category and double-click
the x.ToString() function.

6. The Editor pane now displays the following expression:


ttOrderHedRow.OrderNum.ToString()

7. Click OK.

8. The OrderList parameter is now set to the expression you created.

782 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

9. In the Set up Auto Print window, click OK.

10. Now click the with rule link.

10.2.700 783
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

11. The Execution Rule window displays. Use the options on this window to determine how rows will update
for a selected table.

12. Depending on the table selected for the data directive, different rule options are active. For this example,
select the For each matching radio button option.

13. Now click the table drop-down list to select the temporary table (tt) that will use the execution rule. For
this example, verify the ttOrderHed temporary table displays.
Temporary tables contain the updated rows in memory before they save to the actual database. When
you define a row rule, you determine how the row updates the database when the transaction is complete.

14. Click OK.

15. Click Save and exit the BPM Workflow Designer to return to the Data Directives window.

16. Select the Enabled check box to activate the directive.

17. Click Save.

The data directive is now active.

Test the BPM

Next test the directive to verify it displays a preview of the Sales Order Acknowledgment when a user selects the
Auto-Print Ready check box.
Navigate to Sales Order Entry.

784 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Menu Path: Sales Management > Order Management > General Operations > Order Entry

1. Click New > New Order.

2. Enter a Customer, in this example, you create a new order for the customer Dalton.

3. Click New > New Line.

4. On the Lines Detail sheet at the bottom, enter the order details. In this example, enter the following
information:

Field Value
Part DSS-1010
Order Quantity 10

5. Select the Auto-Print Ready check box.

6. Click Save.

7. The Sales Order Acknowledgement report automatically displays for the order in focus.

10.2.700 785
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

® ®
You could now use Adobe Reader to save the report in a location you need. You can also print out a hard
copy of the report as well.

Use Fill Table By Query and Invoke BO Method

In this example, assume that on a customer record, a value in the City field has been modified. You want to alert
the sales department within your company that any open orders for that customer should be updated to reflect
this change. To log the information, use one of the delivered user-defined tables UD01.
Key concepts:
• Create a directive level variable
• Create a BPM Query referencing both in-memory (records being updated) and standard database tables
(existing records)
• Prepare data for the Business Object method call

Select Business Object Method


Navigate to Method Directives.
Menu Path: System Management > Business Process Management > Method Directives Maintenance

This program is not available in the Epicor Web Access.

1. On the Detail sheet, click the Method Code button.


The Method Search window displays.

786 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

2. In the Search by Service section, verify ERP is selected for the System Code.
When you select this option, the services that belong to the application part of the system become available
for selection.

3. In the Type field, select Business Object.

4. In the Service Name field, select Customer.

5. In the Where Method Name Starts At field, enter update.

6. Click Search.

7. Select the Update method and click OK.


The Business Object returns on the form.

Create New Directive

1. Click New and select New Pre-Processing.

10.2.700 787
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

2. In the Directive Name field, enter CustomerAlert.

3. Save the directive.

4. Click Design to launch the BPM Workflow Designer.

5. Place the following workflow items on the designer canvas:


• Condition
• Fill Table By Query
• Invoke BO Method.

788 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

6. Now create connections between the workflow items. First, connect Start to Condition.

7. Connect the Condition's True outbound exit to the Fill Table By Query action.

8. Lastly, connect the Fill Table By Query action to the Invoke BO Method action.

Configure Condition
For the first task, configure the condition to fire the directive when a city is changed on a customer master record.

1. In the designer canvas, click the Condition item to select it.

10.2.700 789
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

2. In the Condition pane at the bottom, click the Add Line icon.

3. From the list of available conditions, select the following condition:


The specified field has been changed from any to another

4. Click specified.

5. Verify the Table field displays ds.Customer.

6. Search for the City field and select it.

7. Click OK to exit the Select Table Field(s) window.

Specify BO Method
Before you configure Fill By Query Table action to prepare data for the BO method call, you can configure the
Invoke BO Method action. First, specify which method you want to call through this action.

1. In the designer canvas, click the Invoke BO Method action to select it.

790 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

2. In the Actions pane found at the lower portion of the screen, view the action statement:
Invoke specified BO method with not configured parameters

3. Click the first specified link.


The Method Search window displays.

4. Since user-defined tables belong to framework part of the application, on the Method Search window,
select the ICE System Code.

5. For Type, select Business Object.

6. From the Service Name drop-down list, select UD01.

7. Click Search.

8. From the list of methods, select UpdateExt.

9. Click OK to confirm your selection.

Configure Method Parameters


Since you want to store data in a directive-level variable, you create it while you configure parameters of this
method call. This way, you make sure the variable type you create corresponds to the type of method parameter
it will be assigned to.

10.2.700 791
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

1. In the Invoke BO Method action phrase, click the second nor configured link to configure what data will
be passed as parameters to this method.

2. Notice the first parameter of this method named ds (dataset). This parameter uses the INPUT-OUTPUT
direction, which indicates the method receives data from this parameter and potentially returns the updated
data into the variable of the same type.

If you know the type of required variable in advance, you


can use the Variables tab within the Designer to create
it. In this example, use another way of creating a directive
level variable directly from within the action where it will
be used.

792 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

3. For the ds parameter, click the Binding drop-down list and select create new variable.

4. In the Create new variable window, notice the required variable Type defaults in.
In this case, the required type is Ice.Tablesets.UpdExtUD01Tableset.

5. For the Name, enter UD01LogRecords and click OK.

Usage of directive level variables is limited to the directive


where they were defined. Any intermediate data they will
hold can not be passed between multiple directives.

6. Now specify the two in (input) parameters which pass data into the method. These are the required
parameters the method call expects.

7. For the continueProcessingOnError parameter, invoke the Binding drop-down list. Notice the two available
options:
• create new variable - as discussed in previous steps, you would use this option to create a new variable.
In this case, the simple (scalar) variable of the boolean type would be created.
• expr: specified expression - use this option to launch the Specify C# expression window to compose
an expression assigned to this parameter.

8. In this example, create a new expression by selecting the expr: specified expression option.

9. In the Specify C# expression window, in the Editor pane, enter false.

10.2.700 793
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

10. Click OK.


This expression ensures the processing will not continue if an error occurs.

11. Similarly, create an expression for the rollbackParentOnChild parameter. For this parameter, you want to
ensure data is consistent when it is processed. In this expression, you enter true.

794 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

12. Now specify the two out (output) parameters which return data from the method call.

The Business Object method does not require any data


from the parameters of this direction. You can either
assign these method parameters to variables of the same
type, or, you can select the [ignore] binding if you do not
need to assign any value.

13. In this example, for both the errorsOccured and <return value> parameters, select [ignore].

14. In the Setup Method Parameters window, click OK.

15. In BPM Workflow Designer, click the Variables tab at the bottom. Verify the newly created variable is
present.

You can use this tab to create new variables, view existing
ones, rename them, change their types and to delete
them.

Design BPM Query


In this task, begin to configure the Fill Table By Query action. This action is used to add data into a target in-memory
table. In-memory table can be either a table passed in a complex parameter of tableset type to the service method,
or it can be a directive-level variable of the tableset type.
First, you must design a BPM query. When you construct the query, you can reference both in-memory tables,
such as ds.Customer and standard database tables such as ERP.Customer. To complete the query, you must
explicitly set which columns you want to display in the result set.

10.2.700 795
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

1. In the designer canvas, click the Fill Table By Query action to select it.

2. In the Actions pane found at the lower portion of the screen, view the Action statement:
Use the designed query to insert data into the specified table with not
configured mapping

3. Click designed to launch the Compose Query window.

4. For the Query Name, enter CustomerOrders.

796 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

5. Place the following tables on the designer canvas:


• ds.Customer (ds_Customer) - this table will supply the modified value of the customer city record.
• ERP.Customer - this table will provide the original value of the customer city record.
• ERP.OrderHed - this table will provide the list of open orders for the customer that should be updated.

6. Notice ERP.Customer and ERP.OrderHed tables automatically link. Select this link and change the relations
as follows:

Customer field OrderHed field


Company Company
CustNum CustNum (change this from BTCustNum)

7. Create relation between the ds.Customer and ERP.Customer tables.

10.2.700 797
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

8. Link the tables as follows:

ds_Customer field Customer field


Company Company
CustNum CustNum (change this from ParentCustNum)

9. Now apply a Table Criteria on the OrderHed table to only retrieve open orders.

798 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

10. To finalize the query, click the Display Fields tab and select the columns you want to display in the result
set.

11. In this example, the following set of fields is selected.

10.2.700 799
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Note the fields from the ds.Customer (ds_Customer) table provide the information from the customer record
being updated. The Customer_City column provides the original value of the customer city record before it
was modified. The OrderHed_OrderNum column provides the list of open orders for the customer.

12. In the Compose Query window, click OK.

Select Target Table


Now select the target in-memory table where data from the BPM Query will be inserted. In this example, you
select the directive-level variable of the tableset type you created for this directive.

1. In the Action phrase, click specified.

2. From the Table drop-down list, scroll down and select UD01LogRecords.UD01.
This indicates you are inserting records into the UD01 table of the UD01LogRecords directive-level variable.

3. Click OK.

Configure Table Mappings


To complete the action, configure how records are mapped to the in-memory table. Note the number of records
added to the selected table is equal to the number of records returned from the BPM Query.

1. In the Action phrase, click the not configured mapping link.

800 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

2. The Setup Table Mapping window displays, presenting all fields available within the UD01LogRecords.UD01
table.

10.2.700 801
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

3. First, examine how automatic field mapping works. By clicking the Bind Automatically button, BPM Query
display fields with the matching name and type are automatically mapped to the corresponding target table
columns.

4. In this example, the ds_Customer_Company column from the BPM Query is automatically mapped to the
Company column of the target user-defined table.
The remaining fields in this example are mapped manually.

5. For the Key1 column, from the Binding drop-down list, select field: ds_Customer_CustID.

6. For the Key2 column, build an expression that stamps the current time. From the Binding drop-down list,
select expr: specified expression.

7. When the Specify C# expression launches, from the Functions list, expand the Date branch and
double-click Now.
This adds the following function to the Editor:
BpmFunc.Now()

8. Since the Key2 column expects the string type of data, you must convert the datetime format to string. To
do so, place the cursor right after the brackets.

9. From the Functions list, expand the Conversion branch and double-click x.ToString().

10. The whole expression now reads:


BpmFunc.Now().ToString()

802 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

11. Click OK to exit the Editor.

12. For the Key3 column, build an expression to ensure a unique key is created for each sales order that needs
to be updated. In order to create a unique GUID for each row, type the following expression:
System.Guid.NewGuid().ToString()

13. For the Key4 column, build an expression that marks all records created by this directive in the UD01 table.
This approach helps you to identify the source of data updates, if needed. For this expression, type the
following in the Editor:
"CustomerCityChange"

14. For the Character01 column, build an expression that alerts the users to update the affected sales orders.

15. In the Editor pane, enter the below expression:


string.Format(
"Attention: Reroute order#{0} from {1} to {2} for customer {3}",
queryRow.OrderHed_OrderNum,
queryRow.Customer_City,
queryRow.ds_Customer_City,
queryRow.ds_Customer_CustID)

16. Note that in this message, parameters inside the brackets are substituted with data returned by the BPM
Query. In the Specify C# expression window, notice the Query row branch is found at the bottom of the
Available variables pane. It displays the list of columns you selected for display when you designed the BPM
Query. This way, you can use the rows returned by the query to make up the expression.

10.2.700 803
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

17. For the RowMod column found at the bottom of the Columns list, build an expression that marks all records
as added to the table. The expression used in this column looks as follows:
"A"

18. In the Setup Table Mapping window, click OK.


The workflow is now ready.

804 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Activate the Directive

1. Click Validate and verify the directive reports no errors.

2. Click Save and exit the BPM Workflow Designer.

3. Enable the directive and save it.

10.2.700 805
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Test the Directive


Navigate to Customer Maintenance.
Menu Path: Sales Management > Order Management > Setup > Customer
The CRM menu path is: Customer Relationship Management > Order Management > Setup > Customer

To trigger the BPM directive, modify a customer city record.

1. Retrieve the record for customer Dalton.

806 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

2. In the City field, delete the existing record and enter Green Bay.

3. Click Save to trigger the BPM directive.

4. Verify the records were added to the UD01 table for the customer Dalton.
To test the results, you may use either of the following approaches:
• Use Microsoft® SQL Server® Management Studio to run the query against the Ice.UD01 table.
The query syntax may look as follows:
select * from Ice.UD01 where Key1 = 'Dalton'

• Directly within the Epicor ERP application, construct a Business Activity Query against the Ice.UD01 table.
Apply a filter on the Key1 field to only retrieve records for the customer Dalton.
The UD01 table records should look similar to the following:

5. In Customer Maintenance, for Dalton, change the City to its original value (Minneapolis).

Update Table Using BPM Query

The previous case study demonstrated how you can log records in the UD01 table when the Customer City value
is changed. In this example, assume you want to extend the data being logged and add the State field to the
UD01 table. For the demonstration purposes, this example will utilize a different business object call using the
Ice.UD01.Update method. Same as in previous example, you create a Pre-processing directive, which means data
will be updated in the in-memory dataset table ds.UD01 (where ds is the name of the method parameter of
tableset type) before it updates the database.
Key concepts:
• Learn how to configure the Update Table by Query action

10.2.700 807
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

• Update a single in-memory table using the data retrieved by the query

In order to get the expected results, make sure you complete


the previous case study Use Fill Table by Query and Invoke
BO Method first.

Select Business Object Method


Navigate to Method Directives.
Menu Path: System Management > Business Process Management > Method Directives Maintenance

This program is not available in the Epicor Web Access.

1. On the Detail sheet, click the Method Code button.

2. The Method Search window displays.

808 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

3. In the Search by Service section, select ICE for the System Code.

4. In the Type field, select Business Object.

5. In the Service Name field, select UD01.

6. In the Where Method Name Starts At field, enter update.

7. Click Search.

8. Select the Update method and click OK.


The Business Object returns on the form.

Create New Directive

1. Click New and select New Pre-Processing.

10.2.700 809
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

2. In the Directive Name field, enter UD01Update.

3. Click Design to launch the BPM Workflow Designer.

4. Place the following workflow items on the designer canvas:


• Condition
• Update Table By Query

810 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

5. Now create connections between the workflow items. First, connect Start to Condition.

6. Secondly, connect the Condition's True outbound exit to the Update Table By Query action.

Configure Condition
In the previous case study, recall the expression used in the Key4 column marked all rows created by the
Customer.Update directive within the UD01 table using the "CustomerCityChange" expression. You will now
monitor this column and if BPM encounters this expression, this directive will trigger.
This approach helps you to identify the source of data updates, if needed.

1. In the designer canvas, click the Condition item to select it.

10.2.700 811
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

2. In the Condition pane at the bottom, click the Add Line icon.

3. From the list of available conditions, select the following condition:


The specified field of the changed row is equal to the specified expression

4. First, specify the field to monitor. Click the first specified.

5. Verify the Table field displays ds.UD01.

6. Search for the Key4 field and select it.

7. Click OK to exit the Select Table Field(s) window.

8. Now, specify you only want to monitor rows being added to the table. Invoke the drop-down list next to
the changed row parameter. From the list, select the added row option.

9. Lastly, specify the expression. Click the specified expression link to launch the Specify C# expression
window.

812 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

10. In the Editor pane, type the below expression:


"CustomerCityChange"

11. Click OK to exit the Specify C# expression window.

Design BPM Query


Now you construct a BPM query. Again, when you construct the query, you can reference both in-memory tables,
such as ds.UD01 or tables hosted within variables and standard database tables such as ERP.Customer.

1. In the designer canvas, click the Update Table By Query action to select it.

2. In the Actions pane found at the lower portion of the screen, view the Action statement:
Use the designed query to update all rows of specified table with not
configured mapping

3. Click designed to launch the Compose Query window.

4. For the Query Name, enter CustomerState.

10.2.700 813
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

5. Place the following tables on the designer canvas:


• ds.UD01
• ERP.Customer

6. Create relation between the ds.UD01 (ds_UD01) and ERP.Customer tables. Recall in UD01 table, the Key1
column is used to hold customer ID values.

7. On the Table Relations sheet, click the Add Row icon twice.

8. Create the following relations between the tables:

ds_UD01 field Customer field


Company Company
Key1 CustID

9. Now select the fields to display in the result set. For this example, you select the existing database records
from the ERP.Customer table. Select the Display Fields sheet.

814 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

10. Select the following fields:

Field
Customer_Company
Customer_CustID
Customer_State

In theory, only the ERP.Customer table could have been used to construct this query. Although in that case,
on execution, the whole table would have be loaded into the memory. By joining this table with ds.UD01,
you apply a filter to only select data for the customer being updated.

11. In the Compose Query window, click OK.

Select Target Table

1. First, specify you only want to update rows added to the in-memory table. Invoke the drop-down list next
to all rows parameter and select added rows.

10.2.700 815
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

2. Now select the target in-memory table you want to update. In the Action phrase, click specified.

3. In the Table field, verify ds.UD01 displays.

4. Click OK.

816 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Configure Table Mapping


To complete the action, you must set up how data is updated into the target database. Compared to table
mapping used in the Fill Table By Query action, one additional step is required when performing data updates -
to define the relationship between the target table and rows returned BPM query.

1. In the Action phrase, click the not configured mapping link.

2. When the Setup Table Mapping displays, first, set up the relationship between the table and the query.

10.2.700 817
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

3. Click the Add Relation icon (twice).

4. Create the following relations:

ds.UD01 table Query


Company Customer_Company
Key1 Customer_CustID

5. Now define how to map the State field retrieved from the database to the UD01 in-memory table. Notice
that by default, in the Binding column, all fields are set to [ignore]. This state indicates the original values
in the target table columns are left untouched.

6. For the Character02 column, from the Binding drop-down list, select field: Customer_State.
This binds the State value from the existing database record to the table.
Notice that apart from a possibility to bind a field to column retrieved by the query, you also have an option
to create a new directive level variable or create a new expression.

7. Click OK to exit the Setup Table Mapping window.

8. Click Validate and verify the directive reports no errors.

818 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

9. Click Save and exit the BPM Workflow Designer.

10. Click Enabled check box to activate the directive.

10.2.700 819
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

11. Save the record.

Test the Directive


Navigate to Customer Maintenance.
Menu Path: Sales Management > Order Management > Setup > Customer
The CRM menu path is: Customer Relationship Management > Order Management > Setup > Customer

1. In this example, retrieve the record for customer Dalton.

2. Modify the record in the City field. For example, enter Saint Paul.

3. Click Save to trigger the BPM directive.

4. Verify the records were updated into the UD01 table for the customer Dalton.
To test the results, you may use either of the following approaches:
• Use Microsoft® SQL Server® Management Studio to run the query against the Ice.UD01 table.
The query syntax may look as follows:
select * from Ice.UD01 where Key1 = 'Dalton'

• Directly within the Epicor ERP application, construct a Business Activity Query against the Ice.UD01 table.
Apply a filter on the Key1 field to retrieve records for the customer Dalton.
The UD01 table records should look similar to the following:

820 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

5. Notice the Character02 column is populated with the State information from the existing customer record.
To confirm the BPM Query used in this Pre-processing directive retrieves the original value of the State
field, you can perform one more test. In Customer Maintenance, select another customer, but this time,
change the values in both the City and State fields. Save the information and verify the UD01_Character02
column is updated with the original value of the State column, before it was changed.

Set Up Security for Posting Invoices

Use this example to see how you can apply method directives to Process Service methods.
Imagine that an organization needs to restrict the ability to post AR invoices to a limited group of employees -
financial controllers. To do this, you will complete the following steps:
• Create a Security Group - Financial Controllers - Only the members of this group will be allowed to post
invoices.
For the purpose of this workshop, you do not need to add any users to this group. Instead, you will develop
and test the logic that prevents posting invoices by all other users outside the Financial Controllers Security
Group.
• Add a directive to the SubmitToAgent method of the AR Invoice Post Process - The workflow of this
directive will include a condition that checks if the user belongs to the Financial Controllers group, and will
display an error message if they don't.
• Test the directive - You will create a new invoice group and add a new invoice to it. You will add an invoice
of the miscellaneous type because it requires minimum details. You will then run the group posting process
to verify that posting is not allowed to the current user because they are not assigned to the Financial Controllers
Security Group.

Create Security Group

In this step, create the Security Group for users that will be allowed to post invoices.

1. Navigate to Security Group Maintenance.


Menu Path: System Setup > Security Maintenance > Security Group Maintenance

10.2.700 821
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

2. In the Toolbar, click New.


The Detail sheet displays for data entry.

3. For Group Code, type in FINC.

4. Add a Description - for example, Financial Controllers.

5. Save the group and exit Security Group Maintenance.


For this example, you do not need to add any users to this group.

Select Process Method

In this step, select the method of the AR Invoice Post process that you will customize.

1. Navigate to Method Directives Maintenance.


Menu Path: System Management > Business Process Management > Method Directives Maintenance.

2. On the Detail sheet, click the Method Code button.


The Method Search window displays.

822 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

3. Keep the ERP System Code, and in the Type drop-down, select Process.

4. In the Service Name field, select ARInvoicePost.

5. Type in submit in the Where Method Name Starts With filter.

6. Click Search.

7. Select the SubmitToAgent method from the Search Results and click OK.

Add Pre-Processing Directive

In this step, add a Pre-Processing directive to the selected ARInvoicePost process.

1. From the New drop-down in the Toolbar, select New Pre-Processing.

10.2.700 823
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

The Pre-Processing > Detail sheet displays for editing.

2. In the Directive Name field, type in PreventPost.

3. Add a Description - for example, Allows posting AR Invoices only to users that belong to the Financial
Controllers Security Group.

4. Then, click Design to launch the BPM Workflow Designer.

824 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

5. From the Flow Chart pane, select the Condition widget and drag it onto the canvas.
Connect the Start widget to the Condition.

6. On the Properties > Condition sheet below, click on the New icon.
A new condition line is added.

7. From the drop-down in the Condition column, celest the following statement:
The user who called this method belongs to specified group.

8. From the belongs toggle, select the does not belong option.

9. Click the specified link.


The Security Group Search window displays.

10. Search for the Financial Controllers group, then click OK.

11. Select the Raise Exception widget from the Other pane on the left and add it to the workflow.

10.2.700 825
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

12. Connect the True end of the Condition to the Raise Exception widget.

13. In the action statement, click the designed link.


The Design Exception Template window displays.

14. Enter a meaningful name - for example, PostingError.

15. Add a message - for example, The user is not allowed to post.

16. Click OK.

17. Save the workflow and exit the Designer.

18. Back in the Method Directives Maintenance, enable the directive.

826 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

19. Save the directive.


You can now test your BPM customization.

Test Directive

In this step, test your BPM customization.

1. Navigate to AR Invoice Entry.


Menu Path: Financial Management > Accounts Receivable > General Operations > AR Invoice Entry.

2. In the Toolbar, select New Group from the New drop-down.


The Group > Detail sheet activates.

10.2.700 827
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

3. In the Group field, type in NG01 and press Tab.

4. Now, from the New drop-down in the Toolbar, select New Miscellaneous Invoice.
The Header > Detail sheet displays.

5. In the Sold To Customer field, enter addison and press Tab.


The form is populated with customer details.

828 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

6. In the Toolbar again, select New Line from the New menu.

7. On the Line > Detail sheet, change Quantity to 10 and Unit Price to 20.

8. Save the invoice.

9. In the Main Menu, go to Actions > Group > Post.

The AR Invoice Post Process program launches. By default, it should open as a Kinetic form, in which case
move on to the next step. However, if the form displays as a classic Windows form due to company or
individual client setup, proceed to Step 11.

10. On the Kinetic form, click Process.

10.2.700 829
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

11. On the classic form, In the Toolbar, click Submit.

12. Note that the error message displays. The user cannot post the invoice.

You have successfully implemented a restriction for posting AR invoices.

Set Default Value for Report Parameter

Use this example to see how you can modify logic of report methods.
In this workshop, you will change the default value of the Print Bar Code parameter on the Sales Order Pick List
report. To do this:
• You will select the GetNewParameters method of the SOPickListReport service that retrieves default values
of the report parameters and add a Post-Processing directive to it.
• In the directive workflow, you will use a Set Field action to assign your custom value to the Print Bar Code
parameter. By default, this parameter is set to false; you will set it to true.
• Finally, you will launch the Sales Order Pick List report to make sure this parameter is selected by default.

830 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

Select Report Method

In this step, select the method of the Sales Order Pick List report that you will use for your customization.

1. Navigate to Method Directives Maintenance.


Menu Path: System Management > Business Process Management > Method Directives Maintenance.

2. On the Detail sheet, click the Method Code button.


The Method Search window displays.

3. Keep the ERP System Code, and in the Type drop-down, select Report.

4. In the Service Name field, select SOPickListReport.

5. Type in getnewparam in the Where Method Name Starts With filter.

6. Click Search.

7. Select the GetNewParameters method from the Search Results and click OK.

10.2.700 831
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

Add Post-Processing Directive

In this step, add a Post-Processing directive to the selected GetNewParameters method of the Sales Order Pick
LIst report.

1. From the New drop-down in the Toolbar, select New Post-Processing.

The Post-Processing > Detail sheet displays for editing.

2. In the Directive Name field, type in EnablePrintBarCodes.

3. Add a Description - for example, Sets the Print Bar Codes report parameter to true.

4. Then, click Design to launch the BPM Workflow Designer.

5. From the Setters pane, select the Set Field widget and add it to the workflow.

832 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

6. Connect the Start widget to the Set Field widget.

7. In the Set Field action, select the first specified link.


The Select Table Field(s) window displays.

8. Make sure the result.SOPickListReportParam table is selected and tick the check box next to the Bar
Codes field. Then click OK.

9. Keep the changed row link intact.

10.2.700 833
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

10. Click the second specified link.


The Specify C# expression window displays.

11. In the expression editor, type in true and click OK.

12. Save the workflow and exit the Designer.

13. On Method Directive Maintenance, enable the directive.

834 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management | Chapter 5

14. Save the directive.

Test Directive

In this step, test your BPM customization.

1. Launch the Sales Order Pick List report program.


Menu Path: Sales Management > Order Management > Reports > Sales Order Pick List.

2. Verify that the Print Bar Code parameter is selected by default.

10.2.700 835
Chapter 5 | Business Process Management Epicor ICE 3.2 Tools User Guide

You have successfully changed the default value of the report parameter.

836 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

Chapter 6: Custom Business Process Management

While the Business Process Management (BPM) module contains actions that address typical business needs, you may
have additional requirements specific to your organization or industry. To handle these unique situations, you can
customize BPM method, data, and updatable BAQ directives.
You can customize BPM through the Execute Custom Code action. When you select this action, you can enter C# code
through a code window, validate your code, and then enable the directive. When conditions on the directive are met,
your custom code runs, insuring data entry matches company requirements, displaying warning and information dialog
boxes, populating default data, and so on.
If you need users to enter custom data as part of a BPM requirement, use the BPM Data Form Designer. Through this
program you can create a custom data form that includes text fields, radio button options, drop-down lists, and buttons.
You can also secure this data form by requiring users to enter a password. This data form is then launched through
an action on a directive. When the directive activates, the data form displays and users enter the data you need.
To complete the customization tools, you can create custom external methods and Service Connect workflows. The
BPM functionality generates a code shell for your custom VB.NET or C# method, and then you can access this shell
® ®
within Microsoft Visual Studio to create your external method. Once your external method is compiled, you can
select it on a directive action. Through this same functionality you can also create a Service Connect workflow that
links the data generated through the directive to Service Connect. This data is then available to other Epicor or third
party applications.

Execute Custom Code Directive

You use the Execute Custom Code action to create a custom method, data, or updatable BAQ directive. Leverage
this feature to build a custom action that runs when the condition(s) on a directive activate; you create these
actions using the C# programming language.
During this example, you will create a data directive that monitors Part Maintenance. When a user enters a new
Part ID that has the "HDW" prefix, the Product Group field automatically populates with the Hardware option.

Create the Data Directive

You create this directive using Data Directives Maintenance.


Menu Path: System Management > Business Process Management > Data Directives Maintenance

This program is not available in Epicor Web Access.

1. You need this data directive to monitor the Part ID field. For the Table, find and select the Part table.

10.2.700 837
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

2. Click the Down Arrow next to the New button; select New In-Transaction Directive.

3. For the Directive Name, enter Set Part Defaults.

4. Select the Group you need for this data directive.

5. Click the Design button.

6. The BPM Workflow Designer displays.

838 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

7. From the Callers group, click and drag the Execute Custom Code item to the design area.

8. Click on the Start item to display its connection points.

9. Click and drag a connection line from the Start item to the Execute Custom Code item.

10. In the Actions pane, the Synchronously execute custom code... line displays. Click the code... link.

11. The Enter Custom Code window displays.

10.2.700 839
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

12. Enter the following C# code:


var ttPart_Row = ttPart.FirstOrDefault(r => r.Added());
if (ttPart_Row !=null)
{
string prodCodeHardware = "HDW";
if (ttPart_Row.ProdCode==String.Empty)
{
if (ttPart_Row.PartNum.StartsWith(prodCodeHardware, StringComparison.
OrdinalIgnoreCase))
{
ttPart_Row.ProdCode=prodCodeHardware;
}
}
}

13. Click OK.

840 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

When you design a custom code, several context menu options are available for use. To activate the
context menu, right-click anywhere in the code designer area.
The list of options includes:
• Edit - This menu allows you to manipulate items within the current code. For example, you can cut,
copy, and paste text or undo the latest changes you have made.
BPM/BAQ code editors support intelligent code editing, which includes syntax highlighting and
code completion working for C# keywords, parameters, directive variables, member lists, etc. Start
typing and then press Ctrl + Space to bring up suggested options. For example, to invoke a list of
columns for a table, enter the name of the table followed by a dot (.) and press Ctrl + Space. Select
the column you need, it will be added to the table name: ttABCCodeRow.Company.

• Parameters - Use this option to insert Business Object method parameters. Method parameters can
be either simple parameters such as string or decimal, or complex parameters of TableSet type. Complex
parameters are exposed in the BPM directives as aliases to the tables inside them (ttTables).

Example whereClause, ttCustomerRow.CustNum

• Call Context - Use this option to insert reference to callContextBpmData or callContextClient


tables and fields.
Type in a dot (.) after the table name and press Ctrl + Space to invoke the list of available columns
of this table. Select the column you need, it will be added to the table name.

Example callContextClient.CurrentCompany

• Variables - This menu becomes available if at least one directive-level variable has been created for
the current directive. You can reference both simple variable types and complex variable types of
TableSet type.
The Variables sub-menu is organized as follows:
• The first level sub-menu displays all variables you created within the directive; the list of variables
is sorted alphabetically. When you double-click on a variable of simple type, its reference is inserted
into the code using the "this.VariableName" format.
• For TableSet type variable, click on its title to expand additional sub-level. On this list, a name of
the complex variable is listed first, followed by the list of tables it contains. When you double-click
on a variable name at the top, it again gets inserted into the code using the "this.VariableName"
format. Double-clicking on a table inserts the reference using the
"this.VariableName.TablesetTableName" format.

Example this.CustomerVariable,
this.CustomerContainer.ShipTo

Test the Data Directive

1. The action statement now displays a reference to your custom code.

10.2.700 841
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

2. Click Validate to verify your custom code runs without errors.

3. Click the Save and Exit button.

4. Now on the Data Directives Maintenance window, select the Enabled check box.

842 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

5. Click Save.

6. Navigate to Part Maintenance.


Menu Path: Material Management > Purchase Management > Setup > Part

10.2.700 843
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

7. Click the New button.

8. For the Part ID, enter HDW-test.

9. Now in the Description, enter Hardware Group Test.

10. Click Save.

11. The Group drop-down list updates to display the Hardware product group.

844 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

BPM Data Form Designer

Use the BPM Data Form Designer program to create custom data forms you can then launch through method
and updatable BAQ directives. You launch these custom forms by adding the Call BPM Data Form item to a BPM
workflow.
You can create simple forms which contain text and two buttons (for example, Abort and Continue) to complex
forms which include entry fields that update your database. BPM data forms capture data or button actions to
control a specific BPM processing directive. Use this functionality to either conditionally display a form or capture
the data required against a specific transaction.
When a custom BPM Data form displays, the directive pauses until the user enters the required data or clicks the
appropriate button. While the user enters data on the form, the method call is stays active on the server. When
the user completes the requirements on the BPM custom form, the call is sent to the server again, but this time
it skips all the actions it previously ran.

Create a BPM Data Form


Menu Path: System Management > Business Process Management > BPM Data Form Designer

This program is not available in Epicor Web Access.

To create a new BPM data form:

10.2.700 845
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

1. Click the New button.

2. Enter a unique ID for the form.

3. Add a Form Title; this text becomes the title which displays on the BPM form. You can add links to field
content within CallContext tables. Before the BPM custom form displays, this data is pulled from the field
content and is shown as text within the BPM form.

4. Optionally add Form Text that details the purpose of the form and any instructions required to use it. You
can add links to content of fields in CallContext tables. Before the BPM custom form displays, this data is
pulled from the field content and is shown as text within the BPM form.

5. Click Save.

Add Fields
Use the Fields sheet to add controls to the form.

1. Click the Fields tab.

846 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

2. Click the Down Arrow next to the New button; select New Field. A new row is created on the Fields
sheet; use this row to enter details about the new field.

3. Select which BPM data table Field is used to store information entered into the form. Each field can use
one of the twenty user-definable fields. These fields are available for the following data types: character,
number, date, check box, and shortchar.

4. The Field Label is the text that displays before the field.

5. The Field Format controls the number and format of the characters entered into the field. You can edit
this value for character, number, and shortchar fields.

6. Optionally, select the Mandatory check box to require users to complete the field before they can exit the
BPM data custom form.

7. Use the Default field to specify a value that displays in the field automatically when the form launches. If
needed, the user can change this value.

8. The Order field indicates where the field displays on the form. Higher numbered fields appear after lower
numbered fields. The application automatically increments this field by 10 for each field you add in the order
that you add them.

10.2.700 847
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

Define Control Values

Different field types, such as radio buttons, require you define which field value options are available. Enter these
options in the Field Values grid.

1. Click the Down Arrow next to the New button; select New Radio Button Set.

2. A new row displays on the Form Fields grid; notice this row displays the Radio Buttons icon.

3. When you select the Radio Buttons row, the Field Values pane displays. To add a field value, click the New
button in this pane.

4. Enter the Value you wish to define. In this example you enter a Ms. value.

5. Now define the Label you want to appear on the form during Run Mode. This text displays on the form
next to the radio button option.

6. The Seq value indicates the order in which the radio button options appear on the form. In this example,
the Ms. radio button option will display above the Mr. radio button option.

848 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

7. Continue to add the radio button options you need. When you finish, click Save.

Create Password

You can also control access to the custom BPM form by adding a password field. Before the directive can continue,
users must enter the password value on the custom data form. This password can be a phrase or a user logon.
This password value is stored within the action.

1. Click the Down Arrow next to the New button; select New Password Field.

2. A new row displays on the Form Fields grid; for its Field Label, this row automatically displays a Password:
value.

10.2.700 849
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

3. In the Retry Attempts field, type in or select with the help of the up and down arrows the number of
attempts you will allow users to enter the password. If a user fails the last attempt, the BPM Data Form
closes.

In this field, you can enter an integer value in the range


of 1 to 99.

4. If you want a dialog box to display when the user fails to log on, select the Raise An Exception On Failure
check box.

5. Indicate whether you want this password to use a System login password or a User Defined password.
The System login is a password from a network account, while a User Defined password is unique for this
form.

6. Enter the password you will use in the New Password field.

7. Verify this password by entering it again in the Confirm Password field.

8. Click Save.

Create or Remove Buttons

Every form automatically includes an OK button. You can remove this button or add additional buttons to meet
your requirements. The form must have at least one button.

1. Click on the Buttons tab. Notice the OK button displays on the Form Buttons grid by default.

2. If you wish to add a button, click the Down Arrow next to the New button and select New Button.

3. The Seq field defines where the button displays on the data form. If you add multiple buttons, use this field
to change the button's location.

4. Now in the Label field, enter the text you want to display on the button.

5. Continue to add and modify the form buttons as you need. When you finish, click Save.

850 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

Test the Form

You can test the data form within the BPM Data Form Designer.

1. To test how your BPM data form displays in Run Mode, click the Actions menu and select Test BPM Data
Form.

2. Your custom BPM form displays.

3. Enter values in the fields you created on the field.

4. When you finish, click OK.

If you can enter data without error, the BPM data form is working correctly. You can now use it on a directive.

If different directives launch from different buttons on the BPM


custom data form, test the ButtonValue field within the

10.2.700 851
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

BPMData table. This value matches the Button sequence ID


value from the Buttons tab. A “-1” value indicates that the
BPM custom form was closed either by pressing the
<Alt>+<F4> keys or by clicking the Windows Close button
(usually found in the upper right on most windows).

Data Form Directive

Now that you have created a data form, you can use it on a method or updatable BAQ directive. When the
directive activates, the data form displays and users enter the data you designed.
During the following example, you will create a post-processing directive for the Customer.Update method that
causes the data form to display. After a user makes a change to a customer record and clicks Save, the BPM form
displays. The user enters contact information for a manager in this data form. After the user clicks OK, an email
is sent to a manager; this email details which customer record was updated.

Create BPM Data Form Action


Once the form is complete, you can call it from a method directive. After users enter the data, this custom data
is available for use within other directive actions or custom code. The custom data is stored in the in-memory
CallContextBpmData table until it is used by other actions.
To use the form in a directive:

1. In Method Directives Maintenance, create a new directive. In this example, the method is
Customer.Update and the directive type is post-processing.

2. Enter a Directive Name. For this example, you enter Alert Manager.

3. Click the Design... button.

4. The BPM Workflow Designer displays.

852 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

5. From the Callers group, click and drag the Call BPM Data Form item to the design area.

6. Click on the Start item to display its connection points.

7. Click and drag a connection line from the Start item to the Call BPM Data Form item.

8. In the Actions pane, the Call the named BPM Data Form using no customization always line displays.
Click the named link.

9. The Select BPM Data Form window displays.

10.2.700 853
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

10. Select the ManagerAlert option.

11. Click OK.

12. The name of the selected data form displays in the action line.

854 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

13. Click Save and Exit.

By configuring this action, you specify the data form you created displays when the specified conditions are met.
However notice in this example, no conditions are defined, which means this method directive will activate each
time a user updates a customer record.

Create Send E-Mail Action


You can now use the data from the BPM data form in other actions within the same directive. To use data from
the data form, you add another action to your directive.

1. Click and drag the Send E-mail item onto the design area.

2. Click on the Call BPM Data Form item to display its connection points.

3. Connect the Call BPM Data Form item to the Send E-mail item.

4. In the Actions pane, the send e-mail asynchronously based on the designed template line displays.
Click the designed link.

Design E-mail Template

1. The Design E-mail Template window displays.

10.2.700 855
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

2. In the Name field, enter an appropriate name for the email template.

3. In the From field, enter the e-mail address for the email that handles your global alert email.

You can find this address within Company Maintenance.


Launch this program and navigate to the Email and
Reporting tab; the Email Address field contains the value
you need to place in the From field on the email template.

4. In the To field, right-click and select the Call Context > callContextBpmData context menu. You use this
context menu to link data from the data form to your email.

5. For this example, you want to link the To field to the Character01 field on the data form. This field contains
the email address for the manager who will receive the email message.

6. Enter the Subject that you want to display in the email.

856 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

7. You can now add more fields from the data form in the Text field. As you did previously, right-click the
field and select Call Context > callContextBpmData and select the fields you use on the data form. In
this example, you select Character03 (Honorific) and Character02 (Last Name) from the data form.

8. You want the message to display the name of the customer that the user updated. To do this, right-click
the Text field; from the context menu, select the Field Query... option.

9. Enter a Name for your field query. In this example, you enter CustomerName.

10.2.700 857
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

10. Click on the Table drop-down list and select the in-memory table that contains the field you want to populate
on the email; for this field query, you select the ds.Customer table (where ds is the method parameter of
tableset type).

11. You only want this field to populate when a customer record is updated. Select the Updated records check
box.

12. To filter customer records the user has not updated, select the Unchanged records check box. This query
will now only find customer records changed by the current run of the Customer.Update method.

13. Select the specific field you want to populate on the email message. Since you want to populate the email
text with the customer's name, you select the check box next to the Name field.

14. Click OK.

15. You return to the Design E-mail Template window. You next need to populate the e-mail with the identifier
for the user who changed the customer record. To begin, you enter the "was updated by" text.

16. Now right-click and select the Call Context > callContext client sub-menu.

17. Select the CurrentUserID option.

18. Your Text field now contains the query options and static text you need. When this method is active, the
query fields populate with values from the selected records, and the email message will contain these values.

858 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

19. Click OK.

Test the BPM Form

1. The name of the e-mail template now displays in the second action.

10.2.700 859
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

2. Click the Save and Exit button.

3. To activate the method directive, select the Enabled check box.

4. Now test the directive by navigating to Customer Maintenance.


Menu Path: Sales Management > Order Management > Setup > Customer

860 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

5. Click the Customer... button to find and select a customer record.

6. Change a value in a field and click Save.

7. This causes the data directive to activate. The first action displays the Manager Alert data form.

8. Enter the information you need to contact the manager.

9. Click OK.

10. The next action now runs. An email notification is sent to the manager you entered on the data form.

10.2.700 861
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

External Methods and Workflows

You can create custom external methods using the C# or Visual Basic .NET programming languages. Through
this feature, you can implement complex external methods that extend or replace the functionality or server-side
application business logic.

In Epicor Cloud ERP - Multi Tenant or Epicor Cloud ERP -


Dedicated Tenancy, this program or feature may not be
available or may operate under certain restrictions.

You can create external methods for method, data, and updatable BAQ directives. These custom BPM external
methods are public, typically static methods that accept the same parameters as the method you are extending.
Because of this, custom external methods are directly integrated with the Epicor application. This functionality
is only available if your user account has BPM Advanced User permissions.
You begin by creating a custom action within the BPM module. You do this by generating a class within a method
that has a suitable signature. You then open the generated class within a .NET environment where you enter the
code for the custom external method. Lastly, you deploy the custom external method to the application. You
can then use the custom external method with either a method directive or an updatable BAQ directive.
Through this feature set, you can also create Service Connect workflows for method, data, and updatable BAQ
directives. By creating these workflows, you can set up directives that move data out of the Epicor application.
This integrates the data generated by this directive with the Service Connect application. Once this data is available
in Service Connect, you can then link it to another Epicor application or a third-party application for display and
use.
This section describes how you use the BPM tools to create and enter custom code. However specific details
about the C# or Visual Basic .NET languages are beyond the scope of this user guide. If you have any questions
about your custom code, refer to the various reference guides and training manuals available for the programming
languages.

862 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

Assign BPM Advanced User Rights

You can create external methods and Service Connect workflows if you have advanced BPM user rights. You or
your system administrator assigns these rights to your account through User Account Security Maintenance.
To assign these rights to your account:

1. Navigate to User Account Security Maintenance.


Menu Path: System Setup > Security Maintenance > User Account Security Maintenance

2. Use the Detail sheet to find and select the user account.

3. Click on the Options tab.

4. Select the BPM Advanced User check box.

5. Click Save.

The next time you log into the Epicor application, you can click the Advanced... buttons in both Method Directives
Maintenance and Updatable BAQ Directives Maintenance. You can also select this option from the Actions menu

10.2.700 863
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

in both programs. You can also now click the Create Programming Interface... button in Method Directives
Maintenance, Data Directives Maintenance, and Updatable BAQ Directives Maintenance.

Method Arguments

The Method Arguments window displays the arguments contained in the current method or updatable BAQ;
use this program to review what you need to know before you build your external method. You can also use
this program to launch the Programming Interface Generator Form; you use this window to generate a class
within a method that has a signature which matches the signature of the business object for which you are
creating the external method.
You launch the Method Arguments window from either Method Directives Maintenance or Updatable BAQ
Directives Maintenance. You display this window through the same steps in both programs. Here’s how you
launch this window within Method Directives Maintenance.

1. Click the Method Code button to find and select the method that you need.

2. Click the Advanced... button.

To access this feature, you can also click the Actions menu
and select the Advanced option.

3. The Method Arguments window displays. The signature for the current method displays within the grid.
Use this grid to examine the building blocks for the current method; this information is useful as you program
your action. Notice you cannot edit any of these fields.

864 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

4. The Order field displays the sequence of the method arguments. This indicates which argument runs before
the next argument, displaying the logic sequence of the selected method.

5. The Direction field indicates how the data flows through the argument. In this example, the direction is
INPUT, OUTPUT, and RETVAL.
• INPUT - Indicates the arguments that pass data into the database.
• OUTPUT - Indicates the arguments that push the data back to the client for display.
• RETVAL - Defines the argument that determines the return value.

6. The BpmArgumentName field displays the name of the argument.

7. The Type field displays the .NET classification for each argument. This example displays the System.String,
System.Int32, System.Boolean, and Erp.Tablesets.ABCCodeListTableset types.

8. Click the Create Programming Interfaces... button to launch the Programming Interface Generator
Form. You use this window to create a template for a custom external method. The next section describes
how to use this functionality.

9. To close this program, click OK.

Programming Interface Generator Form

Use the Programming Interface Generator Form to create a custom external method for the selected business
object method, data table, or updatable BAQ.
If you are creating an external method for an updatable BAQ or method directive, you launch the Programming
Interface Generator Form from the Method Arguments window (as described previously). If you are creating an
external method for a data directive, you launch this window in Data Directives Maintenance by selecting a table
and then clicking the Create Programming Interface... button.
After you select the business object method, database table, or updatable BAQ, you use this window to extend
the directive's functionality with the following action component types:
• .Net Assembly [C#] – Select this option to create a template C# class with a single empty function. This
function matches the signature of the method you are customizing. You then write the custom code in this
function statement, build the C# assembly, and deploy it to the server. You can then select this custom external
method on a directive.
• .Net Assembly [VB.NET] – Select this option to create a template VB.NET class with a single empty function.
This function matches the signature of the method you are customizing. You then write the custom code in
this function statement, build the VB.NET assembly, and deploy it to the server. You can then select this
custom external method on a directive.
• Epicor Service Connect Workflows – Use this option to create the schemas required for an Epicor Service
Connect workflow. Through this Epicor application, you create integrated platforms for secure data workflows
between the Epicor application and third party applications.

.NET Assembly [C#]

When you use the Programming Interface Generator Form to generate a .NET assembly for C#, you generate
the .cs code shell that integrates with the selected business object method.

1. After you click the Create Programming Interfaces... button, the Programming Interface Generator
Form displays.

10.2.700 865
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

2. Select the .Net Assembly [C#] radio button.

3. The C# code shell for the custom action generates. It displays on the .NET Action Template - C# sheet.

4. Click Save.

5. The .Net destination folder window displays.

866 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

6. Navigate to the folder where you create your external assembles.

7. Click Save.

Your .cs file is now saved to this file location.


You can now use this file to create your custom external method. To do this, launch Visual Studio and create a
C# project. You then include this file in this project and then build it as a class library (.dll file). You then place
this .dll file in an External Storage folder; this folder is specified in the web.config file within the
customizationSettings section. Typically its directory path is the Server\Customization\Externals location.

.NET Assembly [VB.NET]

When you use the Programming Interface Generator Form to generate a .NET assembly for VB.NET, you generate
the .vb code shell that integrates with the selected business object method.

1. After you click the Create Programming Interfaces... button, the Programming Interface Generator
Form displays.

10.2.700 867
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

2. Select the .Net Assembly [VB.NET] radio button.

3. The VB.NET code shell for the custom action generates. It displays on the .NET Action Template - VB.NET
sheet.

4. Click Save.

5. The .Net destination folder window displays.

868 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

6. Navigate to the folder where you create your external assembles.

7. Click Save.

Your .vb file is now saved to this file location.


You can now use this file to create your custom external method. To do this, launch Visual Studio and create a
VB.NET project. You then include this file in this project and then build it as a class library (.dll file). You then
place this .dll file in an External Storage folder; this folder is specified in the web.config file within the
customizationSettings section. Typically its directory path is the Server\Customization\Externals location.

Service Connect Workflow


When you use the wizard to create a Service Connect workflow, you generate the workflow schemas that connect
the current method with Service Connect. Here’s how:

1. After you click the Create Programming Interfaces... button, the Programming Interface Generator
Form displays.

2. Select the Epicor Service Connect Workflows radio button. The workflow schemas now generate.

3. The Method Schema sheet displays the elements required to link the custom action to the Service Connect
workfow.

4. The Input Schema sheet displays the path and filename used to generate the input schemas required for
the Service Connect workflow.

10.2.700 869
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

5. The Output Schema sheet displays the path and filename used to generate the output schemas required
for the Service Connect workflow.

6. To complete the workflow, click Save.

7. The Browse For Folder window displays. Use this window to find and select the folder where you wish to
save these .xsd files.

870 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

8. If you are on the same machine as Epicor Service Connect, save the schemas to the
SCS\Schemas\UserSchemas folder where Service Connect is installed. Saving the schemas to that location
makes them available for use in Service Connect workflows. You can then import them into Service Connect.
The In Schema is named MD_<BOName>_<MethodName>_Request.xsd and the Out Schema is named
MD_<BOName>_<MethodName>_Response.xsd.

9. Click OK.

The schemas are now saved within this location. Review your Epicor Service Connect documentation and the
Epicor Service Connect User Guide to learn how to design your workflow using these schemas.

External Method Logic

You open the external method template within your programming environment to create your custom action.
You do this differently, depending on whether you are developing a C# or a VB.NET external method.
Most transactions start with a GetNew or GetByID method to either populate default values into the dataset or
retrieve existing data from the database. The client keeps a copy of the original row and sends this row back
through an Update method along with the updated row. The server then compares the original copy of the row
to the current row on the actual, or physical, database to make sure it did not change from another source before
it updates the row. In these cases, only the changed row has an A (Add), U (Update), or D (Delete) value in the
table’s RowMod column.
When you write .NET code, be sure you identify the correct row within the tableset. You must do this because
the Update method creates two copies of the row within the inbound dataset. If the copy of the returned row
to the client does not match the actual database, you receive an error and future updates also fail. This feature
is part of the Optimistic Record Locking Mechanism; it applies to both conditions and actions.

10.2.700 871
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

Programming Action Signatures


When you attach an external method to a business object or updatable BAQ, it must have a signature which
matches the signature of the business object method or BAQ. If it does not, the external method does not display
on the methods list when you select an Invoke External Method action on a method or updatable BAQ directive.
These external methods always take simple parameters by reference and complex parameters by value.
This section displays examples of how a Method Signature needs to be mapped to an External Method Action
Signature. When you display the Method Arguments window, you are presented with the original signature of
the Business Object method:

Using this example, the blank external method for this example appears as per below. Note that a template
generated using the Programming Interface Generator displays what signature of external method is expected,
when this method is called from a BPM customization.
using System.Data;
using System.Linq;
using System.Linq.Expressions;
using System.ServiceModel;
using Epicor.Data;
using Epicor.Hosting;
using Ice.Contracts;
using Ice.ExtendedData;
using Ice.Lib;
using Ice.Tables;
using Ice.Tablesets;

namespace BpmCustomCode
{
public class MyABCCode
{
public void GetList(ref System.String whereClause,
ref System.Int32 pageSize,
ref System.Int32 absolutePage,
ref System.Boolean morePages,
Erp.Tablesets.ABCCodeListTableset result,
Ice.Tablesets.ContextTableset context)
{
//
// TODO: Replace the throw statement with any code for an action in
ABCCode.GetList() method invoke
//
throw new System.NotImplementedException();
}
}
}

872 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

Note that Ice.Tablesets.ContextTableset structure is passed between the client and server and between Epicor
server code by using a special global field. As this field is not accessible to an external custom code, it is passed
an additional argument within a code template.

.NET Process [C#]

To enter the programming logic for a custom C# .NET external method:


® ®
1. Launch Microsoft Visual Studio .

2. Create an empty Class Library C# project.

3. Add your .cs file to the project. For example, AbcCode.GetList.cs.

10.2.700 873
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

4. Now add the references to the assembles from the Server\Assemblies and Server\Bin folders. This resolves
all the types used in the custom action, including the contract of the selected method.

5. Write the custom business logic in the body of the method. For example, if you are creating a post-processing
directive for AbcCode.GetList() to filter out all records where AbcCode starts with an "A" value, you write
the following code:
namespace BpmCustomCode
{
public class MyABCCode
{
public void GetList(
ref System.String whereClause,
ref System.Int32 pageSize,
ref System.Int32 absolutePage,
ref System.Boolean morePages,
Erp.Tablesets.ABCCodeListTableset result,
Ice.Tablesets.ContextTableset)
{
result.ABCCodeList.RemoveAll(r => r.ABCCode.StartsWith("A"));
}
}
}

6. Build the project and deploy the custom method to the External Storage folder.

You can now select this custom action on a BPM directive.

.NET Process [VB.NET]

To enter the programming logic for a custom VB.NET external method:


® ®
1. Launch Microsoft Visual Studio .

2. Create an empty Class Library Visual Basic project.

3. Add your .vb file to the project. For example, AbcCodeAction.vb.

4. Now add the references to the assembles from the Server\Assemblies and Server\Bin folders. This resolves
all the types used in the custom action, including the contract of the selected method.

5. Write the custom business logic in the body of the method. For example, if you are creating a post-processing
directive for AbcCode.GetList() to filter out all records where AbcCode starts with an "A" value, you write
the following code:
Option Strict On
Option Explicit On

Imports Epicor.Data
Imports Epicor.Hosting
Imports Ice.Contracts
Imports Ice.Lib
Imports Ice.Tables
Imports Ice.Tablesets
Imports System.Data
Imports System.Linq
Imports System.Linq.Expressions
Imports System.ServiceModel

874 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

Namespace Bpm.Custom

Public Class MyABCCode


Public Sub GetList(
ByRef whereClause As System.String,
ByRef pageSize As System.Int32,
ByRef absolutePage As System.Int32,
ByRef morePages As System.Boolean,
ByVal result As Erp.Tablesets.ABCCodeListTableset,
ByVal context As Ice.Tablesets.ContextTableset)

result.ABCCodeList.RemoveAll(Function(r) r.ABCCode.StartsWith("
A"))

End Sub
End Class

End Namespace

6. Build the project and deploy the custom method to the External Storage folder.

You can now select this custom action on a BPM directive.

Deploy the External Method

When you finish developing your custom external method, you need to deploy it to the server. This section
describes how you deploy your compiled .NET C# or VB.NET assemblies.
As described previously, you place your external method .dll file in an External Storage folder. This folder is
specified in the web.config file within the customizationSettings section. Typically its directory path is the
Server\Customization\Externals location.
Now that these external method .dll files are in the External Storage folder, you can deploy these methods to
Business Process Management. You do not need to restart Internet Information Services (IIS). When you select
the Invoke External Method action on a directive, the external method and its compiled assembly display as
options on the action.

If you replace an existing external method with a new version


and your assembly is loaded into memory, you will need to
restart the server. The external method will then update to the
latest version.

Attach the External Method

To use your external method within a directive, you must create an action that references it.

Build the Method


To attach a .NET external method, you first create the directive:

1. In this example, you create a post-processing directive for the Erp.ABCCode.GetList business object method.

10.2.700 875
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

2. Click the Design... button.

3. The BPM Workflow Designer window displays.

876 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

4. From the Callers group, click and drag the Invoke External Method item to the workflow design area.

5. Now click the Start item. The Start item's connection points display.

6. Click and drag a connection from the Start item to the Invoke External Method item. When select the Invoke
External Method item, the Actions pane displays the Synchronously invoke specified Method from
external assembly action.

7. Accept the default Synchronous execution of this task.

8. Next select the external assembly you have created and deployed to the External Storage folder. Typically
its directory path is the Server\Customization\Externals location. Click the external link.

9. The Add Reference window displays, presenting all custom assemblies you have built. Select the custom
assembly from the list.

10. Click OK.

11. Now select the external assembly's method you have created. Click the specified method link.

12. The Add Reference window displays. Expand the selected assembly and select the GetList method.

10.2.700 877
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

13. Notice the two additional columns displayed for your information. The Is Static column displays Yes when
the assembly method is static. Otherwise, No is displayed.

14. The Requires BPM Context column displays Yes if a BPM Context is passed over to the selected external
method. If the method does not utilize a BPM Context data, the column displays No.
Within an external method accessing the BPM context, the BPM context parameter must be declared as
its last parameter. For example:
public void UpdateAsyncWithBpmContext(TipTableset ds, ContextTableset
context)

15. Click OK to close the Add Reference window.

16. The action statement is now connected to both the custom external method and the custom assembly.

878 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

17. Click the Save and Exit button.

Be sure you enable the directive and save it. You are now ready to test your custom external method.

Test the Method

Your custom external method filters any ABC codes that start with the "A" character. To verify this custom
external method works, launch a program that uses ABC codes.

1. For this test, you launch Warehouse Maintenance and find and select a warehouse.

10.2.700 879
Chapter 6 | Custom Business Process Management Epicor ICE 3.2 Tools User Guide

2. From the New menu, select New ABC Code.

3. The Cycle Count/Physical Inv>ABC Codes>ABC Code Detail sheet activates.

4. To find and select a code, click the ABC Code... button.

5. The ABC Code Search window displays.

880 10.2.700
Epicor ICE 3.2 Tools User Guide Custom Business Process Management | Chapter 6

6. Click the Search button.

7. Notice in the Search Results, the "A" ABC code does not display as an option. Through your external
method, users can no longer select this filtered ABC code.

10.2.700 881
Chapter 7 | Business Process Management Utilities Epicor ICE 3.2 Tools User Guide

Chapter 7: Business Process Management Utilities

Various utilities are available in the Business Process Management (BPM) module to help you:
• Export directives so they can be used in another Epicor installation.
• Import directives from another Epicor installation.
• Update a group of directives to apply new settings or to keep directives up-to-date when a new version of Epicor
is installed.
This chapter explains how to use the Directive Import and Export programs, which are useful for moving groups of
directives between Epicor ERP installations. You also learn how to use the Directive Update program to apply settings
to a group of directives or to ensure directives remain compatible with new versions of the Epicor ERP application. The
chapter concludes with discussion on what tools you can use to troubleshoot the BPM functionality.

Directive Management

To complete the BPM functionality, the module comes with programs that help manage your directives. You can
export your directives out to another Epicor installation, where they can then be imported. You can also update
the directives to make them compatible with the current version of the application.

Groups
This functionality suggests you use Groups. Each group contains related directives. By placing related directives
together, you can easily export, import, and update the directives as you need.
You create and select groups within the Method Directives, Data Directives, or Updatable BAQ Method Directives
programs. The Detail sheets in these programs all have a Group field. Use this field to create new groups or to
select existing groups. In either case, you define the group which the directive is placed inside for use in later
processes. For more information, read the Method Directives section in the Business Process Management
chapter.

882 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management Utilities | Chapter 7

Directive Export
Use the Directive Export program to export all the directives that belong to a selected group, a single service, or
a table. These directives are then exported to a single file at a location you define, so you can move your method
directives to another installation of the application.
BPM Users can only export those directives they have Read & Write access to. Note the following security restrictions
are applied when exporting directives:
• Exports of Base and In-Transaction directives are only available to a BPM Advanced User.
• Exports of Tenant Independent directives are only available to a Global Security Manager.
• Users can only export directives from their owning companies - companies they were created in.
To export a group of BPM directives:
Navigate to Directive Export.
Menu Path: System Management > Business Process Management > Directive Export

This program is not available in Epicor Web Access.

To use this program to export a group of method directives:

1. If you want to export all Method Directives created for a particular service, select the Method Directives
by Service radio button.

2. From the Service drop-down, select the service the directive you are exporting is applied to. For example,
ERP.Rpt.SOPickListReport.

3. To export all data directives created for a particular database table, select Data Directives by Table Name
option.

10.2.700 883
Chapter 7 | Business Process Management Utilities Epicor ICE 3.2 Tools User Guide

4. From the Table Name drop-down list, select a table for which you want to export directives.

5. To export all directives associated with specific group, select the Directives by Group option.

6. From the Directive Group drop-down list, select a group for which you want to export directives.

7. Select the Exclude SC credentials check box to remove the Epicor Service Connect credentials used in the
directive workflow, if necessary.

8. Enter the File Name for the exported file. This filename is the target path for the exported directive or set
of directives. You can enter the directory path and filename directly in this field, or click the Export to File
button to find and select it.
The default filename is export.bpm, but you can change this name if you need.
Note the following rules are applied when a filename or target location are incorrectly specified:
• If the BPM export process is unable to recognize the specified file name and directory, a temporary
filename is generated in the default location of a user's My Documents folder.

Example
C:\Users\<UserName>\Documents\tmpF4C9.bpm

• If the export location does not exist, but the file name is specified, for example, MyDirective.txt, the
export process will again drop the file in the user's documents folder.

Example
C:\Users\<UserName>\Documents\MyDirective.txt.bpm

• If the Export To File location is left clear, the default filename export.bpm is created and placed in the
default location of a user's My Documents folder.

Example
C:\Users\<UserName>\Documents\export.bpm

9. Click the Export button

10. Click OK to the message that directives have been successfully exported.

884 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management Utilities | Chapter 7

Directive Import
Use the Directive Import program to import a group of exported method directives into your application.
Here’s how you use this program to import a group of method directives:
Navigate to Directive Import.
Menu Path: System Management > Business Process Management > Directive Import

This program is not available in Epicor Web Access.

1. Click the File Name button to find and select the .bpm file you want to import.

10.2.700 885
Chapter 7 | Business Process Management Utilities Epicor ICE 3.2 Tools User Guide

2. Optionally, select the Destination Group inside which you want to add the directives.

3. Select the Replace Existing Group check box if you want the import program to delete the directives in
the existing group and replace them with the imported directives. If this check box is clear, the program
leaves the existing directives alone and then adds the imported directives into the group.

Each Directive Name is used as a description value and


not as an identifier. If you clear the Replace Existing Group
check box during the import process, you may have
multiple directives with the same Directive Name.

4. Click the Import button

5. Click OK to the confirmation that your method directives have been successfully imported into your
application.

Import User Rights


The following security restrictions are applied when importing directives:
• BPM users can only import those directives they have Read & Write access to.
• When the import file contains both allowed and disallowed directives, or the import results in overwriting or
deletion of existing directives a user cannot modify, the import process is denied.
• Imports of Tenant Independent directives are only available to a Global Security Manager.

886 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management Utilities | Chapter 7

Import Compatibility
The import program also checks the compatibility of each imported directive. The following describes how this
program checks the compatibility of each directive:
• If the directives have the same version number as the current application, the directives are imported; if they
are enabled and fail to compile, they are marked as Out of Date.
• If the directives are from a previous version of the Epicor application, the import process validates all methods
for compatibility. If any incompatible directives are found or enabled, directives fail to compile and an error
message displays. The incompatible directives are still imported; however, their status is set to Out of Date.
• If the directives are from a newer version of the application, the imported directives are rejected and the
application displays an error message.

Directive Update

Use the Directive Update program to perform mass updates of BPM directives.
Use the Directive Update Setup sheet to update the properties and recompile the directives within a selected
group. You can run this program to apply some primary options to all the group directives; for example, you can
use this program to enable all the directives in a group.
Use the Directive Recompile Setup sheet to recompile a group of directives, optionally refreshing signatures
of the methods or tables they are attached to, in order to make them compatible with the current version of the
application.
Use the Directive Cleanup Setup to remove a selected group of directives. This functionality is particularly
relevant in multi-company and multi-tenant installations. Security and Global Security managers can use this
utility to remove selected groups of directives in a specified scope across all available companies and tenants.
Use the SC Credentials Setup sheet to perform mass update of ESC server credentials stored in directives.
Typically, you need to update ESC credentials when running cross-company directives utilizing ESC Workflow
actions in a non-owning company.

This program is not available to ordinary users in multi-tenant


environments. Visibility of some features depends on the role
of the user: Security Managers (SMs) and Global Security
Managers (GSMs) have different sets of settings because unlike
SMs who can manage directives within a single tenant, GSMs
can manage directive groups across all companies and
tenancies.

Update a Directive Group


Navigate to Directive Update.
Menu Path: System Management > Business Process Management > Directive Update

This program is not available in Epicor Web Access.

Based on the license used in your Epicor ERP installation, this sheet is available to the following users:

Non Multi-Tenant license Multi-Tenant license


Available to all Users. Available to Security and Global Security Managers.

Here is how you update a directive group:

10.2.700 887
Chapter 7 | Business Process Management Utilities Epicor ICE 3.2 Tools User Guide

1. Select the Group of directives you want to update.

2. Select or enter the New Group inside which the updated directives are placed. You can select an existing
group from the list – including the original group. You can also enter a new group name in this field.

3. Select the Enabled check box to activate all the directives within the group.
To disable all directives in a group, clear the Enabled check box. To leave this property unchanged for all
directives, leave the checkbox in its initial state.

4. Use this field to change the scope of directives in a group.


The following options are available:
• <Unchanged> - Default option; leaves this property unchanged for all directives in a group.
• Company Specific - By selecting this option you set the directives to only work in their owning company's
scope.

This option is available to any BPM user. However, a


user must be provided with Advanced BPM rights if
any of the affected directives contains elements
available to advanced users only.

• Company Independent - By selecting this option you set the directives to work in all companies on a
regular installation.
If Multi-Tenant license is used, these directives work in all companies belonging to the tenant ID of their
owning company. This gives you the ability to utilize tenant specific, company independent directives.

This option is available to any BPM user logged into


the company owning the directives. However, a user
must be provided with Advanced BPM rights if any of
the affected directives contains elements available to
advanced users only.

888 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management Utilities | Chapter 7

• Tenant Independent - By selecting this option you set the directives to work in all companies of the
installation. This option only displays if Multi-Tenant license is used and it is only available to a user having
Global Security Manager rights.
If Multi-Tenant license is not installed, Company Independent and Tenant Independent directives work
the same way at runtime - in all companies.

The options/values for tenant and multi-tenant features


are only for Epicor hosted environments. Typically you
can ignore these options. Internal Epicor administrators
who need more information should refer to the Epicor
SaaS Installation Guide.

5. Click the Start Update button. Your options are applied to all the directives within the selected group.

Recompile a Directive Group


If you upgrade your Epicor ERP application, some of directives created in previous application versions may become
incompatible with the new system due to changes done, for example, to the system API, database structure,
field types, or method parameter types for a method that was customized by a BPM directive. Existing directives
referencing user-defined fields may also become incompatible, if the type of the field is changed or the field is
removed.
When upgrading to the new Epicor ERP version, all directives are checked against the updated state of the system,
when the administrator runs corresponding mandatory upgrade task in the Conversion Workbench program.
This process is one of the tasks involved in the upgrade process.
Although you can recompile each directive individually within the respective Directives Maintenance program,
you can instead recompile all the directives affecting the current company using the Directive Update program.
If any recompile error occurs, use this approach to review the results log, indicating what is causing the error in
each directive.

10.2.700 889
Chapter 7 | Business Process Management Utilities Epicor ICE 3.2 Tools User Guide

A situation may occur, when more than one BPM directive of a particular Business Object Method, Database
Table or an updatable BAQ method fails to compile. This prevents users to disable or remove a single directive
using respective Directive Maintenance program, since this action results in an unsuccessful attempt to compile
the rest of directives.
Epicor recommends you first recompile all directives using the Both outdated and up-to date directives option
selected on this tab. Those method, data and uBAQ directives that could not be recompiled, become Outdated.
At this stage, users can delete, disable or adjust directives as needed. To recompile the directives again, on
any of the affected directives, modify the Outdated check box to mark the directive as Compatible. Enable
the directive if you it to be invoked, and click Save.

Based on the license used in your Epicor ERP installation, this sheet is available to the following users:

Non Multi-Tenant license Multi-Tenant license


Available to all Users. Available to Security and Global Security Managers.

The options/values for tenant and multi-tenant features are


only for Epicor hosted environments. Typically you can ignore
these options. Internal Epicor administrators who need more
information should refer to the Epicor SaaS Installation Guide.

Follow these steps to fix directives by group:

1. Navigate to the Directive Recompile Setup sheet.

2. In the Directive type field, select the type of directives you wish to recompile. The available options are:
• Method directives
• Data directives
• Method and Data directives

890 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management Utilities | Chapter 7

3. In the Directive state field, select the compatibility level of the directives you want to recompile.
• Outdated directives only – Runs the compile against enabled directives affecting the current company,
marked as Outdated. This action marks all directives that compile successfully as Compatible.
• Up-to-date directives only – Runs the compile against enabled directives affecting the current company,
marked as Compatible. This action marks all directives that fail to compile as Outdated.
• Both outdated and up-to-date directives – Runs the compile against all the enabled directives affecting
current company, and marks them according to the result of the compile process.

4. If you select the Refresh Signatures checkbox, then method and trigger signatures of selected directives
will be regenerated at the beginning of the recompile process.

5. The options available in the Owned by field depend on the role of the current user. This field is not visible
to ordinary users who can only recompile enabled directives in the current company. If you do not have
Security/Global Security Manager rights, proceed to Step 6.
A Security Manager can select one of the following available options:
• Current Company - Select this option to recompile all selected directives in the current company.
• All - Select this option to recompile all selected directives in all companies of an organization, or of the
current tenant.
Options available to a Global Security Manager:
• Current Company - Select this option to recompile all selected directives in the current company.
• Current Tenant - In a multi-tenant environment, this option allows recompiling all selected directives
in all companies belonging to the current tenant.
• All - In a multi-tenant environment, select this option to recompile all selected directives in all companies
across all tenants.

6. Click the Start Recompile button. The recompile process runs against the selected directives.

10.2.700 891
Chapter 7 | Business Process Management Utilities Epicor ICE 3.2 Tools User Guide

7. The Directives processing results window displays.

8. In this example the directives recompiled successfully and are now compatible within the current version of
the Epicor ERP application.

If any directives could not recompile, each recompile error


displays on a separate row within the grid, detailing the
compile error.

9. To exit the results window, click Close.

Remove a Directive Group

Use the Directive Cleanup Setup sheet to remove selected directive groups.

This sheet is only available to users with Security Manager (SM)


and Global Security manager (GSM) rights.

The cleanup functionality facilitates directive management across companies and tenancies. Depending on the
user role - SM or GSM, it allows selecting and removing the existing directive groups within a company, across
all companies in an organization, or tenancy, or across all companies in all tenancies.
Follow these steps to remove a selected group of directives:

1. Navigate to the Directive Cleanup Setup sheet.

892 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management Utilities | Chapter 7

2. In the Directive type field, select the type of directives you wish to remove. The available options are:
• Method directives
• Data directives
• Method and Data directives.

3. Select the scope of the directive group you wish to remove:


• Select the Company Specific option to remove directives pertaining to the current owning company.
• Select the Company Independent option to remove directives pertaining to all companies of an
installation, or of a single tenancy in case of a multi-tenant environment.
• Select the Tenant Independent option to remove directives pertaining to all companies across all
tenancies.

This option is available in the multi-tenant environment


to users with Global Security Manager rights only.

4. In the Owned by field, select the scope of the cleanup process.

10.2.700 893
Chapter 7 | Business Process Management Utilities Epicor ICE 3.2 Tools User Guide

Options available to a Security Manager:


• Current Company - Select this option to remove directives in the current company.
• All - Select this option to remove directives in all companies of an organization, or of the current tenant
in case of a multi-tenant environment.
Options available to a Global Security Manager:
• Current Company - Select this option to remove directives in the current company.
• Current Tenant - In the multi-tenant environment, this option allows removing all directives in all
companies belonging to the current tenant.
• All - In the multi-tenant environment, select this option to remove all directives in all companies across
all tenants.

5. Click Start Cleanup.


The warning message displays. Click Yes if you wish to continue, otherwise click No to cancel the process.
It is strongly recommended to create a database backup or to export existing BPM customization prior
to launching the Directive Cleanup process.

6. Once the process is complete, the Directives processing results window lists the details of the removed
directives.

894 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management Utilities | Chapter 7

7. Click Close to exit the results window.

Update ESC Credentials

Use this sheet to perform mass update of ESC server credentials stored in directives. Each Call SC Workflow
action used in BPM directives stores the ESC server, login and password data. You can select whether to update
any directive or only those belonging to a specified group.

If you run a cross-company directive in a company that does


not own the directive, the credentials entered during the design
in the owning company are used. However, if the non-owning
company utilizes another ESC server, use this sheet to supply
the new credentials.

Based on the license used in your Epicor ERP installation, this sheet is available to the following users:

Non Multi-Tenant license Multi-Tenant license


Available to all Users. Available to Global Security Managers.

1. Navigate to the SC Credentials Setup sheet.

2. If you want to update ESC credentials within a specific group of directives, select a valid Directive Group.

10.2.700 895
Chapter 7 | Business Process Management Utilities Epicor ICE 3.2 Tools User Guide

By leaving the default <Any> option selected, ESC credentials within directives become updated, regardless
of a directive group they belong to.

3. Within the Current Credentials section, first specify for which ESC server credentials you want to update.
The following options are available for selection in the Server field.
• <Company Default> - Use this option to update Call SC Workflow actions using default company ESC
credentials. The default credentials are defined on the Company Maintenance > General Settings sheet.
• <Any Server> - Use this option to update any ESC server credentials stored in Call SC Workflow actions
including the company default credentials.
• <Specific ESC server name> - The list of all ESC Server names used within Call ESC Workflow actions,
including the company default one display on the list.

4. When updating credentials of a specific ESC server, several options become available for selection.

5. By using the default All SC Users option, update is made for any ESC user of the particular ESC installation
referenced within Call SC Workflow actions.

6. The Specified SC User option indicates you want to update the login credentials for a specified ESC user
only.

7. In the User field, specify the name of the current ESC user for whom you want to modify login credentials.

8. Now, select the method to supply the New Credentials. By selecting the Company Default Server option,
the current credentials within the affected SC Call Workflow items are updated with the default ESC
credentials specified in Company Maintenance.

896 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management Utilities | Chapter 7

9. To call another ESC Server when affected directives execute, use the Specified Server option.

10. This option activates Server, SC User and SC Password fields. Enter the new credentials in these fields.

11. To verify the connection to the specified ESC server is established, click the Test Connection button.

12. Click Start Update to launch the update.


The affected directives are updated.

13. The Directives processing results window displays details of the affected directives.
If any errors occur during the update process, error details are also displayed in this grid.

14. Click Close to exit the results window.

10.2.700 897
Chapter 7 | Business Process Management Utilities Epicor ICE 3.2 Tools User Guide

Troubleshooting Actions
Tools are available to help you further troubleshoot your actions. This section describes how these tools can help
you correct issues that may occur when using the BPM functionality.

BPM Tracing
This section explores how you can use both Client and Server side logs to analyze whether your BPM directives
are efficient and effective.

Client Trace Log

Use the Tracing Options Form to set up a tracing log that captures all the calls the client makes to the server.
When you activate this log, any business logic (BL) calls sent to the server automatically track within this log.
Run this log to fine-tune your BPM directives. You can use it to find out which business logic method calls are
sent to the server. You can also find out the duration of these business calls and the data that each call sends to
and from the server.
The client tracing log can be activated in two ways. Your system administrator can activate the client tracing log
on your user account and determine what information this log tracks. Then each time you access the Epicor ERP
application through your account, a client log automatically generates that uses the selected tracking options.
You can also manually activate this tracing log in a client. Just like the user account setting, you can then decide
what transactions you want to trace and the directory path where this client tracing log generates.

Activate From User Account

You or a system administrator can set up the client log to automatically run each time you log in through your
user account.
You activate the tracing log through User Account Security Maintenance.
Menu Path: System Setup > Security Maintenance > User Account Security Maintenance

1. On the Detail sheet, click the User ID... button to find and select the user account you wish to update.

898 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management Utilities | Chapter 7

2. Click on the Tracing sheet.

3. Select the Enable Trace Logging check box.

4. Select the Write Full DataSet check box to record the entire dataset content including the method parameter
structure and data (if any) that passes between the client and the server. Each time a method sends data,
it now appears in the client log with the method. When this check box is cleared, only the structure is
recorded.

10.2.700 899
Chapter 7 | Business Process Management Utilities Epicor ICE 3.2 Tools User Guide

5. Select the Track Changes Only check box if you only want changes to the dataset recorded within the
tracing log. All changes to columns in the dataset are then stored within the log.

6. Activate the Include Server Trace check box when you want to track the client's interaction with the server.
This creates a <serverTrace> node within trace packets (<tracePacket>) in the client tracing log. Use the
database activity gathered in this section to review how the client installation may be affecting the
performance of the server.
You can add server profiles and traces to the client log. When you select the Include Server Trace check
box, the client log captures these additional options. To add these profiles and traces to the client log,
update the .sysconfig file that launches the client installation. You can also customize what the tracing
log tracks by creating a client configuration file that contains additional tracing options and logging levels.
These custom options are used when you activate the client tracing log.
For more information, review the Performance Tuning Guide in the application help. The Custom
Trace Logs section documents how you add these server profile and custom trace options.

7. Use the Write Call Context Dataset check box to include Business Process Management (BPM) table values
on the trace log. This information provides the data context for a call each time a call is sent between the
client and the server. This information is useful for developing BPM method directives, as you can intercept
these calls to run additional processing that verifies data and other custom functions.

8. Numerous method calls occur where the data is passed down, modified, not written to the database, and
then returned to the client. Select the Write Response Data option to include these database transactions
on the trace log. This only applies to datasets that get updated or returned from the server call.

You may need to clear this check box if your system has
performance issues when tracing is enabled.

9. Now select the Log Directory Scheme option for the default log directory. The option you select defines
the directory path scheme for this client account.

If you select the Default from Epicor.exe.config file option,


you use the path defined in the Epicor.exe.config file. This
config file is located in the Client directory for each Epicor
ERP installation.
To learn how to set up this feature, review the Auto
Capture Client Logs topic in the Performance Tuning
Guide. This guide is found in the application help under
the System Management > Working With > node.

Notice after you select a scheme option, the Current Log Directory field displays the default directory path
and folder that gathers the client logs for this user account.

10. Click Save.

The next time you launch the Epicor ERP application with this account, a client log automatically generates using
the selected Dataset Options. It generates in the default file location specified on the user account.
A new log file is created each time you log into the application with this user account. If you log into multiple
computers through the same user account, a new log generates for each client instance.

900 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management Utilities | Chapter 7

Activate From Client

You can manually activate the tracing log on a client installation.


'When you activate the tracing log through a client, you can also select the directory where this log generates.
This directory path overwrites the directory path that may be defined on the user account within User Account
Security Maintenance.
To activate the trace log on a client:

1. When you run the application using the Classic interface, you activate the trace log from the Main Menu.
Click Options > Tracing Options.

2. When you run the application using the Modern Shell interface, you can activate the trace log in a couple
ways. Click the Down Arrow at the bottom of the window to display the toolbar.

3. Then click the Tracing Options button.

4. You can also click the Settings tile. From the General Options, select Tracing Options.

10.2.700 901
Chapter 7 | Business Process Management Utilities Epicor ICE 3.2 Tools User Guide

5. If you run the application using the Kinetic Home Page style, on the Home Page, select Tracing Options
from the Overflow menu.

Alternately, click the User icon at the bottom left corner of the window and select More Settings.

902 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management Utilities | Chapter 7

6. On the Settings page, select General Options > Tracing Options.

7. Whichever way you access it, the Tracing Options Form window displays. Use this window to define how
the Tracing Log captures the BL calls.

10.2.700 903
Chapter 7 | Business Process Management Utilities Epicor ICE 3.2 Tools User Guide

8. Select the Enable Trace Logging check box to activate the tracing log. All calls made by the user interface
to the server are automatically recorded within the tracing log.

Select Tracing Options

You can also decide how you want to view the client tracing log.
To make it easier to locate information, you can organize it by entering Mark Text; all calls that reference this
mark text are then grouped together. You then have the option to display this log either as a text (.txt) file or as
an .xml file.

A pre-built .xml style sheet is included with this functionality.


Typically you would use the .xml file option, as it organizes
these calls in a readable format.

To decide how the tracing log displays:

1. Select the Dataset Options you want the client trace log to track. Each option you select causes the log
to record another type of transaction data.

Notice these options match the ones available on User


Account Security Maintenance; for information on each
option, review the previous Activate From User Account
topic.

904 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management Utilities | Chapter 7

2. Select the Include Server Trace check box to enable server tracing.

3. Activate the BPM Logging check box to record Business Process Management (BPM) method calls. Each
time user activity activates a BPM directive, the application server log records the business object method
that was called and how long this call took to complete. This option is production friendly.

4. The Current Log File displays the directory path and filename for the tracing log. If your system administrator
activates the client log through User Account Security Maintenance, the default directory path defined
on the user account displays in this field. However you can enter a different directory path in this field or
click the Browse (...) button to find and select it. After you click Apply or OK, this custom directory path
becomes the default location that stores the generated log files for this client.

5. Click the View button to display the log within a .txt format.

6. Enter Mark Text to organize the tracing log so it is easier to review. To use this field, enter the text you
need and then click the Write button. All the calls that reference this mark text are grouped together within
the same section of the tracing log, for example, ABC Code Lookup.

7. The XML File field displays the directory path and filename for the .xml version of the tracing log. Click the
Browse button to find and select this directory path and filename.

8. Click the Create XML button to save the tracing log within the default .xml format. This file can then be
viewed within any web browser. The Mark Text values you enter for this log also appear as options on the
.xml file.

9. To remove all entries from the tracing log, click the Clear Log button.

10. To add all these current settings to the tracing log, click the Apply button.

11. To exit the Tracing Options Form window, click OK.

10.2.700 905
Chapter 7 | Business Process Management Utilities Epicor ICE 3.2 Tools User Guide

Server Trace Log

The server trace log is an important tool for managing both application and performance issues. You can configure
the trace log to record the BPM specific transaction data you need to review.

You can also enable BPM tracing on the Tracing Options Form
in the Client. Review the Activate From Client section for more
information.

To enable the BPM tracing functionality:

1. You launch the Epicor Administration Console from your server machine. Depending on your operating
system, you launch this tool in different ways:

a. If you are on Windows SQL Server 2008 R2, click Start > All Programs > Epicor Software > Epicor
Administrative Tools > Epicor Administration Console.

b. If you are on Windows SQL Server 2012, press the <Windows> + F button to display the Charms bar;
from the Apps screen, select Epicor Administration Console.

The Epicor Administration Console displays.

2. From the tree view, expand the Server Management node and Epicor Server node.

3. Select the application server you need to monitor.

906 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management Utilities | Chapter 7

4. Now from either the Action menu or the Actions pane, select Application Server Settings.

5. In the Application Server Settings window, Enable the Trace Log and configure Log File Location.

6. Within the Standard Logging information, select the BPM Logging check box to record Business Process
Management (BPM) database calls.
Each time user activity activates a BPM, the application server log records the information and gathers the
data results.
By selecting the BPM Logging check box, you enable the following trace flag in the trace.config configuration
file:
<add uri="trace://ice/fw/BPM" />
The above trace URI tracks the complete BPM information that includes the following:
• Business Object customizations made through Method Directives
• Data Triggers created using Data Directives
• uBAQ customizations - method directives of Updatable BAQs with BPM update
For a detailed analysis, the trace URI can be manually configured to narrow down and adjust the information
being tracked:
• trace://ice/fw/BPM/BO - to track BO customizations only
• trace://ice/fw/BPM/DB - to track data triggers only
• trace://ice/fw/BPM/DQ - to track UBAQ customizations only
• trace://ice/fw/extensibility - to track asynchronously executed BPM actions such as asynchronous Execute
Custom Code actions or asynchronously sent e-mails.

10.2.700 907
Chapter 7 | Business Process Management Utilities Epicor ICE 3.2 Tools User Guide

7. Click Apply to save your changes.

8. As a result, the server log records the following information:

Example
Op Utc="2013-10-30T13:40:45.2677063Z" ac
t="Ice:BO:Tip/TipSvcContract/Update" dur
="1006.1712" cli="fe80::d147:d8f4:e54e:5
149%10:42111" usr="manager" machine="MOS
-TLS-DEV-AAA" pid="10788" tid="5">
<BpmCustomization Source="BO" BpMethod
Code="ICE.Tip.Update" Type="BO Customiza
tion" ExecutionInterruptedOnDirective="6
300f64f-ccd6-4617-9105-a9784736eb54" Dur
ation="530.9098">
<BpmDirective Type="PreProcessing" I
D="6300f64f-ccd6-4617-9105-a9784736eb54"
Name="MyBPMDataForm" IsCompanyIndepende
nt="false" Duration="7.9992" />
</BpmCustomization>
</Op>

For each BPM call, the BpmCustomization node is created with following attributes:

Node Description
Source Displays the source of the BPM information. Possible values:
• BO - Method Directives
• DB - Data Triggers
• DQ - uBAQ Method Directives

BpMethodCode The method invoked by the BPM.


Type Displays the Type of the BPM call. Possible values:
• In Transaction Trigger
• Standard Trigger
• BO Customization
• uBAQ Update Processing

ExecutionInterruptedOnDirective Applies to BPM Data Form execution only. When the BPM Form invokes,
the service call exits and returns control back to the client. The client then
calls the service again. Therefore, in case of BPM Data Forms two different
operations are tracked.
This value displays the directive's GUID from which the service call was
interrupted.

ExecutionResumedFromDirective
For the second BPM Data Form operation, this value displays the directive's
GUID from which the service call was resumed.

Duration Time spent on executing a BPM call.

Within the BpmCustomization node, the BpmDirective node holds the following attributes:

908 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management Utilities | Chapter 7

Node Description
Type Type of the Directive. Possible values:
• Pre, Base, Post - for Method Directives and uBAQ Method Directives
• Standard, In Transaction - for Data Directives

ID Displays the directive's GUID.


Name Name of the directive.
IsCompanyIndependent Displays if the directive is active for all companies in the application.
PreparationStepDuration The duration of the directive's preparation step. If there was no preparation
for this directive, this attribute is absent.
Duration The directive's execution time.

• A single service call may trigger a lot of BPM customizations, even the customizations of different BOs
and tables. They all will be listed under the Op node of this operation.
• The execution of one directive may lead to other customizations being executed, and in case of
synchronous execution (in-transaction triggers, sync invocations of other BO methods), the duration
of the "child" directives will also be counted into the duration of "parent" directive.
• Default BO method execution duration (in case it's not overridden by a BaseProcessing direction) is
not counted as part of BO Customization duration.
• Since tracing engine allows the user to switch on some tracing functionality for a particular BO calls,
or specific method invocations, it applies to BPM tracing out of the box.

Debugging Using Visual Studio

If you have Microsoft® Visual Studio™ 2010 or higher, you can debug execution of custom code directives.

Prerequisites

This topic discusses steps you need take to before you start debugging.
The Epicor Customization Framework (ECF) supports two ways of storing generated assemblies. The preferred
method, which is either SQL BLOB (Binary Large Object) or File System Storage is defined in the Epicor ERP 10
web.config file within the customizationStorage provider property.
Before you start debugging, do the following:
• In order to load the program database (pdb) file that holds debugging symbols, verify the loadPdb property
found in the web.config is set to true.
loadPdb ="true"

• Verify the intermediateFolder, where directive sources are generated contains in a valid path. For example:
intermediateFolder="C:\_projects\2012R\Current\Deployment\Server\BPM">

Example Your web.config settings may look as follows:


<customizationSettings
loadPdb ="true"
disabled="false"
intermediateFolder="C:\_projects\2012R\C

10.2.700 909
Chapter 7 | Business Process Management Utilities Epicor ICE 3.2 Tools User Guide

urrent\Deployment\Server\BPM">

<customizationStorage provider="SqlBlob"
settings="" />
<externalsStorage provider="FileSystem"
settings="C:\_projects\2012R\Current\Depl
oyment\Server\Customization\Externals" />
....

• To reload customization assembly and debug symbols, restart IIS. Alternatively, only restart the Epicor ERP
application pool.

Debug BPM Directive

This topic explains how you can debug customization assembly compiled by the Epicor Customization Framework.

1. By default, sources are found in the BPM folder of the Server directory.

A different sources folder can be specified using the


intermediateFolder attribute in the server web.config
file.
Make sure that the folder specified in the
intermediateFolder attribute exists at the time IIS AppPool
used by the Epicor 10 application starts. Also, verify the
account used by that AppPool has read and write access
to that folder. Otherwise, the setting is ignored and
sources are saved in the system's TEMP folder.

2. Notice each folder contains all BPM revisions.

910 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management Utilities | Chapter 7

New sources are generated each time you save the


directive.

3. Make sure you are working with the latest BPM sources when debugging a directive. Drag and drop all files
into the Microsoft Visual Studio.

4. For debugging Options, make sure the Enable Just My Code and Require source files to exactly match
the original version options are clear.

5. Attach the debugger to the w3wp.exe process the application pool is running under.

10.2.700 911
Chapter 7 | Business Process Management Utilities Epicor ICE 3.2 Tools User Guide

6. Now you can set the breakpoint in the custom code.

7. Run the routine in the Epicor client. When the BPM customization is fired, the breakpoint is activated and
you can verify each step in the Visual Studio.

912 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management Utilities | Chapter 7

8. If the breakpoint is not hit, do the following:

a. Close the Epicor client.

b. Restart IIS, or Epicor server application pool.

c. Launch the Epicor client again and regenerate the directive to update directive sources.

By default, IIS7 app pool can only use 90 seconds for a non-responsive application. During IIS web
application or website debugging time, you may want to change its corresponding application Pool
advanced setting's "Ping Maximum Response Time" to a time much longer, or turn off "Ping Enabled"
setting.

Debug Custom Project

This topic outlines how you can debug custom project or solution created in Visual Studio.
In this example, a project is used to define the programming logic for a custom AbcCode.GetList() external method
written in C# .NET.

1. When building an external assembly project, make sure that:


• Project assembly name and namespace are specified. Assembly must be the same as initial customization
assembly name, for example Erp.Bpm.BO.ABCCode.GetList. A common practise is assembly name and
assembly filename be the same.
• All project references and relative paths are properly specified. In this example, project references from
Server\Bin and Server\Assemblies folders located in the Epicor ERP 10 server installation are used.
• A project is compiled and external method .dll file is placed in the External Storage folder. Typically its
directory path is the Server\Customization\Externals location.

10.2.700 913
Chapter 7 | Business Process Management Utilities Epicor ICE 3.2 Tools User Guide

2. Invoke the .NET external method you created using a directive. In this example, a post-processing directive
for ABC.GetList BO method is used.

3. In Visual Studio, attach the debugger to the w3wp.exe process the application pool is running under.

4. Set the breakpoint in the custom code and run the routine you want to debug in the Epicor client.

5. At this point the debugger stops at the specified break point and you can the follow code execution, examine
variable values and so on.

914 10.2.700
Epicor ICE 3.2 Tools User Guide Business Process Management Utilities | Chapter 7

Disable BPM

You can use the customizationSettings section found in the web.config located in the server folder of your
Epicor ERP installation to control the application's customization engine.

Example

<customizationSettings disabled="false" intermediateFolder="C:\Inetpub\wwwroot\


EpicorERP10\Server\BPM">
<customizationStorage provider="FileSystem" settings="C:\Inetpub\wwwroot\Ep
icorERP10\Server\Customization" />
<externalsStorage provider="FileSystem" settings="C:\Inetpub\wwwroot\Epicor
ERP10\Server\Customization\Externals" />
<types>
<add name="BPM.BO" folder="BO" cacheName="Epicor_Ice_BPM_BO" />
<add name="Posting" folder="PE" cacheName="Epicor_Ice_PE" />
<add name="ElectronicInterface" folder="EI" cacheName="Epicor_Erp_EI" />
<add name="Expressions" folder="ECF" cacheName="Epicor_Erp_Expressions" /
>
<add name="ProductConfigurator" folder="PC" cacheName="Epicor_Ice_PC" />
<add name="BPM.DT" folder="DT" cacheName="Epicor_Ice_BPM_BO" />
<add name="BPM.Ubaq" folder="Ubaq" cacheName="Epicor_Ice_BPM_BO" />
</types>
</customizationSettings>
When you set customizationSettings disabled = "true", you turn the customization engine off. This means
Method Directives, Data Directives and uBAQ Method Directives processed via BPM are not executed. However,
you can still edit, add and remove BPMs but these changes are saved to the database only and no binaries are
being recompiled or deleted.
When customization engine is turned back on (customizationSettings disabled = "false"), old binaries are
applied. To get the binaries up to date:
• Recompile all Method and Data Directives using the Directive Update program.
Menu Path: System Management > Business Process Management > Directive Update

This program is not available in Epicor Web Access.

• Recompile and refresh BPM binaries related to selected updatable queries using the Updatable Query
Maintenance program.
Menu Path: System Management > Upgrade/Mass Regeneration > Updatable BAQ Maintenance

If an incorrectly configured BPM directive prevents the system from operating or the user from logging in,
removing incorrect directives with disabled BPM is not enough. The user should remove affected binaries from
the Server > Customization folder, for example, from C:\inetpub\wwwroot\EpicorERP10\Server\Customization
and then remove or disable incorrect directives.

The customizationSettings disabled = "true" setting also turns


off other customization engine clients besides BPM that are
defined in the web.config, such as Posting or Product
Configurator.

10.2.700 915
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

Chapter 8: Global Alerts

Global alerts are messages you activate to help specific users track data activity.
You can activate two types of global alerts:
• Standard Global Alerts - Pre-defined alerts you activate in Global Alert Maintenance. For a selected alert, you
can choose options for enabling the alert, sending email messages, and adding memos to the record that triggered
the alert. Enabling memos helps build a database history for the record.
An active standard global alert writes alerts to the AlertQue table in the application database. To enable email
alert messages, you must set up and activate a supporting Business Process Management (BPM) data directive that
monitors the AlertQue table and sends alert email messages whenever a row is added to the table. Since all standard
global alerts write to AlertQue, this BPM data directive sends email messages for all active standard global alerts
that have the Send Alert option enabled in Global Alert Maintenance.
• Custom Global Alerts - Alerts you set up through BPM data directives. In the data directive, you determine which
table/column you want to monitor, the table condition that triggers an alert, the custom message sent in the email,
and who receives the custom global alert.
Email alert messages for both standard and custom global alerts can be configured to include a shortcut.sysconfig
file the message recipient can use to launch the Epicor application and display the record that triggered the alert.
By using both standard and custom global alerts, you can set up a complete automatic communication system. Individuals
throughout your organization could then be better able to respond to and resolve customer, supplier, and internal
issues.

Global Alerts Setup


Before you can activate standard global alerts that send email alert messages, the Epicor application must be
configured to send email messages and you must create a Business Process Management (BPM) data directive
to send email messages when alerts are triggered. To do this, set up the following:
• Configure the current company to handle email processing in Company Maintenance.
• Create a shortcut file attached to each standard global alert that can be used to open the application. Create
the template for this file in Alert Attachment Maintenance.
• To complete the setup, create a BPM data directive for standard global alerts that automatically processes the
global alerts email. Create and activate this directive in Data Directives.

Company Maintenance - Email Settings

Use Company Maintenance to define the email settings for the current company. The global alerts data directive
uses these settings to send standard global alerts throughout the current company. A custom global alert data
directive also will use these settings for sending email alerts.
On the Emails and Forms sheet, you enter the SMTP Server that distributes email throughout your company.
A SMTP Server must be defined for each company in your organization. Much like a post office receives and
delivers mail to various locations, a SMTP Server receives
®
your company's
®
email and distributes it throughout your
company's email application, for example, Microsoft Office Outlook . When the Global Alerts data directive is

916 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

activated by a global alert, the email is automatically sent to the SMTP Server you define in this program. While
a SMTP Server is required, an Exchange Server is not needed to distribute alert messages.

The default settings for some virus protection programs and/or


firewalls block Port 25 to prevent malware programs from
sending email. Your system administrator may need to unblock
the port or add w3wp.exe (IIS Worker Process) to the excluded
processes for outbound process on the Epicor ERP server.

To define the email settings:

1. Navigate to Company Maintenance.


Menu Path: System Setup > Company/Site Maintenance > Company Maintenance

This program is not available in Epicor Web Access.

2. Click the Email and Reporting sheet.

3. In the Email Link group box, the Port field specifies the email link port number for email messages that
distribute within the current company. Be sure to enter an unused port number within this field. The port
number should be high enough to ensure it is not used anywhere else. For example, 7778 is a valid entry
in this field.
This port is used when sending a global alert with a shortcut link (shortcut.sysconfig). When the alert is sent,
the application listens on this port to retrieve the correct data in the program linked to the shortcut.sysconfig
file.

4. In the Email Address field, specify the default From email address used to send global alert email. Some
examples of a From email address are [email protected] and [email protected].

10.2.700 917
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

If necessary, you change this address on a specific alert.

5. Now for the Email Label field, specify the default From email label displayed on global alert email. For
example, Epicor Auto Mail.
Just like the Email Address value, you change this label on a specific alert.

6. In the SMTP Server field, enter the server that processes your company's email. For example, enter
smtp.epicor.net.

7. In the Port field, enter the port number for your company's SMTP server. For example: 25

8. Click Save and then close Company Maintenance.

Alert Attachments - Shortcut Link

Each standard or custom alert can have a shortcut link (shortcut.sysconfig) file attached to it. When an alert is
triggered, this file is generated based on a template that is set up in the Alert Attachment Maintenance program.
Users that receive these global alerts can use the shortcut.sysconfig file to open the Epicor application to the
program and record that caused the alert.
When the global alert generates, the shortcut.sysconfig is included as an attachment on the email. Users can
then copy the .sysconfig file into their client installation, and then launch the Epicor application through this file.
Two methods are available for associating client installations so they launch with these shortcut link files.
• Permanent Link -- Locate the Epicor.exe file used to launch the application on the client, and associate the
shortcut.sysconfig file with this .exe file. When users receive a global alert, they save the shortcut.sysconfig
file to their client/config folders.
• Temporary Link -- Users can access the Epicor desktop icon's properties and update the Target field with
a run time argument that points to the shortcut.sysconfig file. To restore the default .sysconfig file, users
access the desktop icon's properties again and remove the run time argument.
The standard global alert examples in this guide use a base shortcut.sysconfig file that references the AlertQue
table. In the custom global alert example later in this guide the shortcut.sysconfig file template is refined to
reference the table monitored by custom alert.
Do the following to create the shortcut.sysconfig file template for standard global alerts:

1. Navigate to Alert Attachment Maintenance.


Menu Path: System Management > Business Process Management > Alert Attachments

918 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

2. In the Table field, enter AlertQue and press Tab.


If you are asked if you want to create a new record, click Yes.
The AlertQue table is added to the Tree View.

3. Click Save and then close Alert Attachment Maintenance.

A template for creating shortcut.sysconfig files now is available to the application. When the standard global
alerts are created and triggered in later examples, the data directive will generate a shortcut.sysconfig file that
can be used to open the application program. The file will be attached to the alert email.

Alert Data Directive for Standard Global Alerts

To enable standard global alerts to send email alert messages, you need to create a Business Process Management
(BPM) data directive that monitors the AlertQue application table in the application database.
A BPM data directive is a set of conditions and actions associated with a specific database table. Data directives
typically track data changes before they are applied to the database.
The example in this section demonstrates how to create a data directive that monitors the AlertQue table for
global standard alerts and sends messages out to the recipients defined in a standard global alert's configuration.
The standard global alerts discussed in the Standard Global Alerts section use this data directive.
The Custom Global Alerts section later in this chapter explains how to create a custom global alert by setting
up a data directive that monitors a specific database table and how to set the conditions for triggering alerts
based on changes in the monitored table.

Create Data Directive

Create a new BPM data directive.

1. Navigate to Data Directive Maintenance.

10.2.700 919
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

Menu Path: System Management > Business Process Management > Data Directives Maintenance

This program is not available in Epicor Web Access.

2. In the Table field, type alertque and press Tab.


AlertQue is added to tree. This is the same table you selected for association with the shortcut link in the
previous task.

3. Navigate to the Standard Directives > Detail sheet.

4. Click the Down Arrow next to the New button; select New Standard Directive.

5. For the Directive Name, enter Global Alerts and press Tab.

920 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

6. Click the Design... button.

The BPM Workflow Designer displays.

Define the Condition

Define the condition you will use to trigger global alerts.

1. Working in the BPM Workflow Designer, click the Condition icon in the left pane and drag it to the Design
area.

10.2.700 921
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

2. Click the new Condition node to give it focus.


The Condition tab displays at the bottom of the Design area.

3. In the Condition tab, click the New button.

A new condition row displays on the Condition tab.

4. On the right side of the new condition row, click the Down Arrow and select the There is at least one
updated row in the specified table option.

5. Click the updated drop-down arrow; change this option to added.

6. Click the specified link.


The Select Table window displays.

7. Find and select the ttAlertQue table.

922 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

8. Click OK.

The condition now states There is at least one added row in the ttAlertQue table.

Define the Send E-Mail Action

Define the action that occurs when a row is added to the AlertQue table.
This action will generate an email message using variables you design on the e-mail template.

1. Continuing in the BPM Workflow Designer, click the Send E-mail icon in the left pane and drag it onto the
Design area.

10.2.700 923
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

2. Click the new Send Email node to give it focus.


The Action tab displays at the bottom of the Design area with the Send e-mail asynchronously based
on the designed template with rule action selected.

3. Click the designed link.


The Design E-mail Template dialog box displays.

4. For the Name, enter Global Alert Email.

924 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

5. Now you design the variable fields you want the message template to use. Right-click the From field; from
the context menu, select the Field Query... option.
The Select Table Field(s) window displays with ttAlertQue already selected in the Table field.

6. In the Name field, enter From.

10.2.700 925
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

7. For the Filters options select Added records.

8. Now for the Fields, locate and select the EmailFrom in the fields list.

9. Click OK.
Back in Design E-mail Template, the From field now displays a <From/> variable. This variable will populate
with values from the standard global alert.

10. Right click in each of the remain fields on this form, select the Field Query... option, and repeat steps 6-9.
Add the following variables to the template:

Template Field Field Query Name Filter Table Field


To To Added records EMailAddr
CC CC Added records EMailCC
Subject Subject Added records Subject
Body Body Added records AlertText

Before you add the variable to the Body field, be sure to clear the default text.

When you finish, each field on the Design E-mail Template dialog box is populated with a variable.

926 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

11. Select the Include shortcut link check box.


This option causes the alert attachment (shortcut.sysconfig) file to be automatically included on all global
alert e-mail messages.

12. Click OK.


You return to the BPM Workflow Designer window. The designed link in the action statement is replace
with the new Global Alert Email template name.

Connect the Directive Sequence and Enable the Directive

Connect the items in your data directive so they execute in the order you need them to run. Enable to the directive
to initiate alert monitoring.

1. Click the Start icon and drag on one of the arrows to draw a line to the Condition icon.

10.2.700 927
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

2. Now on the Condition icon, click the Arrow next to the True (+) icon and drag a connecting line to the
Send E-mail icon.

3. Click the Save and Exit button.


You return to the Data Directives window.

Be sure to select Save and Exit. The Exit button will close
the designer without saving your work.

4. To activate the data directive, click the Enabled check box.

928 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

5. Click Save and then close Data Directive Maintenance.

The Global Alerts data directive is now running. Standard global alerts that you activate in Global Alerts
Maintenance will have this data directive available to send alert emails.

Standard Global Alerts

Standard global alerts are pre-built alerts that can be activated and delivered to end users through email and
through a memo added to the record that activated the alert.
The examples in this section demonstrate how to activate standard global alerts in Global Alert Maintenance
and how to make supporting configuration adjustments in other application programs. The Business Process
Management (BPM) data directive required for email support to standard global alerts was demonstrated in the
previous section.

Standard Global Alert for Specific Recipient

Set up a global alert to send an email to a specific recipient.


The scenario for this example is that a customer's order ships late. You want to be notified as soon as the order
ships, and you also want to alert the salesperson associated with this order.

10.2.700 929
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

Activate the Global Alert

To begin, enable the alert in Global Alert Maintenance.

1. Navigate to Global Alert Maintenance.


Menu Path: Sales Management > Order Management > Setup > Global Alert

2. In the ID field, search for and select the 1120 Order has been shipped global alert.

3. In the Options group box, select the following check boxes:


• Active
• Create Memo
• Send Alert

4. Notice this global alert has a value in the Specific Recipient field. The Salesperson value displays, which
indicates the salesperson defined on the sales order will automatically receive this alert message.

5. In the To field, enter your email address.

6. In the Text field, enter Alert: A sales order has been shipped.

7. Click Save and then close Global Alert Maintenance.

930 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

Set Up the Work Force

You next need to indicate the salesperson (the specific recipient) will receive alert messages. You activate this
feature in the salesperson's work force record.

1. Navigate to Work Force Maintenance.


Menu Path: Sales Management > Order Management > Setup > Work Force

2. Click the Work Force ID button to find a workforce record. You also can enter the ID directly.
The corresponding work force record displays.

3. Select the Send Alert check box.


After you save this record, this salesperson will automatically receive messages from standard global alerts
on their sales orders, such as the 1120 global alert in this example.

4. Verify the Email address for this salesperson is correct.


When setting up alerts, you should always verify email addresses as you enter them or as they appear in
retrieved records. An incorrect email address will cause the recipient to not receive email alerts.

5. Click Save and then close Work Force Maintenance.

10.2.700 931
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

Set Up a Test Sales Order

Now set up a sales order that can be used for testing. Indicate you want an alert message sent when this order
is shipped.

1. Navigate to Sales Order Entry.


Menu Path: Sales Management > Order Management > General Operations > Order Entry

2. Click the Sales Order button to find the sales order that has been delayed. You also can enter the sales
order ID directly.

3. From the Actions menu, select Order > Reopen Order.

4. Navigate to the Header > Detail sheet.

932 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

5. Click Refresh.

6. Select the Alert On Shipment check box.


When selected, this check box indicates that a global alert is sent once this order is completely shipped.

7. Click Save and then close Sales Order Entry.

Trigger the Alert

In Customer Shipment Entry, indicate the sales order is shipped.

1. Navigate to Customer Shipment Entry.


Menu Path: Material Management > Shipping / Receiving > General Operations > Customer Shipment
Entry

10.2.700 933
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

2. Click the down arrow next to the New button; select New Pack.

3. Navigate to the Lines > Customer Shipment Entry > Detail sheet.

4. Click the down arrow next to the New button; select New Line.

934 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

5. In the fields, enter information indicating that the order selected in the previous exercise has shipped. For
example:

Field Data
Order Number 5356
Line 1
Rel 1
Our Ship Qty 3000
Warehouse Shipping Area

6. Verify that the Shipped Complete check box is selected.

7. Click Save.
If warning messages display, click Yes.

8. Navigate to the Header > Detail sheet.

9. Select the Shipped check box.

10. Click Save and then close Customer Shipment Entry.

You and the designated salesperson receive alert email messages in your email clients.

Alert for Alert Group

Set up a global alert that sends emails to the people in an alert group.
The scenario for this example is that an alert group called Quality Assurance is set up. When the alert is triggered,
everyone in the group receives the global alert.

10.2.700 935
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

Alert Groups

Use alert groups to communicate job record events to recipients based on production roles. You can activate
alert groups that send alert messages to individuals who perform similar tasks in a manufacturing process.
You structure alert groups so they represent categories that relate to job production roles. Examples of these
categories include engineering, quality assurance, and shop supervision.
You create alert groups in Alert Group Maintenance. When you create an alert group, you assign it global
alerts that apply to a production role. You can also assign shop warnings to alert groups; shop warnings are
production specific messages. For example, if you want to create an alert group for Quality Assurance, you would
only select the global alerts and shop warnings that apply to quality assurance tasks.
Next you use Person Maintenance to assign recipients to an alert group. Person Maintenance lists people whose
roles are compatible with the alert groups you create.
Then you create production teams that include the people you defined through Person Maintenance. Each
production team contains a list of people that perform a related role in your manufacturing cycle. However, you
can add people to a production team who are not assigned to an alert group. This feature provides flexibility, as
not every person assigned to a production team receives global alerts but can still perform other tasks related to
the production team.
When you create jobs, you link a production team to a specific job. As various changes are made to the job
record, they may trigger a global alert. If an alert is triggered, each person who is a member of this team assigned
to an alert group receives the global alert message.

Activate the Global Alert

To begin, activate the global alert that informs you an order release status has changed.

1. Navigate to Global Alert Maintenance.


Menu Path: Production Management > Job Management > Setup > Global Alert

936 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

2. In the ID field, search for and select the 1170 Job released status has been changed global alert.

3. In the Options pane, select the following check boxes:


• Active
• Create Memo
• Send Alert

4. In the Text field, enter Alert: A job released status has changed.

5. Click Save and then close Global Alert Maintenance.

Set Up an Alert Group

Now create an alert group for Quality Assurance.

1. Navigate to Alert Group Maintenance.


Menu Path: Production Management > Job Management > Setup > Alert Group

10.2.700 937
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

2. Click New on the Standard toolbar.

3. Enter a value in the Group field.

4. Enter a value in the Description field.

5. From the Available Global Alerts list, select Job released status has been changed and click the Single
Right Arrow button.
The global alert now displays in the Selected Global Alerts list.

6. Click Save and then close Alert Group Maintenance.

Set Up a Person

You next add your name to the alert group.

1. Navigate to Person Maintenance.


Menu Path: Production Management > Job Management > Setup > Person

938 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

2. Click New on the Standard toolbar.

3. In the Person field, enter XXX (where XXX are your initials).

4. In the Name field, enter your name.

5. In the E-mail field, enter your email address.

6. In the Alert Groups pane, in the Available list, select the new alert group and click the Single Right
Arrow button.
The alert group displays in the Selected list.

7. Click Save and then close Person Maintenance.

Assign the Person to a Production Team

You now assign your name to a Production Team that will be associated with the job record that you use to test
the alert.

1. Navigate to Production Team Maintenance.


Menu Path: Production Management > Job Management > Setup > Production Team

10.2.700 939
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

2. In the Team field, search for and select a team.

3. In the Person List pane, from the Available (Active) list, select the record with your name, and click the
Single Right Arrow button.
Your name now displays in the Selected list.

4. Click Save and then close Production Team Maintenance.

Trigger the Alert

Change the release status of a job with a first article requirement to trigger the alert to be sent to everyone listed
in the group alert.

1. Navigate to Job Entry.


Menu Path: Production Management > Job Management > General Operations > Job Entry

940 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

2. Click the Job button to find a job record. You also can enter the job record ID directly.

3. In the Prod Team field, select your production team.

4. Clear the Released check box.

5. Click Save to trigger the alert message and then close Job Entry.

You receive an alert email message in your email client.

Custom Global Alerts

The standard global alerts available in Global Alerts Maintenance may not contain an alert you need. You can
create custom global alerts using Business Process Management (BPM) data directives.
The custom global alert in this example notifies you when a job's scheduling priority is changed from NORMAL
to HIGH.

Refine the Shortcut Link File

When standard global alerts were set up in the earlier examples, a shortcut link (shortcut.sysconfig) file was
created that opens the Epicor application to the Home Page. You can further refine this file so when a user
launches the Epicor application, it opens the specific program and record that triggered the global alert.
Do the following to refine the shortcut link file template so that the data directive will be able to populate the
generated shortcut.sysconfig file with values that identify the table on which your custom global alert is based.

1. Navigate to Alert Attachment Maintenance.


Menu Path: System Management > Business Process Management > Alert Attachments

10.2.700 941
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

2. Click New on the Standard toolbar.

3. Click the Table button to find a table. You also can enter the table name directly. For example, use the
table on which you will base the data directive in this example.
The other fields now display default information.

4. Click the Template tab.

942 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

5. Locate and review the <Shortcut> element near the bottom of the window.
This element and its child elements have been generated and populated with default values based on the
table you selected in the previous step. The template is saved and used by the data directive to generate a
shortcut.sysconfig file at runtime. It is important to know that this template only needs to be created once
for a company. There is only one template, which is saved by the system, and any data directive that is set
up to generate a custom global alert will use that template and substitute values at runtime for the table
named in the directive and the Epicor ERP installation.

6. Click Save and then close Alert Attachment Maintenance.

When the custom global alert created later in this example is sent, the data directive will generate a
shortcut.sysconfig file that can be used as a shortcut to the application program and record impacted by the
change. The file will be attached to the alert email.

Create the Data Directive

To begin, you create a new data directive that monitors the JobHead table.

1. Navigate to Data Directive Maintenance.


Menu Path: System Management > Business Process Management > Data Directives Maintenance

This program is not available in Epicor Web Access.

10.2.700 943
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

2. In the Table field, type JobHead and press Tab.

3. Navigate to the Standard Directives > Detail sheet.

4. Click the Down Arrow next to the New button; select New Standard Directive.

5. For the Directive Name, enter Global Alert - High Priority.

944 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

6. Click the Design... button.

The BPM Workflow Designer displays.

Define the Alert Condition

You now add a condition that monitors the SchedCode column on the JobHead table.

1. Working in the BPM Workflow Designer, click the Condition icon in the left pane and drag it to the Design
area.

10.2.700 945
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

2. Click the Condition Node to give it focus.


The Condition tab displays at the bottom of the Design area.

3. Click the New button on the Condition tab.


A new condition row displays on the Condition tab.

4. On the right side of the Condition column, click the Down Arrow and select the The specified field has
been changed from any to another option.

5. Click the specified link.

The Select Table Field(s) window displays. Notice this window is automatically linked to the ttJobHead
table. This is the temporary table used to store data in the JobHead table before this data is saved to the
database.

6. Find and select the SchedCode field.

946 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

7. Click OK.

8. Now select the any link.

The Specify a Value window displays.

9. Clear the Any value check box.


This activates the Value field.

10.2.700 947
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

10. Enter "NORMAL" in the Value field.

11. Click OK.

12. Next select the another link.

The Specify a Value window displays.

13. Clear the Any value check box.

14. Enter "HIGH" in the Value field.

15. Click OK.

The condition should now display The ttJobHead.SchedCode field has been changed from NORMAL to
HIGH.

Define the Send E-mail Alert Action

Now create the action that will generate an email message for the custom global alert.
This action will generate an email message based on the e-mail template that you define and save in the Send
E-mail action.

1. Continuing in the BPM Workflow Designer, click the Send E-mail icon in the left pane and drag it onto the
Design area.

948 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

2. Click the new Send Email node to give it focus.


The Send e-mail asynchronously based on the designed template with rule action displays.

3. Click the designed link.


The Design E-mail Template displays.

4. For Name, enter Job Status Alert - Priority.

10.2.700 949
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

5. Next in the From field, enter the address you will use for sending out this email message. For example:
[email protected]

6. Now for the To field, enter the user(s) who will receive this custom global alert. For example:
[email protected]
You can enter multiple email addresses in this field. To do this, add a semi-colon after each address.

7. In the Subject field, enter the value that will display in the Subject field of the alert email. In this example,
enter Job Priority Changed to HIGH.

8. For the Body of the email, delete the informational text and enter "The scheduling priority for Job has
changed from NORMAL to HIGH."

9. Right-click the space after "Job" and select the Field Query... option.
The Select Table Field(s) window displays. Notice the ttJobHead table displays in this window.

10. In the Name field, enter JobNumber.

950 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

11. Select the Updated records check box.

12. Scroll down the grid to find and select the JobNum field.

13. Click OK.


The text for the email message now displays: "The scheduling priority for Job <JobNumber/> has
changed from NORMAL to HIGH."

14. Select the Include shortcut link check box.


This option causes the shortcut link (shortcut.sysconfig) file to be automatically included on email generated
through this custom global alert. When users launch the Epicor application using this file, the application
automatically opens and displays the record that caused the alert.

10.2.700 951
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

15. Click OK.


You return to the BPM Workflow Designer window.

Connect the Directive Sequence and Enable the Directive

To complete the data directive, you define the sequence through which you want the data directive to run.

1. Click the Start icon and drag on one of the arrows to draw a line to the Condition icon.

952 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

2. Now on the Condition icon, click the Arrow next to the True (+) icon and drag a connecting line to the
Send E-mail icon.

3. Click the Save and Exit button.


You return to the Data Directives window.

Be sure to select Save and Exit. The Exit button will close
the designer without saving your work.

4. To activate the data directive, click the Enabled check box.

10.2.700 953
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

5. Click Save and then close Data Directive Maintenance.

The Global Alert - High Priority data directive now is running and you are ready to test the custom global alert.

Test the Custom Alert

To activate the custom global alert, you change a job's status from NORMAL to HIGH and save the job record.
Your active data directive will generate the email alert message with shortcut attachment, based on the condition
change in the JobHead table.

1. Navigate to Job Entry.


Menu Path: Production Management > Job Management > General Operations > Job Entry

954 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

2. Click the Job button to find a job record. You also can enter the job ID directly.

3. Now in the Scheduling Priority drop-down list, change the priority level from NORMAL to HIGH.

4. Click Save.
Saving the change triggers the email action in your data directive, sending an email to all designated recipients.

5. Open and review the alert email in your email client.


Notice the subject line, job number displayed in the message, and the shortcut link that is included as an
attachment.

10.2.700 955
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

Test the Shortcut Link

Now test the shortcut link to verify that when you launch the Epicor application, it automatically launches Job
Entry and displays the job that changed.

1. In your email client, open the custom global alert message, right-click the shortcut.sysconfig attachment,
and select Save As.

2. In the Save Attachment window, navigate to the config folder in your client installation. For example,
navigate to the C:\Epicor\ERP10\ERP10.0.100\Client\Config folder.

956 10.2.700
Epicor ICE 3.2 Tools User Guide Global Alerts | Chapter 8

3. Click Save.

4. On your desktop, right-click the shortcut icon for your Epicor application and select Properties to display
the shortcut properties window.

5. In the Target field, after the Epicor.exe value , enter the /CONFIG=shortcut.sysconfig run time argument.
Put this shortcut CONFIG argument to the right of an existing CONFIG argument to override the existing
argument. When you are done with the shortcut, you can delete the shortcut argument and go back to
using the existing one.

6. Click OK.

7. Close your Epicor application if it is open, and then double-click the shortcut icon to restart the application.
The application launches, followed by the application program named in the shortcut link (Job Tracker
opens in this example). The job that triggered the alert displays in this program.

10.2.700 957
Chapter 8 | Global Alerts Epicor ICE 3.2 Tools User Guide

958 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

Chapter 9: Dashboards

Dashboards are flexible, powerful tools that provide easy access to critical information in a real-time environment. In
addition to the standard dashboards included with the application, you can also create custom dashboards. Custom
dashboards can replace the need for workbenches, trackers, ShopVision reports, ad hoc reports, and even simple
business intelligence reports.
You can think of a dashboard as your personalized information and command center. Much like your car’s dashboard
gives you current information and controls to run the car, the dashboard displays the current information and processes
you need to more efficiently perform your tasks. The data you choose to display can be refreshed automatically or
manually, so you can act on changes as they immediately occur.
Dashboards display data through business activity queries (BAQs). Several display options are available to present data.
For example, you can present data in a grid, chart, or gauge. You can add a Tracker View (to display an advanced
search) where you define the fields by which users can search data. You can also add a URL link to display web pages
or web parts in the dashboard.
The chapter begins with a brief review of standard system dashboards. Next, it explores how you can create your own
dashboard, adding queries and multiple views to display the information you need. Then the chapter describes the
Publish and Subscribe functionality. The unique framework of the dashboard can publish data from one query and
then subscribe to the data by another query. Users can see related information between the two queries when a record
is selected in the dashboard. In conclusion, you learn how to enable a dashboard for use as an advanced search.

Standard System Dashboards

Many standard system dashboards install with the application. Use the dashboard framework to modify the way
information is presented. Additional features include:
• Modify dashboard assemblies to create new dashboards to place on the Main Menu
• Dashboard components synchronize with system entry programs (Publish and Subscribe)
• Right-click and print enabled
• Copy and paste enabled
• Display information in graphs, charts, and gauges
• Conditional formatting based on user-defined rules
• Leverage EPM Performance Canvas and gems for import and export dashboard definitions
Standard dashboards are located in the General Operations folder of each module on the menu. Since dashboards
provide information that pertains to multiple modules, many are available in multiple locations within the Main
Menu.

You can only make updates to existing dashboards if you first


copy the dashboard and save it with a new name. Custom
dashboards are not overwritten by any software upgrades.
Modifying an existing dashboard is discussed later in this
chapter.

Dashboards are identified on the menu by a magnifying glass and book icon.

10.2.700 959
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

Navigate in a Dashboard

One example of a standard system dashboard is the Part On Hand Status dashboard.
Menu Path: Executive Analysis > Status Dashboards > Part On Hand Status

1. After you launch the dashboard, click the Search button on the Dashboard Browse to find and select the
parts to view in the dashboard.

2. When you select the part record from the Search Results grid, related information about this part displays
in the dashboard. Only one part record displays at a time. Use the Navigation toolbar to select another
record to view in the tracker. In this example, part DSS-1012 is selected. The part number displays on the
title bar and the part’s on hand information displays in the On Hand Locations grid.

960 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

3. To view Warehouse and Inspection information for the selected part, click the respective sheets.

4. You can right-click a part number record in the Search Results grid and select Open With… The Context
Menu displays related information for the part selected. Options on the context menu launch in a new
window for the selected program.

10.2.700 961
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

5. In this example, select Time Phase.

6. Notice the part information for DSS-1012 defaults into the window. When you launch a secondary program
(in this case Time Phase) from a dashboard, it uses publish and subscribe functionality to display the selected
record’s information in the new program.

962 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

7. To view Time Phase information for a different part, you can select a new part in the dashboard and it
refreshes the Time Phase window with the new part’s information. In this example, you click part DSS-1010
in the Part On Hand Status. The Time Phase Inquiry window refreshes with part DSS-1010’s information.

10.2.700 963
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

Conduct an Advanced Search

Many dashboards also include an Advanced Search where you can select specific records using the fields provided
on the search sheet. Only the records that match your search criteria display. To use the advanced search features
in the Opportunity/Quote Status dashboard:
Menu Path: Executive Analysis > Status Dashboards > Opportunity / Quote Status

1. Navigate to the Advanced Search sheet. In the Cust. ID field, enter Addison.

2. Click the Refresh button on the Standard toolbar.

3. The Search Results list only displays quotes that belong to the customer Addison.

4. Click the Clear button to start a new search.

964 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

Assign Dashboard Developer Rights

In order to create new dashboards, users must be granted Dashboard Developer permission in User Account
Maintenance. Any user with security rights can access a dashboard once placed on the menu; however, creating
a new one from scratch (or updating an existing one) requires a security privilege that is typically granted only
to certain people in your organization.
To assign dashboard developer privileges:

1. Navigate to User Account Security Maintenance.


Menu Path: System Setup > Security Maintenance > User Account Security Maintenance

2. Select a specific user on the Detail sheet.

3. Navigate to the Options sheet.

4. Select the Dashboard Developer check box.

5. Click Save.

10.2.700 965
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

Dashboard Creation

You use the Dashboard program to create and modify dashboards in the application.
Before creating a dashboard, it is important to first spend some time thinking about what information would be
helpful to employees at your organization. What is the appropriate format for this information? Is it more graphical
in nature? Should users be able to search the data displayed in the dashboard? Can existing queries (Business
Activity Queries) be used on the dashboard, or do you need to create new queries? Once you identify what you
need to display, you can begin to create your dashboard. In the examples that follow, you create a dashboard
that displays customer orders, shipments, and invoices.
Menu Path: Executive Analysis > Business Activity Management > General Operations > Dashboard

This program is not available in Epicor Web Access.

Dashboard Developer Mode

To verify the Developer mode is enabled when the Dashboard program launches:

1. From the Tools menu, select Developer.

2. Once you are in the Developer mode, the New button displays on the Standard toolbar.

You can toggle the developer mode off and on by


selecting the Developer option from the Tools menu. Users
who do not have the Dashboard Developer rights do not
have this option available to them.

966 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

3. The Tree View displays in the program's window.

4. From the New menu, select New Dashboard.

10.2.700 967
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

5. In the Definition ID field, enter a unique identifier for the dashboard. This value is used internally by the
Epicor application. In this example, enter CustSvcDbd.

968 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

6. Enter the Caption for the dashboard. In this example, the caption is Customer Service Dashboard.
If you generate a mobile dashboard, this text value displays on the dashboard tile.

7. Now enter a brief Description for the dashboard. Use this field to define the purpose for the dashboard.

8. The Owning Company field displays the company inside which the current dashboard was created. You
cannot change this value; only users within the Owning Company can modify this dashboard.
If the System Dashboard check box is selected, the Owning Company field is blank. This indicates the
current dashboard is available to all companies within the current organization.

9. Select the All Companies check box to share the current dashboard with users in companies that reside in
the same organization as the Owning Company. Users within these companies can than view and use this
dashboard.
If this check box is clear (not selected), the dashboard is only available to users in the Owning Company.

10. Select the Enable Refresh All check box if you wish to add the Refresh All button to the Standard toolbar.

11. When you select the Target Mobile Device check box, you indicate the dashboard can display on a mobile
device. When you generate the dashboard, you also create a mobile device version of the dashboard.
Dashboards for mobile devices are discussed in the Dashboard Utilities chapter.

12. The System Dashboard check box indicates whether the current dashboard is installed with the Epicor ERP
application. If the current dashboard is a system dashboard, you cannot make changes to it.

10.2.700 969
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

13. By default, the Refresh button is automatically added to the dashboard interface; this button updates data
for a single query.
Each query is set up with a refresh interval; this causes the data on each query to be refreshed automatically.
If you need, however, you can always click the Refresh button on the Standard toolbar.

14. If you select the Enable Refresh All check box in the previous step, the Refresh All button displays on the
Standard toolbar on the dashboard.
When you click the Refresh All button, all query data updates in the dashboard.

You are now ready to design your dashboard. Remember to save changes frequently while you develop a new
dashboard.

Add a Query to the Dashboard

To begin designing a dashboard, first add a query to it. Queries are created in the Business Activity Query Designer
and are used to retrieve and display information from a table (or multiple tables) in the database. You can add
multiple queries to the same dashboard that display related information.
To demonstrate all the dashboard functionality, you must copy a standard query to make additional fields available
for use in the chapter examples. To learn how to do this, read the Copy Query section in the Business Activity
Queries chapter.

Add the Query

The first query that you add to the dashboard, EPIC03-CustTrackerOrders01, displays customer order information.

1. From the New menu, select New Query.

970 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

2. In the Dashboard Query Properties window, click the Query ID button to find and select the query.

3. In the Query Search window, notice the various types of Business Activity Queries you can search for and
add to the dashboard.

BAQ attributes control dashboard's availability and define


what data becomes available for display on the dashboard.

BAQ Property Description


Shared Indicates this query is available to all users in the source company and can be added as
a datasource for searches, BAQ info zones, BAQ reports, smart client or mobile
dashboards. Note these users will need various rights to use these features.
Updatable Indicates users can enter and modify data within this query and perform updates to the
application database. An updatable BAQ datasource allows performing data updates
through either a client dashboard or a mobile device dashboard.
System System (standard) queries are written by Epicor and included with the application. These
BAQs begin with the letter “z”; for example, zARInvProfit. You can use system queries
to display data, but to modify a system query, you need to make a copy of this record
within the Business Activity Query Designer first.

10.2.700 971
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

BAQ Property Description


Cross-Company Indicates that on BAQ is execution, the query is invoked against all companies on the
same database and rows from each company are merged together on the server into
a single result set.
All Companies Indicates whether the current BAQ Definition is visible to all companies on the same
database server. When the Epicor application uses multiple companies contained within
a single database, the BAQ usage and visibility is applied regardless of multi-company
direct configuration. For companies hosted on different databases, this check box initiates
the Service Bus processing, when it is configured to synchronize BAQs to external
companies. If the custom BAQ is created from a Company that is running under a
multi-tenant license, the definition becomes visible to all companies within the same
Tenancy as the Owning Company.
External Indicates the BAQ is configured to pull data from an external database management
system.

4. Click the Search button. In this example, you select EPIC03-CustTrackerOrders01 query.
This BAQ is a copy of the standard query zCustTrackerOrders01.

5. Click OK.

972 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

6. When the Dashboard Query Properties window displays, click OK again.

7. Click the Refresh button on the Standard toolbar to execute the query and retrieve the data.

10.2.700 973
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

8. The data is generated and displayed on the Dashboard sheet you will review later.

9. In the Tree View, two icons display when the query is added to the dashboard. The Query icon displays
on top and references the EPIC03-CustTrackerOrders01 query you added.
You use the Tree View to help design the dashboard and ultimately navigate through it. As you add multiple
views to the dashboard, this becomes the primary tool to understanding the information that displays.

10. The Grid icon for EPIC03-CustTrackerOrders01 displays under the Query icon in the Tree View. The
default view for every query added to the dashboard is called a Grid View.

11. Use the Available Views panel in the Tree View to select published, available views you want to add to
your dashboard.

12. If you want to hide the Available Views panel, from the View menu, select Published Views. The Published
Views and Available Views functionality is discussed later in this chapter.

974 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

Modify Query Properties

The Dashboard Query Properties window contains important information about the query you just added to the
dashboard. You control many characteristics of the query and ultimately how the data displays in the dashboard
using these properties. You can access these settings at any time while developing the dashboard.
Once you add a query to the dashboard, all related views, like grids or charts, are based on the parameters
established in the Dashboard Query Properties window. For example, any filters applied at the query level are
applied to all grid and chart views that use this query to display information.
You can apply filters to any specific view. Depending on what the user wants to display, it may be better to apply
filters at the view level as opposed to the query level. This feature is useful to display groups of information, such
as sales broken down by territory or customer groups.

General Properties

When a new query is added to a dashboard, the Dashboard Query Properties window displays automatically.
Once the query is added, you can access the Properties window manually by right-clicking on the Query icon in
the Tree View and selecting Properties from the context menu.

1. In the Tree View, right-click the Query icon.

10.2.700 975
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

The context menu displays.

2. Select Properties.
The Dashboard Query Properties window displays.

3. The Caption field displays the default description of the query added. In this example, the caption is Order
Query for Customer Tracker; however, you can override this value. The text in the Caption field displays in
the query’s sheet and grid caption bars.

976 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

4. Select the Auto Refresh on Load check box. This refreshes the data in the dashboard automatically when
you launch the dashboard. This eliminates the need to click the Refresh button manually on the
Standard toolbar when the dashboard is initially run. Use caution when enabling this check box, as queries
that retrieve many records take more time to load to the dashboard when you initially open it.

Publish to Title Bar

Use the Publish sheet to select which columns you want to publish from the query. Information published from
one query can be used to display on the title bar, as well as for subscription by another query. In this example,
you publish the customer name to the title bar. As you select different sales order records in the grid, the order’s
customer name displays on the title bar. You learn more about publish and subscribe later in this chapter.

1. Navigate to the Publish sheet.

10.2.700 977
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

2. The columns that display in the Publish Columns list include all the fields built into the query when it was
created. Select the Customer_Name, Customer_CustID, and Customer_CustURL fields in the Publish
Columns list.

The Customer.CustURL column is used later in the Add


a URL Link section of this chapter.

3. Select the Publish to Title check box. You can publish specific data to the title bar of the dashboard. In
this example, the customer name is selected to display in the title bar of the dashboard.

4. From the drop-down list, select Customer_Name. This field contains all the columns you selected in the
Publish Columns list. The column selected in this field is what displays on the title bar.

5. In the Title caption field, enter Customer:. This value displays as a prefix placed before the published
customer name.

6. Click OK.

7. Notice the title bar now displays the customer name of the selected record.

978 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

8. A new icon displays in the Tree View when you publish information from the query. The Satellite icon, with
an arrow pointing out, indicates the query is publishing information.

Apply Filters to a Query

Use the Filter sheet to apply filters to the data retrieved when the query is published from the dashboard. These
dashboard filters run in addition to any filters that already exist in the query. In this example, you add a filter to
the EPIC03-CustTrackerOrders01 query to only display open sales orders.

1. In the Tree View, right-click the Query icon and select Properties.

10.2.700 979
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

2. The Dashboard Query Properties window displays. Navigate to the Filter sheet.

980 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

3. From the ColumnName list, select the field you want to filter. This field contains a list of all the columns
included in the query. In this example, select OrderHed_OpenOrder.

4. From the Condition list, select the appropriate condition you use to define filter criteria. This list contains
all Boolean operators such as: equal to (=), not equal to (<>), greater than (>), less than (<), greater than or
equal to (>=), and less than or equal to (<=). You can also select BEGINS, which enables you to define the
criteria based on the value that begins in the field. In this example, you select equal to (=).

5. In the Value field, enter True. The Value field contains a list of available values from which you can choose,
or you can define your own value by entering it in the field. Available options:
• The values of columns published from the query (for example, customer name)
• The values of all columns included in the query BAQ Special Constants (for example, Today, Tomorrow,
Yesterday, Year, Day, and so on)
• Use these values to compare a field to the value of another field, to a constant such as the current day
of the week, the fiscal year, and so on.

6. Click OK.

7. Now only Open orders display in the Grid View.

The Grid View

When you add a query to a dashboard, the default view for displaying the data is a Grid View. You typically have
multiple grids displaying different information from a single query on a dashboard. For example, you can add
another grid view that displays open orders for a specific customer or for a specific territory. You accomplish this

10.2.700 981
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

by applying a new filter on the grid view that defines these criteria. Each query and view you add to the dashboard
has its own properties window where you can define additional parameters.

The Grid Properties Window

Use the Dashboard Grid Properties window to define the columns that display, activate group by and summary
options, enter filters, and set up rules for displaying information.

Change Display Columns and Enable Group By and Summarization in a Grid

When a grid is added to the dashboard, all columns included in the query appear by default. You can modify
the columns that display and also enable the Group By and Show Summaries options in the properties window.

1. Right-click the Grid icon in the Tree View of the dashboard and select Properties.

The Dashboard Grid Properties window displays.

2. In the Caption field, enter Open Orders. This value displays in the header of the Grid and also in the Tree
View of the dashboard.

982 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

3. Click the Clear All button to clear the selection of all the Display Columns.

4. Select the Visible check box for each column you want to display in the grid. In this example, the following
fields are selected:
• OrderHed_OrderNum
• OrderDtl_OrderLine
• OrderHed_PONum
• OrderDtl_PartNum
• OrderDtl_LineDesc
• OrderDtl_SellingQuantity
• OrderDtl_DocUnitPrice
• Customer_Name
• Customer_TerritoryID
• OrderDtl_ProdCode
• OrderDtl_NeedByDate

10.2.700 983
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

5. Use the Up and Down Arrow buttons to change the order the columns display within the Grid view. As
you click these buttons, the order of the columns changes on the grid.

6. In the Grid Caption field, enter Open Sales Orders.

You do not have to enter text in the Grid Caption field.


If you leave this blank, the text in the Caption is used in
the Grid header. You can, however, enter different text
in this field than the Caption. This causes the Caption text
to display in the Tree View and the tabs; the Grid Caption
text displays as the Grid header.

7. Select the Show Group By check box. The Group By functionality then displays as the default view in the
grid. If this feature is not turned on in the Properties window, it can still be toggled on or off by the end
user in the dashboard during runtime. For this example, select this check box.

8. Select the Show Summaries check box to define additional summarization options. Available options:
• Average
• Count
• Maximum
• Minimum
• Sum
You can use one or more of the above options to summarize data on a single grid view.

When the Show Summaries check box is enabled, a Sigma


symbol appears in all the column headings that contain
numeric data. When you click the icon in the column
heading, the Select Summaries window displays where
you can choose from the list of summarization options.
This functionality is demonstrated in the next example
when you modify the grid display.

9. Click OK.

10. Now only the columns you selected display in the grid. The Caption displays Open Orders in the Tree View
and the Grid Caption displays Open Sales Orders.

984 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

Change the Grid Display

Now that you have updated the Grid Display properties, you can modify the grid information by utilizing the
Group By and Summarization options. In this example, you apply a sum to the Doc Unit Price field and group
the grid by Customer. You also move columns within the grid.

1. Click the Sigma icon in the Order header.

10.2.700 985
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

2. Select the Sum check box.

3. Click OK.

4. Scroll to the bottom of the grid to view the Sum of the Order column.

986 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

5. Drag the Name column header up to the blue header bar to group the data by customer.

6. Release the column when the black arrows appear.

7. You can expand the groups to reveal the order detail by clicking the + icon next to each customer.

10.2.700 987
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

8. To save the groupings as the default layout for the grid, from the Tools menu, select Layouts > Save
Layouts As Default.

9. To turn the Show Group By functionality on and off, right-click anywhere in the grid and select Show
Group By. In this example, group by is turned on.

988 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

10. When Show Group By is turned off, the check mark does not display next to the option.

11. You can also move columns within the grid. Click a column header and drag it to its new position in the
grid. Release the column when the black arrows appear. In this example, you move the customer Name
column to the first column in the grid.

10.2.700 989
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

12. Click Save on the Standard toolbar to save the changes to the dashboard.

Apply a Filter to a Grid

Just like a filter can be applied at the query level, the same functionality is available at the grid level. Many of the
standard dashboards use filters at the query level. Query filters run against data on the server. When all the query
data is sent to the client, you can create additional client side filters that further restrict the data results that
display in the grid. In this example, you apply a filter to the grid that causes the grid to only display sales orders
with a Document Unit Price greater than zero.

1. In the Tree View, right-click the Open Orders grid icon and select Properties.

2. When the Dashboard Grid Properties window displays, navigate to the Filter sheet.

990 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

3. From the ColumnName list, select OrderDtl_DocUnitPrice.

4. From the Condition list, select > (greater than).

5. In the Value field, enter 0 (zero).

6. Click OK.

Add a New Grid View to the Dashboard

You can add multiple grid views of the same query information to a dashboard. By using grid filters, the data
can be organized to display multiple views for the same source information.
Now that you have applied a filter to the Open Orders grid, you add another grid view to the dashboard to display
the zero dollar orders. You then apply a filter to this grid which only displays open orders with a Document Unit
Price equal to zero.
To add a new grid view to the dashboard:

1. In the , right-click the Query icon and select New Grid View.

10.2.700 991
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

The Dashboard Query Properties window displays.

2. In the Caption field, enter Zero Dollar Orders.

992 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

3. Navigate to the Filter sheet.

4. From the ColumnName list, select OrderDtl_DocUnitPrice.

5. From the Condition list, select = (equal to).

6. In the Value field, enter 0 (zero).

7. Click OK.

8. By default, the new grid is docked on the bottom section of the dashboard.

10.2.700 993
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

9. You can move the grid and create a tab to display each of the grids associated with the query. Click the
Zero Dollar Orders grid header and drag it up next to the Open Sales Orders grid. Release the grid when
the outline displays a notch.

10. Both grid views now display side-by-side as two separate sheets with tabs on the dashboard.

994 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

11. Notice the Tree View now displays two Grid View icons under the Query icon.

12. Click Save on the Standard toolbar.

Add a Rule to Highlight Cells

You can define rules and conditions that control how certain data displays within the grid. As the conditions for
the data change, the view indicates this change based on the rule action that you define. In this example, you
apply a rule to highlight orders that do not have a customer purchase order number.

1. In the Tree View, right-click the Open Orders grid icon and select Properties.

2. When the Dashboard Grid Properties window displays, navigate to the View Rules sheet.

10.2.700 995
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

3. Click the New View Rule button; the View Rule defines the criteria for the rule. This activates the Select
Field, Rule Condition, and Rule Value fields for entry.

4. From the Select Field list, select the field for which you base the rule. In this example, you select
OrderHed_PONum.

5. Select the Rule Condition. Available options: Contains, Equals, Greater Than, Less Than, Not Equal, and
Starts With. In this example, you select Equals.

6. Leave the Rule Value blank (or null). The Rule Value list contains every column in the query, and also
constant values from which you can select.

7. Click the White Arrow button.

8. The rule now displays in the available rules list.

996 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

9. When you click the New View Rule in the available rules list, the Edit View Rule button becomes available.
You can then use this button to edit rules that were created.

10. The Rule Action defines how the selected field displays within the Grid view. Click the New Rule Action
button to activate the Select Field and Setting Styles fields for entry.

11. From the Select Field list, select OrderHed_PONum.

12. From the Setting Styles list, select Error. The Error style turns a cell red; however, other styles are available
from which you can choose. Available options:
• OK – This style turns a cell green
• Warning – This style turns a cell yellow
• Highlight – This style turns a cell blue
• Invisible – This style turns a cell black

13. Click the White Arrow button.

14. The action now displays in the available actions list.

10.2.700 997
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

15. Click OK.

16. Sales orders that do not have a purchase order number now display red in the Open Sales Orders grid.

998 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

You can apply the same rule and action to the Zero Dollar
Orders grid by following the same steps as above in the
Zero Dollar Orders Grid Properties window.

Add an Image Column to a Grid Based on a Rule

Use the Image Columns sheet to create an image column within a grid view. This column can display an application
image you select. You can also create row rules which indicate the conditions for displaying various images within
this column.
You can immediately use this functionality to display any image included within the application. You can also
display your own images through the Resource Editor program. This separate utility is available for download
from EPICweb. Use this utility to find, select, and add your own images to the application. You can then use
these images on your dashboard.
First, create a new image column and name it accordingly. Then select the default image and decide where in
the grid you want the image to display.
If you need, you can also create row rules that define when other images display within this column. You can
even set up this column so that it does not have a default image, and then use row rules to populate it with
specific images when certain rule conditions are met.
In this example, you add an image column that normally displays a blank cell. You then select a row rule so this
column displays the exclamation icon whenever an order release unit price is greater than $1,000.

The Image Columns functionality is also available as part of


the customization toolset. Use this functionality to add an
image column to any grid in the application. To learn how to
add an image column to a grid, review the Epicor ICE User

10.2.700 999
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

Experience and Customization Guide. The Image Column


Wizard is described in the Advanced Customization chapter.

To add an image column to a grid in the dashboard:

1. Right-click the Open Orders grid icon in the Tree View of the dashboard and select Properties.

2. When the Dashboard Grid Properties window displays, navigate to the Image Columns sheet.

3. Enter a Column Name for the new column. Be sure to enter a name you can easily find when creating row
rules. By default, all image columns are placed at the bottom of the column list. In this example, enter
PriceCheck.

1000 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

4. Enter a Caption for the new column. This value is the text that displays at the top of this column. For this
example, enter Price Check.

5. From the Image Name list, select the default image you want to display. This item is the default image that
displays if no other rules are applied against the image column. All images available within the application
display; select the image you need from the list. For this example, select the (None) image. When the None
image is selected, no image displays as the default.

6. Use the Visible Index value to define where inside the grid you will place your new image column. The
lower the number, the closer to the left of the grid the image column appears. For example, if you enter
one (1), this indicates the column is the first left-side column in the grid. In this example, enter the default
value of 1.

7. Click OK to save the new image column.


The new Price Check column displays within the Grid.

8. Open the Dashboard Grid Properties window again and navigate to the View Rules sheet. You will
create a View Rule to display the exclamation image when the order line release price is greater than the
numeric value 1,000.

9. Click the New View Rule button to create a new rule.

10. From the Select Field list, select the field you want to base the rule on. In this example, select
OrderDtl_DocUnitPrice.

11. From the Rule Condition list, select GreaterThan.

10.2.700 1001
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

12. Enter or select the Rule Value for this rule. This defines the value against which the Rule Condition is
evaluated. In this example, enter 1,000.

13. To add your rule, click the White Arrow.

14. The new rule displays within the Row Rules list.

15. Click the New Rule Action button.

16. From the Select Field list, select the field this action affects. You need to select the new image column, so
you select the Price Check column you just created.

17. Because you selected an image column, the Setting Styles field changes to the Image Name field. All the
images available within the application display on this list; select the image you need. In this example, you
select the Exclamation image.

18. Click the White Arrow button.

19. The image column rule now displays within the Rule Actions list.

1002 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

20. Click OK.

21. Now when you view the dashboard grid, any order release that has a Document Unit Price greater than
1,000 will have the Exclamation icon displayed next to it.

10.2.700 1003
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

The Chart View

The Chart View creates charts and graphs from the data within the selected query. You can have multiple charts
on a single dashboard that display different information in a graphical format. In this example, you create a chart
that displays open orders by state.

The Chart Properties Window

Use the Dashboard Chart View Properties window to define the columns used in the chart, select different chart
types, customize chart colors, and other options.

Add a Chart View

1. In the Tree View, right-click the Query icon and select New Chart View. The Dashboard Chart View
Properties window displays.

1004 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

2. In the Caption field, enter Chart - Open Orders by Territory. This value displays in the tab of the chart
view that is added.

10.2.700 1005
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

3. From the Chart By list, select the field you want to use. This field is the horizontal axis, also referred to
as the X axis, and contains all the columns in the query from which you can select. In this example, select
Territory to display open orders by territory.

4. From the Chart On list, select the field you are charting. This defines the vertical axis, also referred to as
the Y axis, and contains only columns in the query defined as numbers. In this example, select Doc Unit
Price to display the open order amounts.

5. Fields can also be selected from the Group By (or Z axis) list. Use the Group By feature to group all the
records in a grid by a specific column.

You can select more than one field to chart. When you
do this, runtime users can switch between the fields to
see the information charted with different values.

6. Navigate to the Colors sheet.

7. From the Color Model list, select the colors of the chart. Available options:

• LinearRange - You can select a starting and an ending color with this option. The chart then displays
in regular gradations between these two colors. To change the Start Color or End Color, select the color
from each list.
• LinearRandom - Use this option to select a starting and an ending color. The chart then displays in
random gradations between these two colors. To change the Start Color or End Color, select the color
from each list.
• PureRandom - With this option, the application assigns colors automatically. This value is the default
color model applied to all charts.
• Wireframe - This option creates a wireframe chart. Only the lines of the chart display; no fill colors are
used.

8. Click OK.

9. The Chart displays as a Column Chart.

1006 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

10. Notice the new Chart icon now displays in the Tree View of the dashboard under the Query and Grid
icons.

Chart Settings

Once you add a chart to the dashboard, you can change the default settings of the chart. Hold the mouse over
the Settings tab to access and modify the chart settings.

Modify Chart Settings

To add a legend to the chart and change the column chart to a 3D column chart:

1. Hover your mouse over Settings. The Settings window slides open.

10.2.700 1007
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

2. Select the Legend check box if you want a legend displayed with the chart. When you select this option,
you select where to display the legend (top, bottom, left, right) from a drop-down list. In this example, place
the legend display on the right side.

3. Click the Refresh button.

1008 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

4. The chart now displays the legend on the right.

5. Hover your mouse over Settings and, from the Chart Type list, select CylinderStackBarChart3D.

6. Click the Refresh button.

10.2.700 1009
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

7. The 3D Cylinder Stack Bar Chart displays in the dashboard.

8. Click Save on the Standard toolbar.

The Tracker View

You can add a Tracker View to a dashboard. Typically used to create an Advanced Search, you can enter search
criteria based on the specified query and retrieve the search results back to the dashboard. Users leverage this
tool to find the exact information they need without searching through all the records in the dashboard.
Several steps are involved in creating an advanced search. You first have to add the Tracker View and define the
fields to be available for searching. The second step involves customizing the tracker view. This process utilizes
a subset of the customization tools available in the application.

For a detailed exploration of all the customization tools available


in the application, use the Epicor ICE User Experience and
Customization Guide. Review the Basic Customization, the
Advanced Customization, and the Customization Utilities
chapters.

1010 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

The Tracker Properties Window

The Dashboard Tracker Properties window is where you identify the columns you want to use for searching.
Options are also available to embed a grid view, display group by and summary data, add filters, and define rules
for how the information displays.

Add a Tracker View for an Advanced Search

In this example, you add a Tracker View to a dashboard for an advanced search. You then select the columns
available on the search form.

1. Right-click the Query icon in the Tree View and select New Tracker View.
The Dashboard Tracker View Properties window displays.

2. In the Caption field, enter Advanced Search. This value displays in the header of the Tracker View and
also in the Tree View of the dashboard.

The Filter and View Rules sheets are exactly the same as
the other view property windows. These options are not
necessary when creating an advanced search.

3. Click the Clear All button to clear the selection of all the Display Columns.

10.2.700 1011
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

4. Select the columns you want to use for searching in the Visible list. In this example, select the following
fields:
• OrderHed_OrderNum
• Customer_Name
• Customer_State
• Customer_TerritoryID

5. Notice the Label Caption field displays the default name for a field. If needed, you can edit the display
name for selected fields. In this example, accept the defaults.

6. Select the Prompt check box for each of the fields you wish to use for searching. The fields change from
read only to enabled for user input.

7. The Condition field determines how the data entered in each field is used for searching. In this example,
select StartsWith in the Condition field for the Customer_Name column. When selected, this option
indicates users can find Customers using a partial Customer Name.

8. Same as in grid views, you can use the Up and Down arrow buttons to change the order of columns you
want to display on the Tracker View. In this example, accept the default order of columns.

9. If you want to create a new query grid view to display within the tracker view, select the Embed Grid View
check box. In this example, you do not select it.

10. Click OK.

11. The Advanced Search sheet now displays in the dashboard.

12. Notice the new Tracker icon for the Advanced Search displays in the Tree View.

1012 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

13. To use the Advanced Search, first click the Clear button on the Standard toolbar.

14. To find customers that belong to a specific territory, select a Territory from the drop-down list. In this
example, select United States – Mid West.

15. Click the Refresh button to execute the search.

Add an Advanced Search with Range

Once you add an Advanced Search to the dashboard, you can add additional search criteria functionality such
as a starting at and ending at range. In this example, you add a second field for Order Number so that users can
search for a range of sales order numbers within the dashboard.

1. In the Tree View, right-click the Advanced Search icon and select Customize Tracker View.

2. When the Customization Tools Dialog displays, from the Tools menu, select ToolBox.

10.2.700 1013
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

3. The Toolbox displays. Use this tool to add elements to the current form. Notice that each element you can
place on your form has its own button.

For a complete explanation of each element in the


Toolbox, review the Basic Customization chapter within
the Epicor ICE User Experience and Customization Guide.

4. Click the EpiNumericEditor element on the Toolbox to add a new Order number field to the sheet.

1014 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

5. Click an empty area of the form. The new field displays.

6. In the Properties grid for the new Numeric Editor control, change the IsTrackerQueryControl property
to True. The field now acts as a control for the search window.

7. You next need to bind this new field to a field within your dashboard query. In this example, use this field
to find Order Numbers. To do this, select OrderHed_OrderNum in the QueryColumn field.

10.2.700 1015
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

8. Enable the new numeric field for entry of data. To do this, change the DashboardPrompt property to True.

Once you have the two Order Number fields for the range on the form, you next have to assign conditions
to each field.

9. Change the DashboardCondition to LessThanOrEqualTo.

10. The original Order Number field on the form also needs to be assigned a condition. To do this, select the
Order field on the Advanced Search sheet.

1016 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

11. Select GreaterThanOrEqualTo in the DashboardCondition property.

12. It is also helpful to change the label text for the Order field to indicate this item is now a range search. To
do this, select the Order label element on the Advanced Search sheet.

10.2.700 1017
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

13. Enter Order Range: as the Text property.

14. The TabIndex field controls the order in which the user is prompted through the Advanced Search fields.
In this example, change the TabIndex to 28 so that you are prompted from the first Order Range field to
the second as you press the Tab key.

1018 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

15. Click Save and close the Customization Tools Dialog window.

16. To use the Order Range search, enter a sales order number in each of the range fields. In this example,
enter 5100 and 5115.

17. Click the Refresh button on the Standard toolbar.

10.2.700 1019
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

18. The Open Sales Orders sheet now displays only open sales orders that are greater than or equal to 5100
and less than or equal to 5115.

The Gauge View

A Gauge View is a visual tool that measures the levels of a specific view you select from your dashboard query.
Gauges can communicate various aspects of your data. As users click various records within the main query on
your dashboard, the gauge updates to reflect the level of the data on each record.

The Gauge Properties Window

Use the Gauge Properties Window to select the gauge style you want to display on your dashboard. Then you
indicate the starting and ending values that measure the value on the gauge. You can also create filter expressions
to limit the data that displays on the gauge.

Add a Gauge View to the Dashboard

1. In the Tree View, right-click the Query icon and select New Gauge View.

1020 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

The Dashboard Gauge Properties window displays.

2. Enter a Caption for the gauge. This value displays on both the Tree View and the tab that contains the
gauge. In this example, enter Gauge - Selling Quantity.

3. Click the Gauge Type button to find and select the gauge you want to display on the dashboard. After
you select the gauge type and return to the Dashboard Gauge Properties window, the name of the selected
gauge displays next to the Gauge Type button. Its type also displays in the Gauge Properties grid.

10.2.700 1021
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

4. In the StartValueBinding field, enter a value to use as the beginning gauge value. When the gauge evaluates
where to place its marker, the StartValueBinding value is evaluated against the EndValueBinding value. In
this example, enter 0 in this field.

5. In the EndValueBinding field, enter a numeric value to use as the final value on the gauge. In this example,
enter 100 in this field.

6. To complete the gauge, from the MarkerBinding list, select the data column to use to define the marker
on the gauge. As data changes within the query, this marker moves to a different location on the gauge.
In this example, select OrderDtl_SellingQty.

7. Click OK.

8. You can now display the gauge on your dashboard and evaluate how well the visual indicator evaluates the
selected data column. In this example, the current sales order detail line selected has an Order Quantity
of 30.00.

9. Select a sales order detail line that has an Order Quantity of 300.00. The gauge updates to display this
new quantity level.

1022 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

The URL/XSLT View

Use the URL/XSLT View to display a website using a URL address or an XSLT style sheet that displays data on your
dashboard. When you select this option, you can either enter a web address or select an existing XSLT file in your
network.
When you enter a web address, the application passes the URL to Microsoft® Internet Explorer®, so you can use
the typical Internet options for Web pages. You can also set up this feature to update the URL based on a Web
site address included in the selected query. So as you select a different record in a query, the URL also updates
with the Web address listed on this record.
When you enter a filename that ends in .xslt in the Web Address field, additional fields become available for you
to further define the Style Sheet details.

URL/XSLT Properties

The Dashboard URL/XSLT Properties window contains all the fields you need to set up a link to a Web address
or to display your data using an XSLT Style Sheet. In this example, you add a URL View and link the URL to the
Customer Website field. As you select sales orders for different customers in the query, the URL sheet automatically
displays each customer’s website.

Add a URL Link to Display the Customer Website

To link a URL to the customer’s website, the query must contain the Customer Website field. In this example,
you are using a query that already contains this field.

1. From the New menu, select New URL/XSLT View.

10.2.700 1023
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

The Dashboard URL/XSLT Properties window displays.

2. Enter a Caption for the URL. The text entered here displays in the title bar of the URL on the dashboard.
By default, the Caption contains Epicor’s Web address. In this example, enter Customer Website.

1024 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

3. If you want to display a specific website, enter a URL/XSLT Address. In this example, leave this field blank
so you can link to different websites based on the record selected in the dashboard.

4. In the Publisher field, select EPIC03-CustTrackerOrders01 - Order Query for Customer Tracker:
Customer_CustURL. The Publisher field contains all the columns that you selected to publish from the
query. As you choose orders for different customer records, the URL/XSLT view uses the customer website
published from the query to update the website.

5. Click OK.

6. Notice the URL/XSLT icon now displays in the Tree View of the dashboard.

7. Now when you select a sales order from the Open Sales Orders grid, the customer website displays on
the dashboard.

8. You can move this sheet to create separate sheet on the dashboard. To do this, drag the Customer Website
panel up so that the gray outline forms a notch at the top.

9. When you release the mouse, the Customer Website sheet displays as its own sheet.

10.2.700 1025
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

The Process Link

You use a Process Link on the dashboard to create a direct link to a system program commonly used; for example,
Sales Order Entry, Job Entry, Customer Entry, and so on. Once you link the process to the dashboard, you can
launch it from the Actions menu on the dashboard.

A user must have security access to any function (program) to


be able to launch it from the dashboard.

Process Link Properties

Use the Dashboard Process Link Properties window to define a linked program and then test its deployment.

Add a Process Link for Customer Entry

To add a Process Link to the Customer Entry program:

1. From the New menu, select New Process Link.

1026 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

The Dashboard Process Link Properties window displays.

2. Click the Process ID button to find and select the program you want to link to the dashboard.

10.2.700 1027
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

3. Click the Search button in the Menu Process Search window.

4. Select the entry program the primary users of the dashboard can access. In this example, select the Customer
menu process (ID ARMT1010).

5. Click OK.

6. To test the process link, click the Test button to launch the Menu Process ID.

1028 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

7. In the Dashboard Process Link Properties window, click OK.

8. Notice the Customer program icon now displays in the Tree View.

It also displays in the Actions menu. When you deploy this dashboard to the menu, users access the Process
Link for the Customers program from the Actions menu of the dashboard.

10.2.700 1029
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

The Report View and Report Link

You can add a Crystal Report to the dashboard in one of two ways - using a Report View or a Report Link. Use
both options to display a Crystal Report on the dashboard.
If you want the report to display directly in the dashboard, use the dashboard Report View option. When you
use the Report View, you use the dashboard Refresh button on the Standard toolbar to refresh the report data.

With the Report View option, the report displays within a


dashboard, and it cannot be scheduled to run regularly through
the System Agent. Instead the report updates each time you
refresh the data on the dashboard. For more information on
the System Agent, review the Automatic Data Processing
chapter found within the Epicor Implementation User Guide .

To open a report in a new window, use the dashboard Report Link option. You can then use the standard report
window’s toolbar to print or search for data in the report.
The first step in adding a dashboard Report View or Report Link is to define the Report Options. Use the Report
Options window to define the paths to the Crystal Reports executable, your Sample Data directory, and your
Local Reports directory.
Once you have defined the paths for the Report Options, you design the Crystal Report, and then upload it to
the network location.

Report Options

1. In order to refresh a Crystal Report View in the dashboard, you must enable the Refresh All button on the
dashboard. To do this, select the Enable Refresh All check box on the General sheet of the dashboard.

2. From the Tools menu, select Report Tools > Report Options.

1030 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

3. Enter the path to the Crystal Report Executable on your workstation or click the Ellipse button to browse
your local machine for the path. By defining this path, you are able to launch Crystal Reports Designer
directly from the dashboard to create the report.

4. The Sample Data Directory field displays the path to the sample data folder on your workstation. This
directory is used to store sample data (.xml files) generated for the report. After creating the report, you are
able to use this sample data to test the report layout.

5. The Local Reports Directory field displays the path to the reports folder on your workstation. This directory
contains your Crystal Reports .rpt files. After you save .rpt files in this location, you can launch Crystal Reports
to create and modify your report.

6. Click the Apply button after you define all fields.

Design Crystal Report

1. To design the Crystal report, from the Tools menu, select Report Tools > Design Crystal Report.

10.2.700 1031
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

2. The Design Crystal Report command first saves the sample data from the dashboard to an .xml file in the
Sample Data directory. Click OK to confirm the sample data was saved.

3. Crystal Reports ® automatically launches to design the report.

1032 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

4. Within Crystal Reports, verify the Start Page displays. From the Start a New Report section, select Report
Wizard. This utility walks you through all the steps necessary to design your report.

Review the Crystal Reports application help for information


on how to design a Crystal Report.

5. When the report wizard displays, select the Create New Connection node in the Available Data Sources
list.

10.2.700 1033
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

6. Click the + (plus) icon next to the ADO.NET (XML) node.

1034 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

7. In the File Path field, enter or browse for the .xml file using the path defined in the Sample Data Directory.
In this example, you select the CustSvcDbd.xml file from the SampleData folder.

8. Click the Finish button.

Select Report Data

1. Now select the data you want to use in the report. The NewDataSet node contains the datasets for both
the Open Sales Order and Zero Dollar grids that are on the dashboard.

10.2.700 1035
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

2. Select Open_Orders in the Available Data Sources list.

1036 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

3. Click the Blue Arrow button to move the data source to the Selected Tables list.

4. Click the Next button.

5. Select the fields you want to display on the report. In this example, you select the following fields:
• OrderHed.OrderNum
• OrderHed.OpenOrder
• OrderDtl.OrderLine
• OrderHed.NeedByDate
• Customer.Name

10.2.700 1037
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

6. Click Next.

7. Select Open_Orders.Customer.Name in the Available Fields list to group the information on the report
by Customer.

1038 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

8. Click the Blue Arrow button to move the field to the Group By list.

9. Click the Finish button to complete and preview the report.

This example demonstrates a very simple Crystal report.


You can create a much more complex report with multiple
groupings, subtotals, and charts. Refer to the available
Crystal report documentation for more information.

10. Click Save on the Standard toolbar to save the report.

10.2.700 1039
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

11. In the Save As window, navigate to the Reports folder you defined previously as the Local Reports Directory.
Enter a name for the report in the File name field. In this example, you name the report CustomerList.rpt.

12. Click Save and close the Crystal Reports application.

13. Navigate back to the dashboard.

1040 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

14. From the Tools menu, select Report Tools > Upload Report to upload the report to the Server Reports
directory.

15. Select the CustomerList.rpt report from the local reports directory.

16. Click Open. This copies the report from your local reports folder to the server report directory.

17. Click OK in the Upload Report confirmation window.

10.2.700 1041
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

This action saves the report to the CustomReports folder of Server Data Directory specified in System
Agent Maintenance. Typically, this folder is a local directory on the same machine that runs the application
server. The location may look as follows: \\MyServer\EpicorData\CustomReports

Add Report View

1. Click the Down Arrow next to the New button; select New Report View.

1042 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

2. Enter a Caption for the report view. In this example, enter Customer List.

3. Click the Ellipse button in the Report File field to find and select a report file.

4. Select the CustomerList.rpt file from the CustomReports folder. Recall this location is specified in System
Agent Maintenance in the Server Data Directory field.

10.2.700 1043
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

5. Click the Open button.

6. If you have multiple data definitions for the selected report, either directly enter this definition or click the
Report Data Definition button to find and select the definition you need.

1044 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

7. Select the Generate on Refresh All check box if you want the report to be completely regenerated each
time you click the Refresh All button.

8. In the Dashboard Report View Properties window, click OK.

9. The report view icon displays in the Tree View of the dashboard.

10. Click the Refresh All button to generate the report.

11. Notice the report displays inside the dashboard as a new sheet.

Add a Report Link to the Dashboard

The process for adding a Report Link is the same as for adding a Report View. The only difference is that you
select New Report Link from the New menu to add the report to the dashboard. In this example, you add a Report
Link to the Customer List report that you just created in the previous exercise

1. From the New menu, select New Report Link.

10.2.700 1045
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

2. Enter a Caption for the report. In this example, enter Customer List Report.

1046 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

3. Click the Ellipse button in the Report File field to find and select the CustomerList.rpt file from the
CustomReports folder.

4. Click OK.

5. Notice the new report link icon displays in the Tree View of the dashboard.

10.2.700 1047
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

6. The report links you add to the dashboard are accessible using the Actions menu. To generate the report,
from the Actions menu, select Customer List Report.

7. Notice the Customer List Report displays in a new window instead of inside the dashboard.

1048 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

Publish and Subscribe Functionality

Use the unique dashboard framework to publish data from one query and subscribe to another query. This feature
displays related information when a record is selected on the dashboard and also in the title bar.
To use the Publish and Subscribe functionality, you must first have multiple queries on the dashboard that display
related information. In this example, add a second query to display sales order line item shipment information.
Once you add this new query to the dashboard, you can use Publish and Subscribe. As you select a sales order
from the Open Sales Order or Zero Dollar Orders grids, the related shipment information displays for that order.

Add a Secondary Query to Display Line Item Shipment Information

The second query you add to the dashboard, zCustomerShipments, displays line item shipment information.
To add a second query to the dashboard:

1. From the New menu, select New Query.

The Dashboard Query Properties window displays.

2. Click the Query ID button to find and select the zCustomerShipments query.

10.2.700 1049
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

3. Select the Auto Refresh on Load check box.

4. Click OK.

5. Click the Refresh button on the Standard toolbar to execute the new query and retrieve the data.

6. To change the title of the grid view, in the Tree View, right-click the zCustomerShipments grid icon and
select Properties.
The Dashboard Grid Properties window displays.

1050 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

7. In the Caption field, enter Shipment Details.

8. Click the Clear All button.

9. Select the Visible check box for each field you want to display from the list. In this example, select the
following fields:
• ShipHead_ShipDate
• ShipDtl_PackNum
• ShipDtl_PackLine
• Calculated_QtyShip
• ShipDtl_OrderNum
• ShipDtl_OrderLine

10. Click OK.

Publish

Information published out from one query can be used to display in the title bar, as well as for subscription by
another query. In a previous example, you published the customer name to the title bar of the dashboard. In this
example, publish the order number and order line from the EPIC03 – CustTrackerOrder01 query. Since shipment
information is stored at the line item level, you need to publish both the order number and order line.

10.2.700 1051
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

Publish Fields from a Query

To publish fields from a query:

1. In the Tree View, right-click the EPIC03CustTrackerOrderso1 query icon and select Properties.

The Dashboard Query Properties window displays.

2. Navigate to the Publish sheet.

1052 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

3. From the Publish Columns list, select OrderHed_OrderNum and OrderDtl_OrderLine.

4. Click OK.

Subscribe

To have a view subscribe to published data, you use a Filter in the Dashboard Grid Properties window. Similar to
a filter which limits the data that displays, you can apply a filter that only displays data in a particular field when
it is equal to the value of the data published. In this example, a filter is applied to the Shipment Details grid. The
filter uses both the Order Number and the Order Line published from the EPIC03-CustTrackerOrders01 query.
This limits the shipment detail to display only the line item selected in the Open Sales Orders and Zero Dollar
Orders grid views.

Apply a Filter that Subscribes to the Published Order and Line Number

To apply a filter that subscribes to published data:

1. In the Tree View, right-click the Shipment Detail grid icon and select Properties.

10.2.700 1053
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

The Dashboard Grid Properties window displays.

2. Navigate to the Filter sheet.

3. From the ColumnName list, select the field you want to filter on. In this example, select ShipDtl_OrderNum.

1054 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

4. From the Condition list, select = (equals).

5. From the Value list, select EPIC03CustTrackerOrders01 - Open Orders: OrderHed_OrderNum. This
entry filters the data based on the order number published from the query.

Notice the Value list contains a value for each of the


published data fields.

6. Press the Enter key to add a second filter to the grid properties.

7. From the ColumnName list, select the second field you want to filter on. In this example, select
ShipDtl_OrderLine.

8. From the Condition list, select = (equals).

9. From the Value list, select CustTrackerOrders01- Order Query for Customer Tracker:
OrderDtl_OrderLine. This second entry filters the data based on the order line.

10. Click OK.

11. Notice the Shipment Details grid icon now displays a satellite icon with an arrow pointing down in the
Tree View of the dashboard. This indicates this grid view is subscribing to published information.

12. The EPIC03CustTrackerOrders01 query icon also displays a satellite icon in the Tree View, except this
icon shows an arrow pointing up. This indicates that information is being published out of this query.

10.2.700 1055
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

Bind Query Parameter to a Published Column

Use the Parameters sheet on the Dashboard Query Properties to bind a BAQ parameter to a published column
in another BAQ's results grid.
This functionality allows query-level filtering of data returned by a BAQ.
As a prerequisite to this example walkthrough, create two queries in the Business Activity Query program:
• CustomerData - This BAQ will get data from the Customer table. Pick a few of the Customer table fields
to display and ensure the CustNum field is included.
• OrderData - This BAQ will display several fields from the OrderHed table - for example, CustNum, Company,
OrderNum, OrderDate, and TotalCharges. Add a parameter of integer type to the query - for example,
InboundCustNum.
During this walkthrough, you will bind the input parameter of the OrderData query to a published field from
the CustomerData query results - for example, Customer Number (CustNum). This will enable displaying of
sales order information in the dashboard's secondary view for a specific customer selected in the primary view.

1. From the Main Menu of the Dashboard program, select Tools > Developer to enable creation of new
dashboards.

2. From the Tool bar, select New > Dashboard.


Dashboard entry form activates.

1056 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

3. Enter a Definition ID - for example, OrdersbyCustomer.

10.2.700 1057
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

4. Add a Caption - for example, Orders by Customer.

5. Add a short Description - for example, This dashboard displays the list of orders for a selected
customer.

6. From the Tool bar, select New > New Query.


The Dashboard Query Properties window displays.

7. Click the Query ID button to search for and select the previously created CustomerData query.

Then click OK. The query displays in the Dashboard > Queries panel.

8. Right-click on the query and select Properties.


The Dashboard Query Properties window displays.

1058 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

9. Navigate to the Publish sheet.

10. Select the Customer_CustNum column from the Publish Columns list.

11. Click OK.


Now, similar to the previous query, add the second query - OrderData.

12. Search for and select the OrderData query.

13. In Dashboard Query Properties, navigate to the Parameters sheet.

10.2.700 1059
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

14. Select the InboundCustNum parameter from a drop-down list.

Each BAQ parameter can have only one binding. Once


bound to a published column, a parameter is no longer
available for selection.

15. For Value, select CustomerData-Customer Data:Customer_CustNum.


This binds the selected BAQ parameter to a published field of the CustomerData query.

16. Click OK.

When you deploy and test the dashboard, you can see that the second query accepts the value for its parameter
from the first query and displays order data for the selected customer:

1060 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

The Dashboard Browse

Use a Dashboard Browse to add the standard search button on the dashboard, along with the Navigation toolbar.
The standard search button (indicated by a binoculars icon) enables users to start a search for records within a
dashboard. Users leverage the Navigation toolbar to scroll through selected records, or select a specific record
from a drop-down list of search results.
A Dashboard Browse is added to the query level of a dashboard using a special filter on the query. You must also
determine for which field you are using the search. For example, you can use the Part Number field in the Part
master file.

Add a Dashboard Browse to the Dashboard

Similar to an Advanced Search (tracker view), use the Dashboard Browse to select specific records to display in
the dashboard. In this example, you add a Dashboard Browse to the EPIC03CustTrackerOrders01 query.

1. In the Tree View, right-click the EPIC03-CustTrackerOrders01 icon and select Properties.

10.2.700 1061
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

The Dashboard Query Properties window displays.

2. Navigate to the Filter sheet.

1062 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

3. From the ColumnName list, select the field you want to search by. In this example, you want to enable the
search by sales order number so you select OrderHed_OrderNum.

4. From the Condition list, select = (equals).

5. From the Value list, select Dashboard Browse. This option displays at the bottom of the list of values.
The Dashboard Browse Properties window displays.

6. The value in the Browse Label field displays in the navigation tools area in the toolbar. In this example,
Order: is the default label that displays; however, you can change this if you want.

10.2.700 1063
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

7. Select the column that you want to display in the Display Column field. The values in the column selected
display in the drop-down list of the navigation tools area. In this example, OrderNum is the default value
that causes the order numbers to display for browsing.

8. Select the columns you want to display in the drop-down list of the Navigation toolbar from the Drop
Down Columns list. In this example, select OrderNum and CustomerName.

9. Click the White Arrow button to move them into the selected columns list.

10. Select the Primary Browse check box. By selecting this option, the Dashboard Browse is placed on the
toolbar of the dashboard as the primary search mechanism.

1064 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

A Dashboard can contain more than one Dashboard


Browse. Each query that is added to the Dashboard can
have its own; however, one is indicated as the Primary
Browse. A Primary Dashboard Browse displays next to the
Standard toolbar at the very top of the window above
the contents pane of the Dashboard. A Dashboard Browse
that is not marked as Primary displays within the Contents
pane of the Dashboard at the same level as the query.

11. Select the Manage Widths check box. Click the drop-down list to select the display option you want to
use to manage the width of the dashboard browse. By default, it automatically formats to the width of the
data.

12. Click OK.

13. Click OK in the Dashboard Query Properties window.

10.2.700 1065
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

14. Notice the Dashboard Browse displays on the toolbar of the dashboard, so you can find and select specific
orders using the standard Sales Order Search window.

1066 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

15. Click the Binoculars button on the Dashboard Browse to launch the Sales Order Search.

10.2.700 1067
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

16. From the Search window, select the records to display in the dashboard browse.

17. Click OK.


Now you can navigate through each sales order record using the standard Navigation Tools in the Dashboard
Browse. As you select each record, it displays on the dashboard.

Dashboard User Notes and Tech Notes

The Dashboard User Notes and Tech Notes are areas where you can store specific documentation or notes about
the current dashboard. While you are in the Developer mode, you can update both User Notes and Tech Notes.

1068 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

Users who do not have the Dashboard Designer privileges can only maintain User Notes but can still view Tech
Notes.

Update Notes

1. To open the Dashboard Notes window, click the Notes icon on the Standard toolbar.

2. Enter User Notes. User notes are visible only to the specific user who entered them.

10.2.700 1069
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

3. Enter technical notes in the Tech Notes field. All users can view the notes you enter here.

4. Click OK to save and exit the window.

Dashboard Properties

Just like each view on the dashboard contains unique properties, the dashboard itself has its own properties
where you can define its additional characteristics.
Located on the General sheet of the dashboard, you can use the Titlebar Subscribers to publish more than one
field to the title bar of the dashboard. This feature is available when you have multiple queries publishing
information, and you want to indicate various queries that are used on the dashboard.
You can also make the dashboard available as an Advanced Search so that users can access this dashboard from
a standard search window. The Advanced Search functionality is designed around the concept of “Like” fields.
Similar to the “Like” fields used in a BAQ Search, the Advanced Search also uses “Like” fields; however, the data
displays as a dashboard and opens in a separate window on your workstation. You can then use the dashboard
to search for specific data, select a record, and retrieve the record back to the original program from which you
were searching.

Advanced Searches are available to use wherever you can


launch a search window. You can access it either by clicking
the search button or through a context menu search option.

1070 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

To learn how to use an Advanced Search, refer to the


Advanced Searches section in the Searches chapter.

Modify the Dashboard Title Bar

In this example, you will use the Customer Service Dashboard to publish additional columns from the Customer
Shipments query for display on the Title Bar of the dashboard.

1. In the Tree View, right-click the zCustomerShipments query icon and select Properties.

The Dashboard Query Properties window displays.

2. Navigate to the Publish sheet.

10.2.700 1071
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

3. From the Publish Columns list, select ShipDtl_PartNum.

4. Select the Publish to Title check box.

5. Select ShipDtl_PartNum from the drop-down list.

6. In the Title caption field, enter Shipped Part:.

7. Click OK.
Now as you select an order that has shipment detail, the part number for the line item shipment displays
on the title bar.

8. Notice the Titlebar Subscribers area on the General sheet now displays the newly added ShipDtl_PartNum.

1072 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

Enable the Dashboard as Advanced Search

To enable the Customer Service dashboard as an Advanced Search in the Part program:

1. Navigate to the General sheet of the dashboard.

10.2.700 1073
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

2. Navigate to the Adv Search sheet.

3. Select the Advanced Search check box.

4. From the Available “Like” columns list, select OrderHed.OrderNum. The key fields of your dashboard
display in this list; use them to search throughout several programs in the application.

5. Click the White Arrow button to move it to the Advanced Search “Like” columns list. When fields in
your query are selected as “Like” Columns and the same field is used for searching in various system
programs, the dashboard displays as a search option in the programs search form.

6. From the Available “Like” columns list, select Part.PartNum and click the White Arrow to move it to
the Advanced Search "Like" column list.

7. Click Save on the Standard toolbar.

The dashboard is now available as an advanced search option anywhere that you can search for sales orders
and/or parts.

To review how to access and use an advanced search, read the


Advanced Search section in the Searches chapter.

1074 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

Dashboard Modification

Now that you know how to create your own dashboard, you can easily modify an existing dashboard. We strongly
recommend you first make a copy of the dashboard you want to update, and then save it with a new name. You
can modify a dashboard delivered by Epicor or modify custom dashboards using this same method. The example
below demonstrates how to copy a standard delivered dashboard and save it with a new name so that you can
modify it.

Copy a Dashboard

In this example, you open the standard Job Status dashboard and save it with a new name so that you can modify
it.

1. Click the Definition ID button in the Dashboard window.

2. The Dashboard Search Form window displays. Click the Search button and select JobStatus from the
search results.

10.2.700 1075
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

3. Click OK.
The System Dashboard Warning message displays.

4. Click OK.

1076 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

5. From the File menu, select Copy Dashboard.

10.2.700 1077
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

6. In the Definition ID, enter a unique identifier for the dashboard. In this example, enter MyJobStatusDbd.

7. Click OK.
You can now modify the dashboard however you want. You can add new queries or columns, apply filters,
or modify the advanced search.

Multi Threaded Save

Use the Multi Threaded Save functionality when you want multiple rows to update through a series of threads.
This functionality improves performance when you have a large amount of data to update. If you activated multi

1078 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

threading or you wish to save the records through this process, you need to display the Multi Threaded Save
window.
In this example, use the Customer Contact Update dashboard created in the Updatable Dashboards section.
You can access this functionality from the following places on the dashboard:
• Excel Uptake Properties - As you import data from an .xlsx spreadsheet, you can select the Multi Threaded
Save check box. When you click Save on the dashboard, the Multi Threaded Save window displays.
• Actions menu - Select the Multi Threaded Save option from this menu.
• Save button - This option displays when you click the Down Arrow next to the Save button.

1. In this example, click the Down Arrow next to the Save button and select the Multi Threaded Save option.

2. The Multi Threaded Save window contains parameters you define. To help you decide what values to
enter in these parameters, review the Records to Update value. This value indicates how many records
you will save through this process.

10.2.700 1079
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

3. If you want to update records using multiple threads, select the Submit in batches check box. You can
now define how many batches, or threads, you wish to use to save the data.

You can also indicate you wish to update the entire


collection of rows at once. To do this, clear the Submit in
Batches check box.

4. In the Submission batch size field, enter the number of records you will save in one thread. When you
save the data, these records all process at the same time.

5. In the Submission threads field, enter the number of threads you will use to process the data. You can
enter up to 10 threads.

6. Click Start.

7. The Processing Statistics section now displays the progress of the Multi Threaded Save. As records are
saved to the database, the values in the Records Processed and Percent Complete fields increase. These
fields also report any errors that occurred as well as the process performance times.

1080 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

Use these values to determine the optimal performance for multi threading. If you update large amounts
of data, modify the Submission batch size and Submission threads values each time you run this process to
discover the combination that gives you the best performance.

8. Click Close to exit the window.

Reusing Views

You can use the Publish Views functionality to publish views from one dashboard and make them available for
reuse on another dashboard. The view then displays in the Available Views panel on any dashboard, and you or
other users can select this view for display on a different dashboard. This feature gives you a convenient way to
display any view for reuse on another dashboard.

This feature is available for Grid, Chart, Gauge, Tracker and


URL/XSLT views.

In the following example, you will publish the Customer List view from the Customer Contact Update dashboard
created previously in this chapter within the Updatable Dashboards section. You will then open the Opportunity
Quote Status dashboard and add this view to it.

1. In the Tree View, right-click the Customer List grid and select Publish View.

You can also publish a view from within the Dashboard View Properties window of any view by selecting
the Publish View check box.

10.2.700 1081
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

2. In the Published View Properties window, view the Dashboard Caption field that displays the source
of the view.

3. In the Published Caption field, enter a name that will display in the list of Published Views.

4. In the Group field, enter or select a name of the group you would like to link to a published view.

5. Enter a Description for the published view.

6. Click OK.

7. To display the Available View panel, from the View menu, select Published Views.

8. The Available Views panel displays the list of all published views at the bottom of the Tree View.

1082 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

9. If you want to un-publish a view, right-click the view in the Tree View and select Un-Publish View. In this
example, leave the view published.

10. Click Save.

11. To clear the dashboard, click the Close All button on the Standard toolbar.

12. To the confirmation message, click OK.

The current Dashboard clears.

13. You return to the Dashboard program. You can now reuse this view on another dashboard. In this example,
reuse it on the Opportunity/Quote Status dashboard.
In the Definition ID field, enter Opportunity/QuoteSts to open the Opportunity Quote Status
Dashboard. This record is a copy of the standard system Quote Status dashboard.

10.2.700 1083
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

14. Click Refresh to run the query and populate the dashboard data.

1084 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

15. Notice the Available Views panel displays the previously published Customers List view.

16. To add the published view to the current dashboard, select the view from the Available Views panel and
click Load Published View.

17. Now synchronize the information between views. Do this by publishing the Customer Number from the
zQuoteStatus query and subscribe to the value using the Customer List view.
In the Tree View, right-click the zQuoteStatus query icon and select Properties.

18. In the Dashboard Query Properties window, navigate to the Publish sheet.

10.2.700 1085
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

19. Select the check box next to the QuoteHed_CustNum.

20. Click OK.

21. Change the Customer List view to subscribe to the value of the Customer Number published from the
zQuoteStatus query.
In the Tree View, right-click the zCustomer01 query icon and select Properties.

1086 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboards | Chapter 9

22. Navigate to the Filter sheet.

10.2.700 1087
Chapter 9 | Dashboards Epicor ICE 3.2 Tools User Guide

23. From the ColumnName list, select Customer_CustNum.

24. From the Condition list, select = (equal).

25. From the Value list, select zQuoteStatus-OpportunityStatus: QuoteHed_CustNum.

26. Click OK.

27. The dashboard now displays the Customer List grid view. This view subscribes to the value of the customer
number on the selected quote. You are now re-purposing this view for display within a different dashboard.

1088 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

Chapter 10: Dashboard Utilities

The application contains several tools you can use to create, globally modify, deploy, and manage dashboards. This
chapter explores each available tool. If you need to heavily customize a dashboard, you should leverage these important
utilities. You use these utilities to manage both smart client dashboards and mobile device dashboards.
The utilities are organized into the following categories in this chapter:
• Export and Import Dashboards
• Build and Deploy a Dashboard to the Main Menu
• Create and Deploy Mobile Device Dashboards
• Dashboard URL Query Phrase Subscribers
• Epicor SharePoint Publisher

Export and Import Dashboards

You can export dashboards from your Epicor application. These dashboards are stored as an archive in your
personal directory. You can then import them back into any database when you need.

Export Definition
Two export options are available:
• Export Dashboard Definition – This option exports the dashboard to a specified location as a .dbd file. This
file includes all the views, properties, and layouts that you defined in the dashboard.
• Export Dashboard and BAQs – This option exports the dashboard definition and all the queries used on
the dashboard. This option is useful when you have created your own queries and you do not want to copy
the queries separately to another database or company.
In this example, export a copy of the Customer Service dashboard (created in the previous chapter) along with
the business activity queries used to display its data.

1. From the File menu, select Export Dashboard and BAQs.

10.2.700 1089
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

The Export Dashboard Definition window displays.

2. Notice the Export Dashboard Definition window defaults to the Export folder on your local machine.

1090 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

3. In the File name field, enter CustomerServiceDB.

4. The file type defaults to Dashboard Definitions (*.dbd).

5. Click Save.

Import Definition
When you export a dashboard, you can import it into the application with the Import Dashboard Definition
option.
To import the Customer Service dashboard into the application:

1. From the File menu, select Import Dashboard Definition.

10.2.700 1091
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

The Import Dashboard Definition window displays.

2. Notice the Import Dashboard Definition window defaults to the Export folder on the local machine.

1092 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

3. Select CustomerServiceDB.dbd from the Export folder.

4. Click Open.
The Rename Dashboard Definition window displays.

5. In the Definition ID field, enter CstrSrvcDsbd.

6. Click OK.

The Import BAQ Options window displays only if you are


importing a dashboard definition (.dbd) file that contains
queries.

The Import BAQ Options window displays.

10.2.700 1093
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

7. To replace an existing query with the imported query, select the Replace existing check box for a selected
query. You cannot replace standard system queries (identified by the letter z). Rather, you must import the
query as new.

In Epicor SaaS installations (Epicor hosted environments),


a user with Global Security Manager rights (GSM) has
the ability to overwrite a BAQ in another company or
owned by another user.
Note the dashboard import process does not prompt a
GSM user to overwrite the existing query. This user
imports the BAQ into a company and with authorship
defined in the exported BAQ definition.
The above process does not apply to Global BAQs; when
importing a query of this type, a GSM user has the same
rights as an ordinal user.

The options/values for tenant and multi-tenant features


are only for Epicor hosted environments. Typically you can
ignore these options. Internal Epicor administrators who
need more information should refer to the Epicor SaaS
Installation Guide.

8. If you do not want to replace an existing query with the imported query, clear the Replace existing check
box and enter an ID in the New BAQ ID field. Be sure the BAQ ID conforms to the custom query naming
conventions as described in the Business Activity Queries chapter.

9. Click OK.

10. After the import is complete, click Save.

1094 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

Now you can modify the dashboard as you need.

Deploy Dashboards

After you finish designing a dashboard, you need to both build and deploy it to your users. Use the Application
Builder process to compile the dashboard definition into a UI finished assembly and then deploy it to the server.
When the dashboard definition is compiled, deploy it to the Main Menu and the Favorites Bar where users can
access it. You can then customize and personalize the dashboard as you need.

Deploy Dashboard as an Application


You can view the dashboard as a finished assembly by testing the UI application. Once you test it, you can deploy
it to the menu for other users.

1. From the Tools menu, select Deploy Dashboard.

10.2.700 1095
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

The Deploy Dashboard window displays.

2. Click the Test Application button.

1096 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

The dashboard assembly displays in a new window.

3. View the compiled assembly you will deploy to end users. Typically, you test the dashboard functionality
and then close the test dashboard.

10.2.700 1097
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

4. The results of the Test Application now display in the Deploy Dashboard window.

1098 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

5. Select the Deploy Smart Client Application check box if you want the dashboard to display as a program
on the Main Menu within smart client installations.

6. When you select the Add Menu Tab check box, the following happens depending on which mode is used
to run the Epicor ERP application:
• In Classic style, this check box causes the dashboard to display on your Main Menu as a separate tab.
You can then display and use this dashboard by clicking this tab.
• In Modern Shell, the dashboard is automatically loaded and displays as a new window on each logon.
You can control menu tabs on the Preferences > Tabs sheet.
Depending on the interface style, you launch this window in different ways:
• Classic Menu - From the Main Menu, click Options > Preferences.
• Modern Shell Menu - From the Home Page screen, click the Settings tile. Verify General Options
is highlighted and click the Preferences... link.

7. Optionally, select the Add Favorite Item check box. The following happens depending on which mode is
used to run the Epicor ERP application:
• In Classic style, the dashboard is added to the Favorites bar, and becomes part of the Dashboard
Assemblies group.
• In Modern Shell, the dashboard becomes part of the Dashboard Assemblies favorites group found
on the Home Page.
You can then launch this dashboard by double-clicking this icon.

8. If you want this dashboard available from Epicor Web Access, select the Generate Web Form check box.

For more information about developing Web Access


forms, read the Customization Utilities chapter in the
Epicor ICE User Experience and Customization Guide.

9. To generate the dashboard for use on a mobile device, select the Generate Mobile Application and
Available for Mobile Menu check boxes. These check boxes are only available if the dashboard is designed
as a Mobile Device Dashboard.

To learn more about Mobile Dashboards, read the Mobile


Device Dashboards section later in this chapter.

10. Click Deploy.

11. Notice the Application Builder message displays the location where the .dll file is deployed on the server.

10.2.700 1099
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

12. Click OK and close the dashboard.

Access New Dashboard

Once you deployed the dashboard, other users may use it.
Here's how other users can access the dashboard you created:

1. When you use the ERP application using the Classic Style click the Favorites bar on the Main Menu.

1100 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

2. It contains a Favorites Group called Dashboard Assemblies. Since you deployed the dashboard as the
Favorite item, notice the Customer Service Dashboard now displays as an icon you can select and launch
from within this group.

3. Also, in the Classic Style, the Menu Tab on the Main Menu now contains the Customer Service Dashboard.
The dashboard displays when you select the tab.

4. When you use the ERP application using the Modern Shell style, the dashboard displays as a tile within the
Dashboard Assemblies Favorites group on the Home page.

10.2.700 1101
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

5. In the Classic Style, you can quickly add the dashboard to the menu using the drag and drop functionality.
You first select the folder on the Main Menu where you want the dashboard to deploy. In this example, you
navigate to: Sales Management > Order Management > General Operations

1102 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

6. To add the dashboard assembly to the menu, from the Options menu, select Developer Mode.

10.2.700 1103
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

In order to use the Developer Mode option, you must


have Customize Privileges. This is assigned in User Account
Maintenance.

7. Right-click the Customer Service Dashboard on the Favorites Bar and drag it to the selected menu
location.

8. Click OK to confirm you want to copy the item to the Main Menu.

9. Now the dashboard is available to all users who have security access to the selected menu.

1104 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

The dashboard is automatically assigned a unique menu


ID when it is added to the menu.The menu ID is an eight
digit code, for example, UDDBXXXX (where XXXX is a
numeric value automatically assigned). You can view this
information in Menu Maintenance.

Deploy Kinetic Dashboards

You can test, generate and deploy a dashboard as a Kinetic application and then add it to the main menu to
make it available for other users within your company. This process is a preview of the full functionality coming
with the future releases.
For the details on Kinetic applications, refer to the new Kinetic Help.

Deploy Dashboard as a Kinetic Application


You can view the dashboard as a finished Kinetic assembly by testing the UI application. Once you test it, you
can deploy it to the menu for other users.

1. From the Tools menu, select Deploy Dashboard.

10.2.700 1105
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

2. Click Preview Kinetic.


The dashboard definition builds; the field at the bottom of the window displays its progress. Eventually the
dashboard opens as a Kinetic application in a separate window. You can now test the dashboard to make
sure it loads the information you need and displays it in the format you want, and then exit the dashboard.
You return to the Deploy Dashboard window.

1106 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

3. Select the Generate Kinetic Form check box.

4. Click Deploy.
This generates the Kinetic dashboard file and uploads it to a folder to the following directory:
Server/Apps/MetaUI. The name of the folder is the name of the generated Kinetic dashboard program,
you can review it in the field at the bottom of the Deploy Dashboard window.

5. Review and note the name of the generated folder.

10.2.700 1107
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

6. Click OK.
The Kinetic dashboard is deployed the following location on the server:
Server/Apps/MetaUI/Ice.UIDbd.CustSvcDbd. You can now add this dashboard as a menu item to make
it available for other users within your company.

Add Kinetic Dashboard to the Main Menu

1. Navigate to Menu Maintenance.


Menu Path: System Setup > System Maintenance > Menu Maintenance

This program is not available in Epicor Web Access.

2. In the tree view, navigate to and expand the folder where you want to place the new item.

1108 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

3. From the New menu, select New Menu.


Make sure a blank menu item appears in the directory you selected.

4. In the Menu ID field, enter the ID of your Kinetic dashboard menu item.

10.2.700 1109
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

5. Verify that UD is selected in the Module drop-down list.

6. In the Name field, enter the name for your new menu item. It will display as the name of the application
in the main menu.

7. Specify Order Sequence for this menu item.

8. From the Program Type drop-down list, select Kinetic App.

9. From the Program drop-down list, select the Kinetic dashboard program generated in the previous task.

10. The URL field fills in with the Kinetic dashboard URL: /metafx/#/view/<metaUI folder name>, where
<metaUI folder name> is the name of the generated folder.

11. Click Save.

1110 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

12. Restart the Epicor ERP application. You can now launch this Kinetic dashboard from the folder you selected
for it in the main menu.

Mobile Device Dashboards

The Epicor Mobile Access module supports access to mobile dashboards. Mobile dashboards are generated as
web applications that run on a number of mobile browsers including the BlackBerry® and iPhone™ devices. By
utilizing updatable business activity queries (BAQs) and the Mobile Dashboard functionality, you can create custom
data entry mobile web pages that users can access and update data directly from their phones and other mobile
devices.

Assign Mobile Access Rights


You must activate a security privilege in order to have access to the mobile device functionality. You assign this
user privilege in User Account Maintenance.

1. Navigate to User Account Security Maintenance.


Menu Path: System Setup > Security Maintenance > User Account Security Maintenance

10.2.700 1111
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

2. Select a specific user on the Detail sheet.

3. Click the Options tab.

4. Select the Allow Mobile Access check box.

You must also have Dashboard Developer rights to create


a new dashboard or update an existing one.

5. Click Save.

Create a Mobile Device Dashboard


You can target any dashboard you create to be available for use on a mobile device. If you have a dashboard
you use within the application, make a copy of this dashboard and then indicate this copy will be used on the
mobile device. In that way, you can make changes to the mobile dashboard that will not impact the standard
application. Be aware that some smart client dashboard features are not supported on a mobile device, such as
Tracker Customizations, Report Links, Report Views, and Process Links.
In this example, you will make a copy of the Customer Contact Update dashboard created in the previous chapter,
and then generate it for use on a mobile device.
Menu Path: Executive Analysis > Business Activity Management > General Operations > Dashboard

This program is not available in Epicor Web Access.

To create a mobile device dashboard:

1. Click the Definition ID button to find and select the dashboard you want to target for use on a mobile
device. In this example, select ABC_CustContUpdate.

1112 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

2. From the Tools menu, select Generate Mobile Dashboard.

The Generate Mobile Dashboard window displays.

10.2.700 1113
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

3. Select the Show in Designer check box.

4. Click OK.

5. A warning message alerts you that certain features of the dashboard are not supported on mobile devices.
Click OK.

6. A new dashboard definition is created for the mobile version of the dashboard. In this example, the new
Definition ID is ABC_CustContUpdate_m.

1114 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

7. Notice the Target Mobile Device check box is now selected. This indicates the dashboard will display on
a mobile device interface.

8. Use the Mobile Navigation sheet to define how to navigate between the views on the mobile device
dashboard.

9. Use the Mobile sheet to test how the dashboard data displays on the mobile device.

Both the Mobile Navigation and Mobile sheets are discussed in the next sections.

Define Mobile Navigation


Use the Mobile Navigation sheet to define Flows and Jumps; these interface functions set up how users navigate
a dashboard’s interface on the mobile device.
Flows control the order in which different views display on a mobile device, and which view is available depends
on the navigation buttons selected on the mobile device. Jumps control what forms users can directly access.
The Jumps display in a drop-down list on a mobile device, so users can select options on this list to quickly navigate
and display these views.

1. Navigate to the Mobile Navigation > Flow sheet.

10.2.700 1115
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

2. Flows are automatically defined when the mobile dashboard generates, but you can change the order to
create the flow you want. In this example, the Customer List grid displays first when the dashboard opens
on a mobile device. The Customer Contacts grid is the next view that displays; it contains the contacts linked
to the selected customer.

3. Navigate to the Mobile Navigation > Jumps sheet to define which view users can immediately display, or
jump to, from each view. Jumps are helpful when a dashboard has many views and you need to set up
several ways for users to navigate around the mobile device dashboard.

1116 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

4. The Name grid displays all mobile dashboard views. For each view, you can define another views where
you can jump to. In this example, select the Customer Contacts grid.

5. The Available Jump Pages display the available views. Select the view of your choice.

6. Click the Right White Arrow to add the option to the Jump To Page list.

7. In this example, the Advanced Search view is now directly accessible from the Customer Contacts grid
view.

10.2.700 1117
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

8. Navigate to the Mobile sheet to see how the dashboard displays on a mobile device.

1118 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

9. Click Refresh to populate the data.

10. The Customer List displays in the mobile device format.

11. Select a customer from the list. In this example, select Ace Molding.

12. Click the Right Blue Arrow to see the next view defined on the Flow sheet.

13. In this example, you now see the Contact List for the Ace Molding customer as this customer was selected
in the previous Customer List view.

10.2.700 1119
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

14. Click Save on the Standard toolbar.

Deploy Mobile Dashboard Device


Once you have defined the dashboard, use the Deploy Dashboard feature to make it available on both the mobile
device and the mobile device menu. The mobile menu is updated by this process, so you can maintain the forms
you deploy using Menu Maintenance within your Epicor application.

1. From the Tools menu, select Deploy Dashboard.

1120 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

2. In the Deploy Dashboard window, select the Generate Mobile Application check box. This check box
indicates you want to create a mobile device application from the current dashboard.

10.2.700 1121
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

3. Select the Available for Mobile Menu check box. This check box indicates you want users to navigate to
this mobile device dashboard from the mobile device menu.

4. Click Deploy.

5. When the process finishes generating the mobile device dashboard, click OK and close the dashboard.

1122 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

Mobile Menu Maintenance


You can access and maintain the forms you deploy to the mobile menu from Menu Maintenance. Launch this
program from within your smart client installation.
Menu Path: System Setup > Security Maintenance > Menu Maintenance

This program is not available in Epicor Web Access.

1. Notice the Mobile Menu in the tree view displays the Customer Contact Update mobile dashboard you
just deployed.

10.2.700 1123
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

2. The deployment process created all the required fields for the new mobile menu option.

3. Use the Security sheet to define security and user access to the mobile dashboard.

Explore Home Page


A user accessing the Epicor Mobile Access environment must have the Allow Mobile Access property enabled
in User Account Maintenance.
To launch a mobile dashboard on a mobile device:

1. Launch the Epicor Mobile Access 2.0 application using an available browser. To log in, use a valid Username
and Password.

1124 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

2. The sliding sidebar on the left presents menu options on any given screen. Notice on the Home Page, the
list of dashboards added to Mobile Menu displays.
There are two ways of adding a mobile dashboard to the menu - using the Dashboard deployment feature
or through the Menu Maintenance program.

3. If you are looking for a particular mobile dashboard, you can search for it using the Search box above the
Mobile Menu.

4. To show or hide the sidebar, use the three line icon that displays in the top left corner.

5. The application's Home Page is provided with the live tile capable of showing dynamic content. Currently,
the interactive tile displays the Bing's image of the day. Customization of this tile is not supported.

6. The current company and site a user works with displays in the top-right corner of the Home Page. By
clicking on this information, the Change Company dialog displays.

A list of authorized companies for each user is maintained


through User Account Maintenance.

7. You can use the controls in the top-right corner to do the following:
• Submit your feedback on application usage to Epicor.
• Clear the application's server cache for the current user. Typically, use this option to see the newly added
dashboard or to display recent changes made to the Mobile Menu.
• Configure the Epicor Mobile Access application by using the available settings.
• Access the Application Help.
• Log out of the application.

10.2.700 1125
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

Launch Mobile Dashboard


To launch a dashboard, you can either select it from the mobile menu, or, you can create dashboard tile on the
Home Page.
To deploy a favorite dashboard tile:

1. In the Mobile Menu sidebar, locate the dashboard of your choice. In this example, click the star icon next
to the Customer Contact Update dashboard.

2. On the Home Page, a new dashboard tile is created. Access the dashboard by clicking on the tile.

3. When the dashboard loads, the content of the sidebar changes. It now presents queries and grids that make
up the query.

1126 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

4. If your dashboard is not configured to automatically refresh data, click the Refresh icon and select Reload
Data.

5. To navigate through dashboard views, you can use the navigation icons found in the top-right corner.

6. Another option is to access a views directly by selecting it in the sidebar on the left. In this example, the grid
that displays contacts for the selected customer is selected.

Filter Data
This topic explains how you can search and filter records in a mobile dashboard Grid View.

10.2.700 1127
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

On each grid, you can use the following filtering capabilities:

1. The built-in Search Panel provides an easy way of searching for data. By entering a string value, the search
is performed against all grid columns. As the result, the grid displays all rows that match criteria.

2. In this example, in the search box, type Chicago and hit Enter.

3. As the result, all customers from this city are displayed on the grid.

4. If you want to filter data in multiple columns at once, use multi-column filtering. To activate the feature,
click the Filter icon in the top-right corner.

1128 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

5. Above each column, a filtering box displays. For each column, you can use several conditional formatting
options. To switch between the available conditions, such as Equals (=) or Greater Than (>), click the
Condition button to the left of the filter box.

6. In this example, you would like to see all customers from the state of Illinois. In the State/Prov column filter
box, type IL and hit Enter. Data in the grid changes accordingly.

7. Now, you would like to extend your search by only seeing customers that are not on Credit Hold. Notice
this column is of the Boolean data type. To filter a column of this type, you use either "1/0" or "true/false".

10.2.700 1129
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

8. For this example, enter 0 and hit Enter.

9. As the result, all customers from the state of Illinois which are not on credit hold are returned on the grid.

1130 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

The above steps above discuss how you can filter data in a mobile dashboard's grid. Use this approach to quickly
locate the information you need.

Update Records Using Mobile Dashboard


Likewise in smart client dashboards, you can use mobile dashboards to perform database updates.

In order to edit records through mobile dashboards:


• A dashboard must use an updatable Business Activity Query
for the datasource.
• A dashboard's Grid or Tracker View must be configured to
allow data updates.

To update an existing record through a mobile grid:

1. In this example, an updatable grid that lists customer contacts for the customer Dalton is selected.

10.2.700 1131
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

2. Highlight an existing record you want to update, in this example, a record for Manny Kemple is selected.

3. To access a special mode that enables data updates, click the Enter record view mode icon found in the
top right corner.

4. Notice all required fields are marked with the star.

EMA provides user friendly data entry based on data types.


When you perform an update on any type of mobile
device, you are presented with a corresponding keyboard
specific to each data type. For example, for a date type
column, you are presented with the drop-down date
control. Similarly, for a numeric type of column, you are
presented with the numeric keyboard.

1132 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

5. Modify the record in any way. For example, change the Phone number.

6. Notice the Check icon in the top right corner. If an updatable grid does not support updating of multiple
records at once, selecting this icon saves the currently changed record directly to the database.
Since the Customer Contacts grid and the underlying BAQ allow updates of multiple rows at once, when
you select this icon, the record change is saved on a grid, allowing you to perform additional updates, if
needed.

7. Press the Next Record icon found in the top right corner to retrieve the record for Jerry Lanier.

8. Again, make the record change of your choice, for example, change the Title.

9. Click the Check icon again to save the record and then click X to close the Record View mode.

10.2.700 1133
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

10. Notice the visual indicators on the grid alert the user the records have been modified and are waiting to be
saved.

11. Click the Save icon to push the pending edits on this grid to the database.

12. If an updatable grid allows creation of new records, you can add new records using the plus icon in the
top-right corner. The remainder of the process is similar to updating records discussed above.
For more information on features available in Epicor Mobile Access v2, see the Application Help accessible
directly from the mobile application.

URL Query Phrase Subscribers

You can set up a dashboard with a URL view that uses a phrase subscriber with a replacement value, or token.
This token pulls a value from a publisher and substitutes it within the query phrase for the subscriber. As you
select records within a query view on a dashboard, this token updates with a value linked to the selected record.
The subscribing phrase then updates the URL view with the specific item linked to this record.

1134 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

Create New Dashboard

First, you create a new dashboard. To supply the part information, use the delivered zPartTracker01 query.
To create a new dashboard:

1. Click the Down Arrow next to the New button and select New Dashboard.

2. Enter a Definition ID. In this example, enter URLSubscriber.

10.2.700 1135
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

3. For the dashboard Caption, enter URL Subscriber. This field defines the name of the dashboard menu
item when deployed as the smart client application and defines the name of the dashboard tile placed on
the EMA site when the dashboard is targeted for use on a mobile device.

4. Enter a Description for the new dashboard.

5. To define the query for the dashboard, click the Down Arrow next to the New button; select New Query.

6. The Dashboard Query Properties window displays.

7. In the Query ID field, enter zPartTracker01.

8. Navigate to the Publish sheet.

9. To publish all the part records, select the Part_PartNum check box.

10. Click OK.


You return to the dashboard.

1136 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

Create URL View

For this example, you will create a URL query phrase that links a part record to a specific image file. This image
file then displays within the dashboard. In order for this token to work correctly, you must have a series of graphic
files saved on your workstation or in another location your Epicor application can access.
To add the URL view:

1. From the New menu, select New URL/XSLT View.

2. The Dashboard URL/XSLT Properties window displays.

10.2.700 1137
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

3. Enter a Caption for the URL view. In this example, enter My Part Image.

4. Now enter the URL/XSLT Address you need. Since your images are stored on your hard drive, you can click
the Ellipsis button to find and select the location. You can also enter the path directly. In this example,
you enter: C:\DL\zone\[MyPart].png
Notice you create a token in this address path. The [MyPart].png indicates this is a value you will update
from your publishing query. In this case, you want to update this value with the Part Number value, as all
of your graphic files within your image library use the Part Number value to identify each graphic file.

5. Define the query phrase subscriber. For this example, you need to create a subscriber that captures the Part
Number value from the publishing query and updates the subscribing token value. Navigate to the Query
Phrase Subscribers grid.

6. Click New.

7. Click the Publisher list and select the published field you defined on the query view. For this example, select
the Part_PartNum field.

8. Enter the Token this publisher will update. In this example, enter [MyPart].

9. Click OK.
You can now see this query phrase subscriber in action.

10. Navigate to the Dashboard sheet.

1138 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

11. Select a part record from the query view.

12. Notice the part image displays within the URL view.

13. Select another part on the query view.

10.2.700 1139
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

14. Notice a new part image displays within the URL pane.

Epicor SharePoint Publisher

Use the Epicor SharePoint Publisher functionality to display dashboards in the Microsoft® SharePoint® environment.
You leverage web dashboards to create SharePoint web parts that directly link to business activity queries (BAQs).
Web parts are integrated sets of controls for creating web sites you can use to directly modify, within a web
browser, the content, appearance, and behavior of web pages. All dashboard web parts directly access the Epicor
application server, so no web services or other intermediate layers are required to run web dashboards.
SharePoint web parts contain nearly the same functionality as Epicor dashboards. The data initially pulled into
the dashboard can be refreshed as needed. The Grid views contain both Order By and Group By functionality.
Web dashboards support publish and subscribe between views, so data within a grid view can update data with
a linked chart view. Web dashboards also link to the Performance Canvas for embedded Epicor EPM functionality.

® ®
To use ESP, Microsoft SharePoint 2007, 2010, or 2013
(preferred) must be installed and operational in your
environment. To create a link between the Epicor application
and Microsoft SharePoint, Epicor SharePoint Publisher must be
installed on the server.

The following sections describe how to create and modify a web dashboard on a Microsoft SharePoint 2013 site.

1140 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

Create a New Web Part Page


To create a web part page:

1. Navigate to the Microsoft SharePoint website; for example: http://<server name>/default.aspx.

2. Click Site Contents.

3. Click Site Pages.

10.2.700 1141
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

4. From the Files menu, select New Document and then Web Part Page.

5. Enter the Name of your dashboard.

1142 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

6. In the Choose a Layout Template box, select an appropriate template for the new web page. In this
example, add five web parts using the Header, Footer, 3 columns template.

7. Select the Document Library where you want to save the Web Part Page.

8. Click the Create button.


The Web Part Page displays in Edit Mode.

Modify a Web Page


This section includes several features available for modifying a web page.
To modify a web page:

1. Based on the template you select, navigate to a section of the dashboard you want to modify and click Add
a Web Part.

2. From the Categories list, select Miscellaneous.

10.2.700 1143
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

3. From the Web Parts list, select a view type. You can select the following dashboard web parts to display
on a web page:
• Epicor Publisher Chart View – Chart Views display query results through graphs and charts. Use this
graphical tool to quickly display and understand large quantities of data directly on a web dashboard.
• Epicor Publisher Gauge View - Gauge graphic acts as a visual indicator that updates, when selected
data changes within the query it monitors.
• Epicor Publisher Grid View – A grid view is the default view for every query you add to a dashboard.
Use this view to utilize a single-click dashboard deployment. This process is discussed later in this chapter.
• Epicor Publisher Top Navigator (Dashboard Browse) - While creating a dashboard in a smart client,
use the Dashboard Browse functionality to add a standard search button and a Navigation toolbar to
the current dashboard. You may use the same option on a web dashboard by selecting this web part.
• Epicor Publisher Tracker View – In dashboards, Tracker Views are primarily used to create an Advanced
Search. In a smart client, you have the possibility to customize the interface of a Tracker View. Epicor
SharePoint Publisher supports displaying of customized Tracker Views, so any modification you create
in a smart client will also display in a SharePoint environment.
• Epicor Publisher URL/XSLT View – Use this web part to display a website or an XSLT Style sheet on a
web dashboard.

4. From the Add part to drop-down list, select a section where the selected web part is placed.

1144 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

5. After you select the view you want, click Add.


In this example, Sharepoint Publisher Grid View is selected.

6. The No dashboard selected, please setup webpart message displays.

You are now ready to set up the web part.

7. The Sharepoint Publisher Grid View window displays at the top of the web part page. The following
example shows you how to set up a grid view. These same steps apply to all other dashboard view types.

All Web Parts share a common set of properties that


control their appearance, layout, and advanced
characteristics. For more information on SharePoint
settings, review your SharePoint documentation.

8. In the ICE 3 Server field, verify and, if needed, update your application server address and port number.
If you do not know this information, contact your System Administrator.

9. If you want, select the Enable «Single Sign-On» check box. Single Sign-On (SSO) functionality simplifies
logging in to the web dashboard. When this property is active, a user only needs to log in to the application
once; this user can then access all the available functions without having to log into each one of them.

10. Optionally, select the Require credentials check box to ask a user for credentials once a new session is
opened.

10.2.700 1145
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

11. In the EPICOR Login / Password fields, enter the appropriate credentials. These values are used to launch
the Epicor application. If the Single Sign-On feature is enabled, these fields do not display.

12. Click Apply.

13. Select a Current company.

In this example, select Epicor Education.

14. From the Dashboard to display drop-down list, select a dashboard. In this example, select
ABC_CustContUpdate.

15. Click Apply.

16. The available dashboard views display below the selected query. Select the check box next to the view you
want to display on your web dashboard.

1146 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

17. When you finish setting up a web part, click OK.

Arrange Views Within the SharePoint Page


In the above example, five dashboard views were added to the header section of the new Sharepoint page. Use
the single click dashboard deployment to load all available views at once and use the drag and drop functionality
to move the views into the appropriate sections within the page.
To arrange views within a web page:

1. Select the dashboard view you want to move.

10.2.700 1147
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

In this example, move the Customer Contacts view from the Header section to the Left Column section
of the SharePoint page.

2. Use the drag and drop functionality to move the view to a different section.

1148 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

The Customer Contacts view now displays in the Left Column section.

Adjust the ESP Dashboard


To modify specific web part settings:

1. In the web part box, from the drop-down list in the top right corner, select Edit Web Part.

10.2.700 1149
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

The Web Part Setup window displays.

2. If you want to use the paging functionality, expand the Grid settings node. In many situations, the paging
feature improves performance. This functionality stores result sets, or pages, in a temporary directory on
the server. You define how many records are included in each page. After the cached pages are stored in
this directory, the data request process can then move through each page instead of processing all of this
information at once.

1150 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

3. To activate this functionality, select the Use paged render of grid check box. Enter how many Records
per page you want to store on the server. This value defines how many records are saved together in one
page (result set).

When you group records in a grid, the paging feature is


not available for use.

4. You can also control if data displays in a grid on startup using the Fill grid with data on initial
render option. When you add a grid that contains a lot of data, disable this option and use the filter to only
display data you need.

5. You can also manipulate the appearance of the grid by using several Grid Skins.

6. If you want to group related records through a specific column, click More Settings and select the field
you want to use within the Group results by field.

10.2.700 1151
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

Web dashboards also display summarized data, but you


can only activate these properties within the smart client.
The summarized data will then display within the web
dashboard. Any changes made in the smart client
automatically update and display within the web (or web
client) dashboard.

7. When you finish setting up a web part, click OK.


Repeat these steps to continue adding other web parts to your web page template.

8. In the top left corner, click Stop Editing to switch to a standard view.

Web Dasher
Use the Web Dasher utility to manipulate SharePoint web parts. Leverage this tool to re-target web parts to a
different server or port or to change user credentials and so on. This tool is included as part of the Epicor SharePoint
Publisher installation.

1. From the Start menu, select All Programs > Epicor Software > Epicor Administrative Tools.

1152 10.2.700
Epicor ICE 3.2 Tools User Guide Dashboard Utilities | Chapter 10

The Web Dasher window displays.

2. In the Sharepoint field, enter your Microsoft SharePoint website address. For example:
http://<yourservername>:<your port number>

10.2.700 1153
Chapter 10 | Dashboard Utilities Epicor ICE 3.2 Tools User Guide

3. To establish a connection to the server, click the Connect button.

4. Notice the Tree View displays all available pages within the Epicor Publisher web parts. Use the Tree View
to select pages or web parts you want to modify.

5. If you need to change the application server name, select the check box next to the App Server field.

While you change these settings, select the check box


next to the field. If you make a change but do not select
the appropriate check box, the settings you changed for
this field will not be applied.

6. Select the Binding you need.

7. If you want to change the Company assigned to the web part, enter a different company in this field.

8. To always require credentials when accessing a page or specific web part, select the Require
credentials check box.

9. You can also modify the Login / Password required to launch this web part.

10. If you need to change the Epicor Web Access (EWA) address, enter a new value in the EWA field.

11. When you finish, click the Change settings button.

1154 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

Chapter 11: Updatable Dashboards

Through this updatable dashboard feature set, you create customized views of the data that users can then update
through a dashboard. Updatable dashboards are useful when you need to update a subset of data on multiple records
at the same time for items such as customer contacts, MRP parameters, discount percentages, and so on. When you
use an updatable dashboard for these targeted data entry tasks, you avoid opening these records individually through
the base entry forms.
To use this functionality, the first item you create is an updatable BAQ. You set up this BAQ in the same way as described
in the Business Activity Query chapter by linking tables, creating subqueries, adding filters, and calculated fields. You
then activate the updatable functionality and link this query to an UpdateExt business object method. Users can then
update the database through this BAQ.
You can place updatable BAQs on smart client dashboards, Epicor web access dashboards, and SharePoint dashboard
web parts. After you add these dashboards to the Menu, they become custom data entry programs users can launch
to both review current data and make any updates they need. Optionally, you can also use updatable BAQs on mobile
device dashboards. Once you create a mobile dashboard that contains an updatable BAQ, users run this custom entry
program on an iPhone or other supported mobile device. Users enter data through the mobile device, directly updating
the database wherever they may be. In order to build mobile device dashboards, you must purchase a mobile device
dashboard license from Epicor.
To complete this functionality, you can monitor the data users enter by creating updatable BAQ Business Process
Management (BPM) directives. As users enter data through an updatable BAQ, you can set up Updatable BAQ methods
that validate whether the data entered is correct, send email alerts, or cause other processes to run.

Assign Updatable BAQ Rights

Although you can access most BAQ functionality, to create and modify updatable BAQs you must have both
Advanced BAQ and Advanced BPM rights. Because the updatable business activity queries run through BPM
methods, you need to use these advanced features. You activate advanced BAQ and BPM rights on your account
within User Account Maintenance.
To assign updatable BAQ rights to a user account:

1. Navigate to User Account Security Maintenance.


Menu Path: System Setup > Security Maintenance > User Account Security Maintenance

10.2.700 1155
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

2. Use the Detail sheet to find and select the user record you need.

3. Navigate to the Options sheet.

4. Select the BPM Advanced User check box.

5. Select the BAQ Advanced User check box.

6. Click Save.

This user account can now access the updatable BAQ features. The next time you log into the application through
this user account, you can use the Update sheets within the Business Activity Query Designer.

1156 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

Updatable Business Activity Queries

You create updatable BAQs in a similar way to display only BAQs by adding tables, filter criteria, display columns,
and so on. However, you have some extra steps, as you need to define which table contains the updatable fields
and you need to make sure the business object methods are correctly linked to the updatable fields.
Just like a display only BAQ, you can link multiple tables in parent-child relationships. Multiple tables accessed
by each BAQ can be updatable, so you can construct updatable BAQs that modify multiple tables at the same
time. The only limitation is each updatable BAQ can only use one business object. However, because multiple
updatable table combinations are possible, you can create an updatable BAQ that matches your business
requirement.
The following sections explain how to create a simple updatable BAQ. The following Customer Contact Updatable
BAQ section then describes a more complex updatable BAQ.

Define an Updatable BAQ

During this example, you will create an updatable BAQ using the Customer table.
Navigate to the Business Activity Query Designer.
Menu Path: System Management > Business Activity Queries > Business Activity Query

This program is not available in Epicor Web Access.

You first indicate that a BAQ is updatable through the General sheet.

1. Click the New button.

2. In the Query ID field, enter a value. For this example, you enter CustomerQuery.
After you click out of this field, it becomes read only and you can no longer modify this ID value.

3. In the Description field, enter a concise explanation for the query. For this example, you enter Customer
Query.

10.2.700 1157
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

4. Select the Shared check box. This check box indicates this query is available to all users. After the query is
saved, all users within your company are able to add this query to their dashboards (if they have Dashboard
Developer privileges).

5. Select the Updatable check box. This activates the sheets under the Update tab. Use these sheets to indicate
the fields you will activate for data entry on each selected BAQ table.

6. Do not select the Global check box. Updatable BAQs cannot be used through the Multi-Site functionality,
as the business object methods required to update and add new records through the BAQ are database
specific.

Set Up the Updatable Query

Just like display-only BAQs, you next define the tables, relationships, filter criteria, and display columns your
updatable BAQ will use. In order to continue the Customer table example, this section briefly describes the set
up you need to do in order to complete the query functions.
To define the query table:

1. Navigate to the Query Builder > Phrase Build sheet.

2. Use the Filtering field to locate the table you want. For this example, you enter “Custo” to find the
Erp.Customer table.

3. Double-click the Customer table option.

4. The table displays on the designer area. If you were creating a more complex BAQ, you would repeat these
steps to add more tables.

1158 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

5. Likewise, you would use the Table List, Table Relations, Table Criteria, SubQuery Criteria, and Function
Call Parameters sheets to further define the data you want to pull from the database through your query.
For information on these sheets, review the Business Activity Queries chapter.

6. Navigate to the Display Fields > Column Select sheet.

7. In the Available Columns list, select the fields you want to display on the updatable BAQ.
For this BAQ, you select the following columns:
• Customer_CustID
• Customer_Name
• Customer_Address1
• Customer_Address2
• Customer_Address3
• Customer_City
• Customer_State
• Customer_Zip
• Customer_Country
• Customer_TerritoryID
• Customer_CustURL

8. Click the Right Arrow button.

9. The fields move into the Display Column(s) list. You will later indicate which of these fields are updatable.

10.2.700 1159
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

General Properties

You can now begin defining the main options for your updatable query. Use the controls on the Update > General
Properties sheet to indicate how users can enter and edit records through the updatable BAQ. You also indicate
which fields are available for data entry.

Primary Updatable Properties

To define the main updatable BAQ properties:

1. Navigate to the Update > General Properties sheet.

2. Select the Allow New Record check box to indicate users can add new records through this updatable
BAQ. In this example, the check box is selected, which indicates users can enter new customer records
through this BAQ. When this check box is clear, users will only be able to update existing records.

3. If you wish, enter a Label for AddNew value. This value defines what displays in the drop-down menu
next to the New button on the Standard toolbar when the updatable query is added to the dashboard.
The text you enter here displays as a node on this drop-down menu. Be sure it identifies the purpose of the
new record the users will create through this updatable BAQ.

4. Select the Allow Multiple Row Update check box to give users the ability to make changes to two or
more rows in a table before the data is saved. If this check box is clear, the row data updates automatically
when the user changes to the next row.

5. To make Actions menu options available for use within an Updatable BAQ directive using the BPM
functionality, you need to create action placeholders. You later create updatable BAQ directives using the

1160 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

BPM functionality for the RunCustomActions method that references the Actions menu options you create.
Click the Define Custom Actions button.

You can also launch the this window from the Actions
menu by clicking Actions > Define Custom Action.

6. The Define Custom Action window displays.

7. To create a new action, click the New button.

8. Enter an ActionID. This identifier defines the custom action within the updatable BAQ.

9. Enter an ActionLabel. This value defines how the option displays on the Actions menu within the dashboard.

10. If you wish to remove a custom action, click the Delete button.

11. Continue to add the custom actions you need. When you finish, click OK.

The custom actions you add through this functionality are placeholders you can then leverage within the Updatable
BAQ Method Directives program. You use this program to create conditions that monitor these custom actions.
When a user enters data which matches the condition, the condition runs the specific actions linked to it, like
validating data or displaying an informational message.

Define Updatable Fields

Next, you use the Update > General Properties sheet to indicate which Display Column fields the users can update.
You can also create or select default values that automatically populate a field.

1. To indicate all of the selected columns are available for data entry, click the Check All Fields as Updatable
button.

10.2.700 1161
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

2. The Updatable check box is automatically selected on each field. Users can then enter data within this
specific field; this new data is then saved to the database. To prevent users from entering data in a specific
field, click its Updatable check box.

3. The Alias field displays the specific <Table Name>_<Field Name> for each displayed column within your
updatable BAQ.

1162 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

4. The DataType field indicates the kind of data contained within the specific field. Available types:
• nvarchar – Alphanumeric letters and numbers
• int – Whole numbers only
• decimal – Numbers which also contain decimal places
• date – Date (month, day, year) values only
• datetime – A date value that also includes the time
• bit – Defines a True/False value; on the interface, logical fields appear as check boxes or radio buttons
• uniqueidentifier – Contains an identifier value for a record.

5. To make a field required, select its Is Required check box. This indicates the field cannot be empty. When
users attempt to save a new or existing record within the query and this field is blank, they are not able to
save the record until they enter a value in this field.

6. You cannot update a field if its IsReadOnly property is selected within the table. This check box displays
for your information and cannot be modified. If this check box is selected, users cannot change the data
that appears in this column.

7. Use the Initial Expression field to enter a text value that displays in the field before users actually enter
data into it. Use this feature to place some instructional text in the field to help the user understand what
information is required for this field. For this example, you select the Customer_CustURL field and place
"Enter Customer Website" in this column.

8. If you want to create a calculation to determine the initial expression, click the Column Initial
Expression button. This launches a window similar to the Calculated Field window; use the controls on
this window to create a formula that generates the initial expression you need for a specific field.

10.2.700 1163
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

Updatable Field Editor

You can also define specific acceptable values that will be available in a specific field.

1. To do this, click the Advanced Column Editor Configuration... button.

2. The Updatable Field Editor window displays.

1164 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

3. Use the tree view to select an updatable field for which you want to define values. In this example, you
select the Customer_State field.

4. Select the Data Type you want for the field.

5. The default Format for this Data Type appears. If you need, you can edit this value. Be sure the format
follows the convention of the database. You can review sample format values within the Data Dictionary.

6. If this field is required in order for the BAQ to pull in query results, select the Mandatory check box.

7. Use the Editor Type drop-down list to define the editor control the user will have for entering data within
the updatable field. Available options:
• Common Editor – Activates the Default Value field. Enter a custom text value you need for the field.
This text appears by default; users can then enter a different value in this field.
• Radio Button Set – Causes the Values Editor to appear. Use this sheet to define the various radio
button options this field will use. Users can then select a radio button option from the values you define
in this window.
• DropDown List – Activates the Data from drop-down list. Use this list to define the source of the
drop-down list options. The field then displays options contained on the drop-down list.

8. If you select the Common Editor option from the Editor Type drop-down list, the Editor Default field
activates. Enter the default value you want within this field. When you use this updatable BAQ in a dashboard,
this value is used to perform field level validation either before changes to a field are saved to the database
or after updates to the field are changed and returned for display on the interface.

9. If you want this field to generate a Business Process Management (BPM) method, select the Raise
Events check box. When you complete your updatable BAQ on the Update Processing sheet, you can see

10.2.700 1165
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

these new methods within the Updatable BAQ Method Directives window. On the finished Dashboard
assembly, this will be used to perform field level validation before proposed changes to the field are committed
or to perform additional updates after the field value has changed.

10. If you want the field to have access to a quick search for finding and selecting data entry values, click the
Quick Search button to locate the quick search you need. You create quick searches through Quick Search
Maintenance; these configurable search programs display input criteria to use for a search, display search
result fields, and returns the data from the specific field you define. For more information on quick searches,
review the Quick Search section within the Searches chapter.

11. If you select the DropDown List option from the Editor Type drop-down list, the Data from field activates.
Use the options from this drop-down list to indicate the source from which the data on this list populates.
Available options:
• Custom Values – Causes the Values Editor to display controls for creating a new list of values. Use this
functionality to define the various list options this drop-down list will use. You add these values using
the Values Editor pane.
• BAQ – Causes the Values Editor to display controls for selecting a BAQ. Click the Query ID button to
find and select the BAQ you need. Next define the Display Column and the Value Column you will
use from the selected BAQ. The Value Column defines the name of the column you wish to use for the
drop-down list; the Display Column indicates the value that displays when users click this list.
• User Codes – Causes the Values Editor to display controls for selecting a specific User Code. User codes
are lists of custom values you define through User Defined Code Maintenance. When you select a
user code, the drop-down list populates with values contained within the custom user code record. For
more information about creating user codes, review the Epicor ICE User Experience and Customization
Guide. The Customization Utilities describes how you create user codes.

12. If you select DropDown List as the Editor Type, you add these values on the Values Editor pane. Click New.

13. Enter a value in the grid. Continue to click New and add the values you need.

14. To remove a value, highlight it on the grid and click the Delete button.

15. Continue creating values for all of the updatable fields you need. When you finish, click Save.

16. To exit this window, click Close.

Update Processing

To complete the updatable BAQ, you set up how the BAQ interacts with a business object's methods. Business
objects contain the code that calls a database, sending current data to a custom dashboard for display, or
populating the database with new data.
A business object (also called a BO) houses the methods used to enter, view, and calculate data for a specific
function within an application. Each process a business object can run is called a method; by default, each
updatable BAQ contains at least the following methods:
• GetList – This method pulls in the existing records from the database table with which the business object
interacts. These records then display within the query results.
• GetNew – This method generates a new record and adds it to the database table. If users enter new records
with your updatable BAQ, they activate this method. A new, blank row is created within the updatable table,
and the user populates the fields linked to this row with data.
• Update – This method saves the information to the database with the information a user entered in the
updatable BAQ. When you test your updatable BAQ by modifying existing data, this method runs when you

1166 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

click the Update button. When the updatable BAQ is embedded within a dashboard, this method runs when
the user enters new data and clicks the Save button.
Depending on what other update options you selected on the Update > General Properties sheet, additional
methods may be available for your updatable BAQ.
For your updatable BAQ to work properly, these methods must be set up to interact with the fields you designated
as updatable. You use the controls on the Update > Update Processing sheet to set up this database interaction.

Advanced BPM Processing

Each of these methods can be monitored through Business Process Management (BPM) directives. These directives
can evaluate the data passed into or out of the database, interrupting the processing when certain conditions
you define are met. Various actions, again which you define, then automatically run in response to the condition.
You create these Updatable BAQ method directives from within the Business Activity Query Designer.
To use the Advanced BPM processing functionality:

1. Navigate to the Update > Update Processing sheet.

2. Select the Advanced BPM Update only check box to indicate you want to control the updatable BAQ
through one or more method directives.

3. Click the BPM Directives Configuration... button.

You can also launch the Updatable BAQ Method Directives


window from the Actions menu. To do this, from the
Actions menu, select Customize method.

10.2.700 1167
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

4. The Updatable BAQ Method Directives window appears.

5. All of the available Updatable BAQ Method Directives display. Notice in addition to the default directives
(GetList, GetNew, Update), the RunCustomAction method or FieldValidate and FieldUpdate methods you
selected for fields that raise events also display.

6. You can create three types of method directives. Pre-processing directives evaluate data before it is saved
to the database. Use pre-processing directives for validation and other tasks you want to run before the
data updates your database.

7. Base Processing directives substitute the normal operation of the business object with custom code you
create. Epicor recommends you never create base processing directives; only create base processing directives
with your consultant or directly through Epicor. If your base processing directive does not work, you will
potentially harm the operating functions of your application.

8. Post-processing directives evaluate data saved to the database, but is now in the process of being returned
to the interface for display. Use post-processing directives when you want to generate an event based on
the data recently recorded to the database.

9. When you finish creating your updatable BAQ method directives, click Close.

You will create Updatable BAQ method directives later in this chapter.

Update Processing

You mainly use the controls on the Update Processing sheet to set up the methods for the updatable BAQ. The
options you select on this sheet generate the expressions required for users to enter data within the updatable
fields.
To generate the expressions on your current BAQ:

1. Select the BPM Update radio button option.

1168 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

2. The BPM Update Processing section activates; click the Business Object button.

3. The Select Business Object window displays. The business objects for the tables on the current BAQ display
by default in this window.

4. From the Suggested business objects list, select the business object you want. For this example, you select
the ERP.Customer option.

5. The Update Method indicates the method used to enter the changes made through the updatable BAQ
to your database. By default, the UpdateExt method displays, which is the update method used to confirm
data is successfully updated through the query.

6. If you need, you can select a different business object by clicking the Select Business Object button.

7. When you have selected the business object you want, click OK.

8. Notice the Tables to update list. This list displays the dataset tables that fill with data before this information
is saved to your database. By default, the main dataset table is selected; if you need, however, you can select
a different table.

10.2.700 1169
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

9. The Query to Object Column Mapping grid displays how the updatable fields link, or map, to the selected
temporary table. This temporary table uses a ttResult prefix and it contains the data entered through the
updatable BAQ in active memory until the data is saved to the database.

10. The Table and Field columns display the name of the dataset table and field connected to it.

11. The .Net Data Type field indicates the kind of data stored within this field, like SystemString, System.Int32,
and so on.

12. The Expression field displays the equation used to pull data from the updatable BAQ into the in-memory
dataset table. When the data is saved, the data is moved from the dataset table and recorded within your
database.

13. Now click the Object to Query Column Mapping tab to see the second part of the updatable query
transaction. This grid displays which in-memory dataset table columns are mapped to which database table
columns.

1170 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

14. If you wish to create these expressions manually, click the Expression Editor... button.

15. The Business Object Update Expression window displays. Notice this window is nearly identical to the
Calculated Field Editor window described in the Business Activity Query chapter.

10.2.700 1171
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

16. The dataset fields display within the tree view. Select the field that has the expression you want to update.

17. Use the Functions pane to change the expression using a function, operator, or BAQ constant. For more
information on these options, review the previous Calculated Fields tables.

18. When you finish, click the Close button.

19. After you finish making your changes, Save the query.

The BPM directives update with your changes. Your updatable BAQ is now ready to test.

By default, the UpdateExt method ignores zero values and


changes them to NULL values. If you need specific fields set to
zero, you can create a BPM method that checks for zero values
and then populates these values in desired database fields. For
more information, review the UpdateExt Method – Set Fields
to Zero topic in the Application Help.

1172 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

Analyze

The Analyze sheet contains the functionality you use to verify the updatable BAQ can pull data, update records,
and add new records. You can also use this sheet to test a custom Business Process Management (BPM) method
against the updatable BAQ.
After you verify the updatable BAQ can perform functions successfully, you are ready to place it on smart client
dashboards. Users can then enter and update the data they need through this query.

Update Existing Record

Do the following to verify you can update existing records through this updatable BAQ.

1. Click the Analyze tab.

2. You first need to test whether this updatable BAQ can pull in data from its table. Click the Get List button.

3. You are warned this operation may update data in the database. Click Yes.

4. The Query Results grid populates with data. In this example, customer records display in this grid. If you
created a BAQ method directive to run when the Get List method executes, this directive’s actions would
run as well.

10.2.700 1173
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

5. You can now test the BAQ to find out if you can update existing records. Double-click a row within the
Query Results grid.

6. The Fields window displays. Notice this window contains all of the fields you indicated were updatable on
the General Properties sheet.

1174 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

7. Enter a new value in one of the fields. In this example, you enter a website address in the Customer_CustURL
field.

8. This field was selected to raise BPM events within the Updatable field editor. Because of this, two additional
buttons are next to this field. Click the V button to perform the FieldValidate BAQ method directives described
for this Column.

9. The Updatable query operation window displays, indicating whether the Field Validate BAQ directive
returned a True result. Click OK.

10. Click the U button to perform the FieldUpdate BAQ method directives described for this Column.

11. Click OK to exit the Fields window.

12. The record you updated is now highlighted within the Query Results sheet.

10.2.700 1175
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

13. To save this change to the database, click the Update button.

14. Once again, you are warned this operation may update the database; click Yes to close this window.

15. The data displays within the grid. In this example, the customer’s website displays in the Website column.

1176 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

Add New Record

Now test to see if you can add new records to this updatable BAQ.

1. Click the Get New button.

10.2.700 1177
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

2. Once again, you are warned this operation may update the database; click Yes to close this window.

3. A blank row displays on the Query Results list. Double-click this row.

1178 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

4. The Fields window displays again, but this time all of the fields are blank.

5. Enter the values you need to create a new record. For this example, you enter the main items needed on a
customer record.

6. Click OK.

7. Your new record appears on the last row of the Query Results grid.

10.2.700 1179
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

8. The last function you can test is a BAQ method directive linked to a custom action. If you created custom
actions for the updatable query and then used the Updatable BAQ Method Directives program to set up
conditions linked to this action, you can test this directive. To do this, first select the custom action you want
from the drop-down list.

9. Click the Run Custom button. If the updatable BAQ directive is set up correctly, the Business Process
Management (BPM) condition and its subsequent actions run as expected. You will review creating updatable
BAQ directives later in this chapter.

Customer Contact Updatable BAQ

Users can enter new customer contacts directly into the database through this updatable BAQ. These contacts
are then linked to a selected customer record. During this case study, you link the related customer, contact,
role, and ship to location tables together. You then indicate only fields within the Customer Contact table are
updatable by users.

Define the Query

To define the query:

1. Click the New button.

1180 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

2. In the Query ID field, enter UpdateCustContacts.

3. In the Description field, enter Customer Contacts.

4. Select the Shared check box to indicate other users within the current company can use this query.

5. Click the Updatable check box to indicate that users can enter data through this BAQ.

Add the Tables

Now add the tables you need for this updatable BAQ.

1. Navigate to the Query Builder > Phrase Build tab.

10.2.700 1181
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

2. In the Filtering field, enter Cust.

3. Double-click the Erp.CustCnt table.

4. The Erp.CustCnt table displays on the design area.

5. Now double-click the Erp.Customer table.

1182 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

6. The Erp.Customer table displays on the design area. Because these tables share a logical link, a connection
line displays between these tables.

7. Clear the value in the Filtering field and enter Role.

10.2.700 1183
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

8. Double-click the Erp.RoleCd table.

9. The Erp.RoleCd table displays on the design area.

Because th RoleCd table is not logically linked to the other tables, you must manually link this table to another
table.

Link the Role Code Table

Do the following to link the Role Code table to the updatable BAQ.

1. Click the Add Connection button.

1184 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

2. Click the RoleCd table and drag the link to the CustCnt table.

3. Complete the link by clicking the Table Relations tab.

4. Click the New button above the Table Relations sheet.

5. From the RoleCd field or any expression drop-down list, select the Company option.

6. From the CustCnt field or any expression drop-down list, select the Company option.

7. You want to display all of the customer contacts who are not assigned to a role code. Because of this, you
click the Join Type drop-down list and select the All rows from CustCnt and RoleCd option.
Now all of the contact records display in your query, regardless of whether they are linked to a role code.

8. To complete the link, you need to have the role identifiers linked between the two tables. Click the
New button again.

10.2.700 1185
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

9. From the RoleCd field or any expression drop-down list, select the RoleCode option.

10. From the CustCnt field or any expression drop-down list, select the RoleCode option.

11. Click Save.

Add the Ship To Table


You next add the Ship To table to this updatable BAQ.

1. Now find and double-click the Erp.ShipTo table.

1186 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

2. The Erp.ShipTo table displays on the design area.

3. By default, the ShipTo table is a child table linked to the Customer table. You need to change this link so
that the CustCnt table becomes the parent table to the ShipTo table. Highlight the link between the Customer
and the Ship To tables.

4. Click the Delete button.

10.2.700 1187
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

5. A Delete Confirmation dialog box displays. Click Yes.

6. Click the Add Connection button.

1188 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

7. Click the ShipTo table and drag the link to the CustCnt table.

8. Once again, to complete the link, you need to set up the relationship between the two tables. For this
relationship, however, you want an Inner Join so that only contacts linked to Ship To locations display in
the query results. Click the Table Relations tab.

9. Three columns need to be linked between the Erp.CustCnt and Erp.ShipTo tables. Click the New button as
before.

10. From the ShipTo field or any expression and CustCnt field or any expression drop-down lists, select
the Company option.

11. Repeat these steps to add two more connections. Select the following values for each row:

ShipTo field or any expression CustCnt field or any expression


CustNum CustNum

10.2.700 1189
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

ShipTo field or any expression CustCnt field or any expression


ShipToNum ShipToNum

12. Click Save.

Select Columns for Display

Select the columns on both tables that you want to view in your results.

1. Click the Display > Column Select tab.

1190 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

2. Click the Sort columns alphabetically button.

3. Expand the CustCnt table node.

4. Move the following columns from the Available Columns area to the Display Column(s) area:
• CustCnt_CustNum
• CustCnt_NoContact
• CustCnt_LastName
• CustCnt_MiddleName
• CustCnt_Name
• CustCnt_ConNum
• CustCnt_ContactTitle
• CustCnt_EMailAddress
• CustCnt_PhoneNum
• CustCnt_FaxNum
• CustCnt_CellPhoneNum
• CustCnt_PagerNum
• CustCnt_HomeNum
• CustCnt_AltNum
• CustCnt_Address1
• CustCnt_City
• CustCnt_State

10.2.700 1191
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

• CustCnt_Country
• CustCnt_Company
• CustCnt_ShipToNum

5. Expand the ShipTo table node.

6. Move the following columns from the Available Columns list to the Display Column(s) list.
• ShipTo_Name
• ShipTo_Zip
• ShipTo_Company

7. Expand the RoleCd node.

1192 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

8. Now move the following columns from the Available Columns list to the Display Column(s) list.
• RoleCd_RoleDescription
• RoleCd_Company

9. Expand the Customer node.

10.2.700 1193
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

10. Move these columns to the Display Column(s) list.


• CustID
• Company

11. Click Save.

Indicate the Sort Order

Because these fields will pull in a lot of data, you need to organize it through some sorting selections.

1. Click the Display Fields > Sort Order tab.

1194 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

2. You will sort everything by columns within the CustCnt table. In the Tree View, expand the CustCnt node.

3. Now move the following columns from the Available Columns list to the Sort By list:
• CustCnt.Company
• CustCnt.LastName
• CustCnt.FirstName

4. Click Save.

Define the Updatable Fields

You next must indicate which fields can be updated through the BAQ. You can update as many of the selected
display columns and tables as you need.

1. Navigate to the Update > General Properties sheet. All of the fields you previously selected for display
on the Display > Column Select sheet appear on the grid on this sheet.

10.2.700 1195
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

2. To indicate users can enter new records through this BAQ, select the Allow New Record check box.

3. Enter the text you want to add for new records within the Label for AddNew field. This indicates that each
new record added through this BAQ will have a label attached to it. You then use this label to identify which
updatable BAQ was used to enter this record in the database. For this example, you enter Add Contact.

4. To give users the ability to modify multiple records before saving them, select the Allow Multiple Row
Update check box.

5. If you want users to update a specific field, select its Updatable check box. In this example, you select all
of the fields within the Customer Connect (CustCnt) table.

6. When you finish, click Save.

Activate Database Processing

To complete the updatable BAQ, you next set it up so the application can process the data users will enter through
the BAQ. You do this through either an advanced business process management (BPM) directive or directly

1196 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

through the existing BPM directives defined on the business object. For this example, you use the existing BPM
methods.

1. Navigate to the Update > Update Processing sheet.

2. Select the BPM Update radio button option.

3. Click the Business Object... button.

4. The Select Business Object window displays.

5. From the Suggested business objects list, select ERP.CustCnt.

6. Notice the value in the Update Method field. This field indicates the method used to enter data within the
updatable BAQ; typically this will be the UpdateExt method.

7. Click OK.

8. Notice the Tables to update list displays the CustCnt table.

10.2.700 1197
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

9. The Query to Object Column Mapping and the Object to Query Column Mapping sheets now populate
with the database processing information from the selected business object. In this example, the
Expression field displays the ttResult.CustCnt table columns; these values indicate when users enter values
within the updatable BAQ, these values first go to the ttResult.CustCnt in-memory dataset table before they
get saved within the database.

10. When you finish making the changes you need on this sheet, click Save.

The updatable BAQ updates, incorporating the BPM directives you have selected. You should now be able to
enter data through this query, so next you need to test it.

Test the Updatable BAQ

You are now ready to test the updatable BAQ to make sure it works.

1. Navigate to the Analyze sheet.

1198 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

2. Click the Get List button.

3. You are warned the BPM process will update the database; click Yes.

4. The Query Results grid displays the data pulled in through your query.

10.2.700 1199
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

5. You next need to see if you can edit an existing record. Double-click a row on the grid.

6. The Fields window displays.

1200 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

7. Either edit an existing value or enter a new value through this window. In this example, you enter a new
cell phone number for Lonnie Smith.

8. Click OK.

9. You return to the Analyze sheet. The new number appears in the Cell Phone column for Lonnie Smith. This
value is saved to the in-memory table (ttResult.CustCnt) you defined on the Update > Update Processing
sheet.

10.2.700 1201
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

10. To save this change to the database, click the Update button.

11. You are warned the BPM process will update the database; click Yes.

12. The data is now saved to the actual CustCnt table within the database. To test entering a new record, click
the Get New button.

1202 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

13. You are warned again the BPM process will update the database; click Yes.

14. A new row displays within the Query Results grid. Double-click the row.

10.2.700 1203
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

15. In the Fields window, enter the information you need for the new contact record.

16. Click OK.

17. The new record displays on the Query Results grid.

1204 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

18. As before, this data change is currently stored within the in-memory table (ttResult.CustCnt). To add this
record to the database, click the Update button.

19. You are warned the BPM process will update the database; click Yes.

The data is saved to the actual CustCnt table within the database.
Now that this updatable BAQ works correctly, you can use it on both smart client dashboards and mobile device
dashboards.

Regenerate Updatable BAQs

Database and software dataset schema changes can occur each time a service pack or a new version is installed
on your Epicor application. These changes can cause your updatable business activity queries to become out of
sync with the base environment. Your updatable BAQs will then not run.
To correct this issue, use Updatable Query Maintenance to regenerate your updatable BAQs. When you use this
maintenance tool, they become synchronized with the current version of the database and software and will run
as expected. As part of your upgrade process, always be sure to leverage this tool after each release or version
is installed on your Epicor application.
Menu Path: System Management > Upgrade/Mass Regeneration > Updatable BAQ Maintenance

1. Click the Query ID button to find and select the updatable BAQs you want to regenerate.

10.2.700 1205
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

2. The updatable queries you select display within the Tree View. Select the updatable BAQ you want to
review.

3. The fields on the Detail sheet display the primary information about the selected BAQ. These fields only
display for your information; you cannot change these values.

4. To regenerate the current updatable BAQ, from the Actions menu, select Regenerate Selected.

1206 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

5. To regenerate all of the updatable BAQs displayed in the Tree View, from the Actions menu, select
Regenerate All.

The updatable BAQs are now synchronized with the current level of the application.

Updatable Dashboards

The Updatable Dashboard is an extension to the standard dashboard feature. You can use this feature to create
updatable applications for use on a client installation or on a mobile device. When you configure a dashboard
to contain updatable BAQs, the dashboard becomes similar to a data entry program, so users can review, enter,
and update application data.
During this example, you will create a new dashboard using the updatable BAQ you created. This dashboard will
display customers and related contacts. On this dashboard, users first select a customer record, then create and
update contacts for the selected customer record.
You create new dashboards on the Dashboard program:
Menu Path: Executive Analysis > Business Activity Management > General Operations > Dashboard

This program is not available in Epicor Web Access.

10.2.700 1207
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

Create a Dashboard

Now that you have created your updatable Customer Contact query, you can place it on a dashboard.

1. Click the Down Arrow next to the New button; select New Dashboard.

2. In the Definition ID, enter a unique identifier for the dashboard. In this example, you enter
CustContactUpdate.

1208 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

3. Enter a Description for the dashboard. In this example, the description is Customer Contact Update.

Add Customer Query

The first query you add to the dashboard, zCustomer01, is a standard system query that displays customer
information.
To add a query to the dashboard:

1. Click the Down Arrow next to the New button; select New Query.

10.2.700 1209
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

2. The Dashboard Query Properties window displays.

1210 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

3. Click the Query ID button in to find and select the query.

4. Find and select the zCustomer01 query. This standard query displays primary customer information.

5. Select the Auto Refresh on Load check box. Now each time this dashboard launches, data will populate
this query.

6. Select the Publish sheet.

10.2.700 1211
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

7. Now in the Publish Column list, select the following columns:


• Customer_Company
• Customer_Name
• Customer_CustNum

8. In the Titlebar Subscriber section, select the Publish to Title check box.

9. Click the drop-down list and select Customer_Name.

10. In the Title caption field, enter Customer:.

11. The Call Context Subscriber section contains fields you can use with Business Process Management (BPM)
functionality. Use these fields to publish values from the dashboard to a Business Process Management
(BPM) Updatable BAQ Directive.

12. Click OK.

Modify Customer Grid Properties

1. Click the Refresh button to verify the query can retrieve customer information.

1212 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

2. This information displays in the zCustomer01: Summary grid.

3. In the Tree View, right-click the zCustomer01 icon and select Properties.

4. The Dashboard Grid Properties window displays.

10.2.700 1213
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

5. In the Caption field, enter Customer List.

6. Likewise in the Grid Caption field, enter Customer List.

7. Click OK.

8. The new grid caption displays in the Tree View.

1214 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

9. This caption also displays in the Grid Header.

Add Updatable Contact Query

1. Click the Down Arrow next to the New button; select New Query.

10.2.700 1215
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

2. The Dashboard Query Properties window displays.

1216 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

3. Click the Query ID button to find and select the UpdateCustContacts query.

4. Select the Filter sheet.

10.2.700 1217
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

5. In the ColumnName field, select CustCnt_Company.

6. In the Condition field, select the = (equal) value.

7. In the Value field, select zCustomer01-CustomerTrackerQuery: Customer_Company. By selecting this


value, the Contact query subscribes to the Customer Company published from the zCustomer01 query.

8. Click Enter to add another filter for Customer_CustNum.

1218 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

9. Click OK.

10. Select a customer is selected from the Customer List grid.

10.2.700 1219
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

11. The related contacts for that customer display in the Customer Contacts grid.

12. Click Save to record your changes to the dashboard.

Modify Contact Grid Properties

1. In the Tree View, right-click the UpdateCustContacts grid icon and select Properties.

2. The Dashboard Grid Properties window displays.

1220 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

3. In the Caption field, enter Customer Contacts.

4. Select the Updatable check box.

5. The Prompt check boxes display for each field; select the fields you want to be able to update in the
dashboard. In this example, select the Prompt check box for the following fields:
• CustCnt_NoContact
• CustCnt_LastName
• CustCnt_FirstName
• CustCnt_Name
• CustCnt_ContactTitle
• CustCnt_EmailAddress
• CustCnt_PhoneNum
• CustCnt_FaxNum
• CustCnt_Company
• CustCnt_ConNum

6. You can use the Arrow buttons to the right of the grid to reorder the columns in the Grid view.

7. Select the Updatability sheet. This sheet is only available when the grid view is selected as updatable.

10.2.700 1221
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

8. The Multi Dirty Row and Allow Add New check boxes are settings you defined within the Business Activity
Query Designer when you created the UpdateCustContacts query. These fields control whether you can
add or update multiple rows of data at one time.

9. Select the Force Update All Rows on Save check box when you want all unsaved or dirty, rows to update
the database at the same time. When users click Save, any modified or new records all move to the database
simultaneously. If this check box is clear, each dirty row is processed individually.

In some situations, selecting this check box can improve


performance, while in other situations it can slow
performance. If you are not sure whether you should
activate this feature, test the dashboard to discover if you
can process large amounts of data at the same time.
Performance times will vary based on the number of rows
and columns in the grid.

10. Select the Static Values on Add New check box to indicate how you want the updatable dashboard to
populate when users add a new record. If you select this check box, the updatable dashboard will pull in
field values for display; the next time the user creates a new record, these static values remain in the fields.
If this check box is clear, the current values are removed and the fields are refreshed with new values.

11. Use the Action Buttons sheet to define custom Actions which are available in the dashboard from the
Actions menu. Actions are defined in the Business Activity Query Designer and can be used along with BPM
Method Directives to run a specific method. You will review Updatable BAQ Directives later in this chapter.

1222 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

12. The Add New Subscribers sheet is used to define data that auto-populates when adding new records
through the dashboard. Use the fields on this sheet to define specific criteria that default into new rows
when you select Add New.

13. To add a new subscriber, click the New button.

14. When the user adds a contact, you want the subscriber to populate the contact's city from the city defined
on the customer record. For the Add New Subscriber column, you select CustCnt_City. You then indicate
you want to publish from the Customer Tracker Query, pulling the value from the Customer_City column.

15. Click OK.

Add Tracker View for Contact Query

Tracker Views can be used to create an advanced search function and to facilitate entry and updates to customer
contacts.

1. In the Tree View, right-click the UpdateCustContacts query icon and select New Tracker View.

10.2.700 1223
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

2. The Dashboard Tracker View Properties window displays.

1224 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

3. In the Caption field, enter Contact Details.

4. Select the Updatable check box.

5. Click the Clear All button to clear the Visible flag on all the fields.

6. Define which fields you want to display in the Tracker view. Select the Visible and Prompt check boxes for
the following fields:
• CustCnt_LastName
• CustCnt.Name
• CustCnt.EmailAddress
• CustCnt.PhoneNum
• CustCnt.FaxNum
• CustCnt.Company
• CustCnt.ConNum

7. Click OK.

8. The new Contact Details panel displays on the dashboard. Drag the sheet up and reposition it to the left
of the Customer Contacts grid.

9. Click Save.

Test Updatable Dashboard

To test an updatable dashboard:

1. From the Tools menu, select Deploy Dashboard.

10.2.700 1225
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

2. The Deploy Dashboard window displays.

3. Click the Test Application button.

1226 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

4. A new window displays the dashboard for testing. Click the Refresh button to retrieve the customers and
contacts.

5. Click a row in the Customer Contacts grid to update a contact record. You can update contact information
directly in the grid or in the Contact Details view. In this example, you enter an Email Address for customer
Clarke Construction, contact Richard Clarke.

6. Click Save.

7. Test adding a new contact record in the dashboard. Click the New button to add a new record.

10.2.700 1227
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

8. A new blank row is added to the Customer Contacts grid. Enter new contact information. In this example,
you enter a new contact record for Michael Rogan.

You can also enter contact information in the Contact


Details tracker view.

9. Click Save.

10. To verify the record is added, click Refresh and review the contacts for Clarke Construction.

11. Close the test dashboard.

12. Click Cancel in the Deploy Dashboard window to return to the Dashboard Designer.

1228 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

13. You can also verify the new contact record in Customer Maintenance.

10.2.700 1229
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

Updatable BAQ Method Directives

Updatable BAQ method directives are similar to method directives, but they apply to methods used specifically
by updatable BAQs.
Each updatable BAQ has the following methods:
• GetList – Retrieves the data specified by the query.
• GetNew – Creates an empty row where a new record can be entered and submitted to the database.
• RunCustomAction – Runs a custom BPM action you define through both the BAQ and BPM functionality.
You first define the ID of the custom action in the Business Activity Query Designer and then define the action
using one or more directives within Updatable BAQ Directives Maintenance.
• Update - Performs database updates, refreshing the data to include changed and added rows. By default,
Epicor database updates are perfomed using the BO's UpdateExt method.
• FieldUpdate - This method occurs after the user's change to a field is committed. You can use this method
to perform additional processing against the changed row. For example, when you enter a part number, you
want the part description field to populate automatically.
• FieldValidate - This method occurs before the proposed change to a field is committed. You can use this
method to validate proposed changes. For example, you can prevent users from entering an incorrect value
in a certain field such as non-existent state.
When you create an updatable BAQ, the application writes a base processing directive for the update method.
The directive uses C# code to update the database according to the settings defined in the Business Activity
Query Designer. You can edit this code to customize the update process, or you can add pre-processing, base
processing, and post-processing directives to the methods associated with the BAQ.

The same security settings for method directives apply to


updatable BAQ directives. You must be a BPM Advanced User
to create or modify base processing directives.

You launch the Updatable BAQ Method Directives program in multiple ways - click the BPM Directives
Configuration button on the Update > General Properties sheet within the Business Activity Query Designer, or
select this program from the Menu.
Menu Path: System Management > Business Process Management > Updatable BAQ Directives Maintenance

This program is not available in Epicor Web Access.

Custom Actions
You may create custom actions for updatable BAQs in the Business Activity Designer by defining the action ID
and label. The custom actions can then be added to the Actions menu of a dashboard that uses the query.
In Updatable BAQ Method Directives Maintenance, you create a pre-processing, base processing, or post-processing
directive for the RunCustomAction method. Use the “the specified argument is equal to the specified expression”
condition statement to identify which action to run. The first “specified” variable can be set to “actionID.” The
second “specified” variable can be set to the ID of the action called by the user as it was specified in the BAQ.
Then create directive actions to perform custom operations.

1230 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

Default Data to Updatable BAQ Records


You now will create an updatable BAQ directive that monitors the Customer Contact Update dashboard you
created. In this example, you want the directive to populate the contact’s address information with the customer’s
address information when the user creates a new contact within the Customer Contact Update dashboard.

Publish Dashboard Data

The first part of the process publishes the customer address information from the Customer Contact Update
dashboard.
With the dashboard in Developer mode, follow these steps to publish data to use it in a BPM directive:

1. In the Dashboard Tree View, select the zCustomer01:Customer Tracker Query query.

2. From the Edit menu, select Properties.

3. The Dashboard Query Properties program displays.

10.2.700 1231
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

4. Select the Publish sheet.

5. In the Publish Columns list, select the check boxes next to the following column names:
• Customer_Address1
• Customer_City
• Customer_State
• Customer_Country
• Customer_Zip

6. In the Call Context Subscriber grid, click New.

7. From the Publish Column, select Customer_Address1.

8. In the BPMDataColumn, select Character01.

9. Add the remaining address columns to the Call Context Subscriber grid using the following information:
• Customer_City = Character02
• Customer_State = Character03
• Customer_Country = Character04

1232 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

• Customer_Zip = Character05

10. Click OK.

Get the Updatable BAQ Methods

In this task, review the list of methods used by the updatable BAQ.
You get the updatable BAQ methods by launching Updatable BAQ Method Directives Maintenance.
Menu Path: System Management > Business Process Management > Updatable BAQ Directives Maintenance

This program is not available in Epicor Web Access.

To locate the methods:

1. Click the BAQ ID button to find and select a BAQ ID. You can also enter the BAQ ID directly. For this example,
you find and select the UpdateCustContacts updatable query.

10.2.700 1233
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

2. The Tree View displays the updatable BAQ methods.

3. The Detail sheet displays the primary information on the selected BAQ method.

You can review the C# code used by the BAQ to update the database by selecting the Update method in the
Tree View, navigating to the Base Processing tab, clicking the Design button, and reviewing the Default
Implementation action. Select the // <autogenerated> link and review the code in the Enter Custom Code window.

New Post-Processing Directive

You are now ready to add a directive to the updatable BAQ. In this example, the directive will default a new
contact’s address information when the user creates a new contact using the Update Customer Contact dashboard.
The directive uses the information published from the dashboard to set the values in newly added contact records.
To create a new directive:

1. In the Tree View of the Updatable BAQ Method Directives program, select the UpdateCust
Contacts.GetNew directive.

1234 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

2. Click the Down Arrow next to the New button; select New Post-Processing.

3. Enter the Directive Name that you use to identify the directive. In this example, enter Auto Populate Contact
Address.

4. Click the Design button.

Select BAQ Directive Action

Because you want this directive to run each time the GetNew method is called, it will not use any condition
statements. Instead you will just define an action for this directive.

1. The BPM Workflow Designer window displays.

10.2.700 1235
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

2. From the Setters group, click and drag the Set Field item to the designer area.

3. Click on the Start item to display its connection points.

4. Click and drag a connection line from the Start item to the Set Field item.

5. Select the Set Field item.

Notice the Action pane now displays the "Set the specified field of the changed row to the specified expression
with rule" statement.

Define BAQ Directive Action

You next define what occurs when this action is run.

1. Within the action statement, click the “specified” link.

1236 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

2. The Select Table Field(s) window displays.

3. Click the Table drop-down list to select ttResults.

4. In the Fields grid, select the check box next to CustCnt_Address1.

5. Click OK.

6. Click the changed row drop-down list and select the added row option.

10.2.700 1237
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

7. Now click the specified link.

1238 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

8. The Specify an expression dialog box displays.

9. In the Available variables tree view, expand the CallContextBpmData node.

10. Double-click Character01.

11. The Editor field displays ttCallContext BpmData.Character01.

12. Click OK.

The Action now states “set the Results.CustCnt_Address1 field of the added row to the ttCallContextBpmData…
expression with rule”. Now the action will set the Address field of a new row to the value published from the
dashboard to the Character01 field, which is the customer’s street address.

Add More Set Field Actions

In this task, populate the remaining fields published from the dashboard by adding more actions.

1. Continue to add new Set Field actions and connect them in the order they follow. Set the remaining address
columns to their respective BPM Call Context Subscriber fields, as specified in the Publish Dashboard Data
topic.

2. Click Save and Exit.

3. You return to the Updatable BAQ Method Directives window.

10.2.700 1239
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

4. The actions you created display in the Behavior field.

5. Select the Enabled check box.

6. Click Save.

Test the Directive

Verify the address information from the customer record is added to the contact's address fields.
Launch Customer Contact Update in the Dashboard program.
Menu Path: Executive Analysis > Business Activity Management > General Operations > Dashboard

This program is not available in Epicor Web Access.

To test the directive:

1. From the Tools menu, select Deploy Dashboard.

1240 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

2. The Deploy Dashboard window displays.

3. Access the dashboard in the testing mode by clicking the Test Application button.

4. The Customer Contact Update dashboard displays.

10.2.700 1241
Chapter 11 | Updatable Dashboards Epicor ICE 3.2 Tools User Guide

5. Click the Refresh button to retrieve the customer data.

6. In the Customer Tracker Query grid, select a customer record.

7. In the Customer Contacts grid, click a row.

8. Click New.

1242 10.2.700
Epicor ICE 3.2 Tools User Guide Updatable Dashboards | Chapter 11

9. A new row is added to the Customer Contacts grid. The address information from the customer record is
automatically added to the contact’s fields.

10.2.700 1243
Chapter 12 | Executive Dashboards Epicor ICE 3.2 Tools User Guide

Chapter 12: Executive Dashboards

Use the Executive Dashboard functionality to display real-time, complex views of data. You can use this toolset to create
virtual tables that combine, or aggregate, information for quick retrieval and display. For example, this functionality is
ideal for viewing sales first by month (a monthly bucket) and then by customer. You could create a Business Activity
Query (BAQ) that gathers every order detail record for each customer; this creates a single sum of the calculated revenue
– like 50. Through an executive dashboard, however, you can immediately display both the customer information and
the revenue by month. This information is retrieved significantly faster than through the standard BAQ functionality.
You do this by creating executive queries. You use these records to create virtual cube tables that consolidate the
information. Each cube table uses a dimension pair to both pull and then combine the data. You then display the
results in a dashboard. Using another example, you need to look at revenue from a project that includes both field
service sales and product sales. By using cube tables, you can populate an executive dashboard’s data by running both
queries, one after the other, to first consolidate and then view the final revenue numbers.
When you measure this data through executive queries, you can get a global representation of nearly every aspect of
your organization’s current business flow. This chapter walks you through how to create an executive dashboard and
then release it to your users. Note this chapter builds on previous tools explored in the Business Activity Queries,
Dashboards, and Dashboard Utilities chapters, and in the Automatic Data Processing chapter in the Implementation
User Guide. You may want to review these chapters before you begin.

ShopVision Module

If your company uses the ShopVision module, you already have several executive dashboards available for review.
Use this module to display strategic data required for critical short-term and long-term decision making. The data
displays in a dynamic graphic tool that allows you to sort, group, and view data in a variety of graphic formats,
such as a pie chart, bar chart, or line chart. Use the ShopVision dashboards as examples for building your own
executive dashboards.
The following is the list of available ShopVision dashboards along with suggested refresh intervals:

Dashboard Description Suggested


Refresh
Cash Flow Displays the weekly cash flow of a selected book. You can this Once a day
tracker to analyze where cash is moving; it divides the cash data
into different buckets like Open AR, Available Cash, Open Orders,
and so on.
Customer Shipping Displays aggregated shipping data through a series of dashboard Once a day
Performance views. Data is represented using color-coded graphs, charts, and
tables, and can be filtered by parameters such as customer, part,
site, and shipping method.
Site Performance Displays high-level summaries of data to enable executives to Once a day
monitor sites by different parameters, analyze performance, and
identify trends over various periods
Sales Order Backlog Monitors open orders by different parameters, such as customer Every four hours
Analysis and site, analyze performance, and identify trends over various
periods.

1244 10.2.700
Epicor ICE 3.2 Tools User Guide Executive Dashboards | Chapter 12

Dashboard Description Suggested


Refresh
Supplier Performance Displays high-level summaries of data to enable executives to Once a day
monitor supplier performance by different parameters such as
customer and site, analyze performance, and identify trends over
various periods.

How Executive Dashboards Work

Like most of the custom query tools within the application, the core data processing tool for an executive
dashboard is the Business Activity Query (BAQ). These queries can both pull specific data to view and run custom
calculations on the data before it displays. To learn how to create BAQs, review Chapter 4: Business Activity
Queries.
You create executive dashboards by using BAQs that populate the Ice.SysCube tables with data defined through
an additional query linked to the BAQ – the executive query. These executive queries read the aggregated (or
combined) data through multiple Field Maps that measure the data through two selected dimensions. You use
the Dimension IDs on each field map to display data on the dashboard.
Executive queries must be assigned to process sets you either schedule or manually run; the process set is a series
of tasks that execute when it is launched. If you automatically schedule the process set, you use the Schedule
Process Set program to link the process set to an automatic schedule. You create the automatic schedules your
application uses through System Agent Maintenance.
When the executive query runs, the executive dashboard updates its data to display current information.

For more information about refreshing data through a regular


schedule, review the Automatic Data Processing chapter
found in the Epicor Implementation User Guide.

This flow chart shows you the process that occurs within the application:

1. The Business Activity Query (BAQ) first pulls the data from the database (DB).

10.2.700 1245
Chapter 12 | Executive Dashboards Epicor ICE 3.2 Tools User Guide

2. The data is then processed through the Executive Query (EQuery). The query aggregates (combines) the
dimension data defined within its field mapping.

3. These dimension results are then saved to the database into the following tables:
• cube (Ice.SysCube)
• definition (Ice.SysCubeDef)
• dimension (Ice.SysCubeDim)

4. The dimension results are then queried using another BAQ. The results of the dimension data BAQ can be
used to filter against the current data. This data contains the values pulled when the last scheduled query
was run against the database. Note that if you do not run regular, frequently scheduled queries against this
database, however, it could result in out of date data results.

5. This second set of BAQs that pulls the results from the Ice.SysCube tables is used within the executive
dashboard. The final executive query data then populates the panels for display within the executive
dashboard.

Executive Dashboard Setup

Before you begin creating your own executive dashboards, you must first set up a schedule and a process set.
Then you create multiple Business Activity Queries. A minimum of five BAQs are required to both populate data
within the executive queries and then display this data on your executive dashboard. This section describes how
you create all of these base components.

Schedules
Recurring schedules are created through System Agent Maintenance. This program defines the system agent,
which is a file that controls all automatic transactions that occur throughout your Epicor application. Within the
system agent, you create schedules that occur during specific intervals – hours, days, weeks, or months.
You later link executive queries to an automatic schedule. The system agent monitors the system clock, activating
automatic schedules based on the current state of the clock. When the system agent activates a schedule, the
executive queries run.

1246 10.2.700
Epicor ICE 3.2 Tools User Guide Executive Dashboards | Chapter 12

In the example used in this chapter, the Daily Task Schedule is selected, indicating this executive query is run
once every work day. It may be set up as follows:

For more information on the system agent and its scheduling


functionality, review Automatic Data Processing in the
Implementation User Guide.

Process Set Maintenance


Use Process Set Maintenance to create process sets. Each process set launches automatic tasks – like executive
queries. You can also organize the order in which you want these automatic tasks to run within each process
set.
After you create a process set, you add other programs to this process set as an automatic task. You can use the
Executive Query program, for example, to add a selected executive query to a specific process set. Later, you can
launch Process Set Maintenance again to see all the tasks – in this case, executive queries – that automatically
run through this process set. You modify the sequence through which each task launches within the process set.
When you are satisfied with the assigned tasks and the order in which they launch, attach the process set to a
schedule through Schedule Process Set. This program is described later in this chapter.

Note that in order to create the executive dashboard described


in this chapter, you need to create a new process set; in this
example, name this process set Sales Order Backlog Status. For

10.2.700 1247
Chapter 12 | Executive Dashboards Epicor ICE 3.2 Tools User Guide

more information on creating process sets, review Automatic


Data Processing in the Implementation User Guide.

The Business Activity Query (BAQ)


Use the Business Activity Query program to both update existing BAQs and create custom BAQs. These queries
are the building blocks for your custom executive dashboard. Primarily, you define what data displays through
each BAQ on your executive dashboard. By using the Query Builder feature within each BAQ, you create an SQL
query statement that is run to gather the data needed on your executive query.
The multiple BAQs you create define how the data is aggregated on your executive dashboard, so spend some
time refining what they display and calculate. It is also possible to link multiple tables and subqueries through
joins between them, so nearly unlimited BAQ combinations are available. Moreover, by using the External BAQ
functionality, you can retrieve data from external data sources and display results on the executive dashboards.

Leveraging this functionality does require some fundamental


knowledge of database concepts such as table relationships,
records, and field types. This knowledge helps you create
queries that have good performance and display the results
you want. To learn how to fully create and refine a BAQ, refer
to Chapters: Business Activity Queries and External Business
Activity.

You need to create a minimum of five BAQs to populate data within an executive dashboard. The following is a
brief description of each BAQ you need and what it does:

1. BAQ Against Data Details – Defines the base BAQ used to pull the data from the database. This chapter
uses the SalesOrderBacklog query as an example for a base business activity query.

2. BAQ Against Data Dimensions – You run this BAQ to define the dimensions used against the data, like
Country, Salesperson, and so on. You set up this BAQ within the Create Dimension BAQ and Executive
Query section later in this chapter.

3. Dimension BAQ – This BAQ pulls the dimension data from the first executive query. You set up this BAQ
within the Dimension BAQ section later in this chapter.

4. Dimension Details BAQ – This BAQ defines the dimension options that users can select from the executive
dashboard. You learn how to create this BAQ within the Dimension Details BAQ section later in this
chapter.

1248 10.2.700
Epicor ICE 3.2 Tools User Guide Executive Dashboards | Chapter 12

5. Data BAQ – This BAQ pulls the data from the first executive query. It locates the Ice.SysCube data that then
displays on the executive dashboard. You review an example of this BAQ within the Data BAQ section later
in this chapter.

Executive Dashboard Creation

The primary task you must do before you create an executive dashboard is plan ahead. First, define what data
you want to aggregate and display. Then as you begin creating your executive dashboard, start from the basic
components and work your way forward up to the final executive dashboard display. This reduces development
time and helps you precisely display the data you want.

Create an Executive Dashboard - Overview


To create an executive dashboard, you follow these primary steps:

1. Create one BAQ to be the source for the main executive query. This defines the cube table data that displays
in the executive dashboard.

2. Define the executive query and the dimension pairs you need by using this source BAQ. Add this executive
query to a process set.

3. Create a second BAQ that gathers the dimension fields and data that is combined with data from the first
executive query.

4. Next, create a second executive query that aggregates the dimensions from this second BAQ; this gives you
a unique list of the dimension data. Add this second executive query to the process set.

5. Run this process set immediately to populate both executive query Ice.SysCube tables with data. You need
this data to complete the development process. Be sure to define the automatic schedule during which you
want this process set to run.

6. Create the BAQs you need to display the executive query information on the dashboard. You create at least
three BAQs – one for the main Ice.SysCube data, another for the dimension IDs (field names), and a third
for the dimension details.

7. Create a new dashboard definition.

8. Add the queries, grid views, and chart views that display these BAQs on the new dashboard.

9. Deploy the dashboard onto the Main Menu.

Your executive dashboard is now ready to use. The rest of this chapter gives you details about all of the above
steps.
During this example, you use the SalesOrderBacklog BAQ as the base query for the custom executive dashboard.
This BAQ displays order backlog data. It displays details of open orders, for example, customer name, territory
region, due dates and product group information.

Executive Query
You use executive queries to create a cube of data gathered for display on the dashboard. This cube data is
contained within the Ice.SysCube tables. You first find and select the BAQ on which you add the executive queries.
You then define the specific fields that you want for the data; these fields populate the Ice.SysCube tables.

10.2.700 1249
Chapter 12 | Executive Dashboards Epicor ICE 3.2 Tools User Guide

Each executive query has one or multiple field maps. Each field map contains one or two dimensions it uses to
evaluate the data. If you select a BAQ that only contains a single query, these dimensions can be any field defined
on its Display Fields > Column Select sheet. However if you select a BAQ which contains subqueries, you can only
select fields from its top level subquery. You can select calculated fields from the BAQ to generate unique lists.
You must also define each query’s Delete Action method. The query uses this method to refresh its data when
the process set activates it. Lastly, you indicate how this data is to be summarized. It can be summarized by BAQ
or Date; you can also choose not to summarize the data at all.
An executive query defines a set of field map records processed using the BAQs as a source and the Ice.SysCube
tables as the target. If you click Submit from the Executive Query program, the executive query tables listed in
the next section update once. It is suggested you save the executive query to a process set that updates the cubes
according to a schedule.

While you build an executive query, you can save its definition.
You can then retrieve the record to create additional mappings
or perform other modifications.

What It Adds
When a process set runs the executive query, three items are added to the database:
• Ice.SysCube table – This table contains the primary data record created by the executive query. It stores the
dimension pair and all the fields (defined through field mapping sets) aggregated by the executive query.
• Ice.SysDef table – This table contains all the Ice.SysCubeID values. It also contains the dates on which these
identifiers were created.
• Ice.SysDim table – This table contains the unique list of the BAQ data dimension fields mapped within the
executive query. Both the Dimension One and Dimension Two data field values are stored within this table;
because of this, you must use a filter to select the appropriate dimension list. These items are the values that
display within the Dimension ID panel within the executive dashboard. This contains the unique list of the
Mapped fields like Country, Product Group, Customer, and so on. The data contained within these fields, like
Mexico, France, Machined, Fabricated, ABC Inc., are not contained in this table.

Limitations
Some limits to executive queries:
• You can use any field from the selected BAQ as a dimension on each field map. Only two dimensions, however,
can be stored and analyzed within each field map.
• Dates must always be mapped to Dimension 2. Dimension 2 has special logic you use to both populate and
aggregate dates.
• The executive query only aggregates data as a summary and it does this by totaling numeric values. It populates
character field maps only if the data in that character column is the same for all the records in that dimension
pair. It cannot calculate averages or counts. Counts can only be done by using a business activity query that
contains a calculated numeric field equal to “1”.
• Only one BAQ column can be mapped to a specific data value field. You cannot merge field columns through
an executive query.
• Only the current company’s data can be displayed through the executive query.
• Likewise, these executive query processes cannot be synchronized between multiple companies. These processes
are scheduled internally within the current company.

Create the Base Cube Query


Menu Path: Executive Analysis > Business Activity Management > General Operations > Executive Query

1250 10.2.700
Epicor ICE 3.2 Tools User Guide Executive Dashboards | Chapter 12

To formulate the Executive Query against the source BAQ:

1. Click the New button on the Standard toolbar.

2. Enter the Cube ID. This value is the identifier for the executive query, so enter a value that identifies the
query’s purpose. As you will create references to this cube later in this chapter, for an easier naming you
can name the cube as Cube1. This value is used to identify this query’s task within a process set. You learn
more about how to add this query to a process set in the Schedule Process Set section later in this chapter.

3. Now click the BAQ ID… button to find and select the Business Activity Query onto which you will add this
query. In this example, you select a copy of the delivered zSVSalesOrderBacklog query used to retrieve sales
order backlog information.

4. The Delete Action indicates the action that runs each time data for the current cube record is refreshed.
Available options:
• Delete Entire Cube – All the data within the executive query for this specific CubeID is both deleted
and refreshed. This option is the default; it clears out all values in the query’s field map sets. This option
then displays completely new data when its information is refreshed. This delete action is typically used
when the executive query is not specific to the current date but is used to evaluate all the data within
the database.
If you run multiple executive queries in a process set for the same CubeID, then you should only use this
option on the first query. Any queries that are run after this query add information to the Ice.SysCube
table used by the executive dashboard.
• Delete Dimension Pair – This option only removes and restores the dimension pairs referenced within
this executive query’s field map records. Any dimension pair not in this executive query is left alone,
leaving the dimension pairs and their data intact in the Ice.SysCube tables contained within this CubeID.
Use this option when two BAQs are needed to populate the Ice.SysCube tables for a single CubeID used
as the source data for an executive dashboard. The executive dashboard pulls all the data from both
queries because the separate BAQs populate a single CubeID using different dimension pairs.
• Delete Nothing – This option does not remove any data. Instead, it adds new data to the existing data.

10.2.700 1251
Chapter 12 | Executive Dashboards Epicor ICE 3.2 Tools User Guide

• Delete Pair By Summarization – This option removes and restores any dimension pair data generated
through the executive query. This option is useful if you select either the Summarize by BAQ or the
Summarize by Date check boxes. These check boxes are described later in this section.
For example, if you accidentally process this executive query twice on a specific Run Date, this delete
option can remove the data records for all the dimension pairs that were run earlier before starting the
second process run. This prevents data from being duplicated, as the executive query was run a second
time during the same date.

5. Select the Summarize by BAQ check box to indicate this executive query combines, or aggregates, the
data it pulls by using the specific BAQ. Select this check box when you want the data to be summarized
within the BAQ before it displays on your executive dashboard.

The Summarize by BAQ and Summarize by Date check


boxes can be selected with any of the Delete Actions
described previously in this section. These options give
you a lot of flexibility for the results in the Ice.SysCube
table. Also, if the Summarize by BAQ or the Summarize
by Date check boxes are not selected, the Delete Pair By
Summarization option works in the same way as the
Delete Dimension Pair option.

6. Select the Summarize by Date check box to indicate this executive query combines, or aggregates, the
data it pulls from the BAQ using a specific date. Select this check box when you want the summarized data
to be calculated by dates. Selecting this check box causes the Run Date field to become active; use this
field to define the specific date or calendar date on which this data is summarized.

7. If you select the Summarize by Date option, you next must define the Run Date for the executive query.
You can enter or select (using the drop-down calendar) a specific date. You can also select the Dynamic
check box. This changes the options for the Run Date drop-down list to regular calendar dates like Tomorrow,
Next Tuesday, First of Month, and so on.

8. Use the Schedule drop-down list to define when you want this query to refresh its data. The default value
is Now, indicating that the executive query runs immediately. In this example, the Daily Task Schedule is
selected, indicating this executive query is run once every work day. This schedule was created in the System
Agent; to learn how to do this, read the previous Schedules section.

You do not need to select a schedule within the Executive


Query program. Instead, you typically first add this
executive query to a process set and then schedule the
process set. All the queries assigned to this process set
are then run using the same recurring schedule. To learn
how to do this, read the Schedule Process Set section later
in this chapter.

9. When you select a schedule other than Now, the Recurring check box becomes available. Select this check
box to indicate that this executive query is run repeatedly – using the recurring time defined by the selected
schedule.

10. Now enter a User Description for the executive query. This description displays in the System Monitor
(the system tool that regulates tasks) when this query task is run by the schedule. It helps you verify the
query task was launched by the application. In this example, you will use the cube to analyze sales order
backlog data.

1252 10.2.700
Epicor ICE 3.2 Tools User Guide Executive Dashboards | Chapter 12

To learn how the System Monitor interacts with executive queries, review the Executive Dashboard in Action
section later in this chapter.

Field Mapping
You next display the Field Mapping sheet to define the Dimension Pair used to measure the executive query’s
data. The data is aggregated against the one or two dimension values you select; the results then display on your
executive dashboard.
The Dimension Pair values you use depends on the BAQ defined on the Detail sheet. If you select a BAQ that
only contains a single query, these dimensions can be any field defined on its Display Fields > Column Select
sheet. However if you select a BAQ which contains subqueries, you can only select fields from its top level
subquery. You can select calculated fields from the BAQ to generate unique lists. You can also leave the second
dimension value blank. This creates a field map that only pulls in data which matches the first dimension value.
Note that executive queries can only summarize (aggregate) data; they cannot create averages. Because of this,
these query results represent a sum of the values between the selected dimension pair. Be sure to select items
that logically aggregate together, like a character column against a date or numerical column.
However when the data displays on the dashboard, you can display averages by using the grid functionality. For
more information, review the Customization User Guide; the Personalization chapter contains the Enable Show
Summaries section.
To define the field mapping for an executive query:

1. After you finish defining the executive query, click the Mapping > Mapping Detail sheet.

2. The Mapping Set field displays the dimension set number for this executive query. You cannot edit this
value; it only displays for your information. If multiple field map sets have been created for the executive
query, the specific mapping set number appears in this field.

10.2.700 1253
Chapter 12 | Executive Dashboards Epicor ICE 3.2 Tools User Guide

3. The Dimension 1 value is the first definition used to measure the BAQ data. A required value, click the
drop-down list to select the BAQ column you want. All the fields within the current BAQ display on this list;
you can even select a calculated field. In this example, the CustID (Customer ID) column is selected.

You cannot select a Date field (Order Date, Need By Date,


and so on) for the Dimension 1 value. A date value cannot
be used as the first value against which the other data is
evaluated. It can be used, however, for the Dimension 2
value.

4. The Dim 1 Text automatically defaults in. You can override this value to indicate what displays on the
executive dashboard as a Dimension Value. Entering a value in this field is required.

5. Enter the Dim 2 value you will use. An optional value, select the column you want from the drop-down
list. This dimension can be a Date field. You can also select a calculated field here. In this example, the
OrderRel_NeedbyDate field is selected.

6. Similarly to Dimension 1 Text, you could enter a custom value you want to display on the dashboard.

7. Now you can define the fields you want to display through this field map. You can first select the fields that
display Decimal values. All the fields from the selected BAQ appear on this list, so typically you select fields
that display decimal values, or the results may not be what you want. You can display up to 10 decimal
values.

8. Next, select the optional Integer fields (numeric fields that do not use decimals) you want to display in the
executive query. All the fields from the selected BAQ appear on this list, so typically you select fields that
display integer values, or the results may not be what you want. You can display up to five integer values.

9. Lastly, select the optional Character fields (alphanumeric values) you want to display within the executive
query. All the fields from the selected BAQ appear on this list, so typically you select fields that display
character values, or the results may not be what you want. You can display up to 10 character values.
Character fields do not aggregate, but if you use a field that contains the same information on all records
for the dimension pair, it can be useful for the executive query to pull in these results, too.

10. To save the current mapping, click Save.

11. You can continue to add more field maps to the query. To create another mapping, click New.

1254 10.2.700
Epicor ICE 3.2 Tools User Guide Executive Dashboards | Chapter 12

12. To create multiple mappings at once using a shortcut method, click the Mapping > Mapping List sheet.

13. Use the Field Mapping Sets grid to quickly create the other field maps you need. Highlight the row on the
grid.

14. Right-click the row to display the context menu; select Copy Selection.

15. Then right-click the grid again. A context menu appears; select Paste Insert.

16. A new, identical row displays – which represents a field map. Change the dimensions and display fields you
need in the fields on this grid. Notice that this example has only two Dimension 2 values – NeedByDate and
NeedByDateWeek. The Dimension 1 values are changed, however, to display the different dimensions you
want to use for your cube of data. You could continue entering more Dimension 1 values such as Sales
Territory Region or Product Group code.
If you need, you can also return to the Mapping > Mapping Detail sheet to select the fields you want
displayed through this field map.

17. Continue to add the field maps that you need for the executive query. The tree view on the left displays the
list of all cube mappings. Remember to always save the current mapping record before you click New to
create a new one.

Save to Process Set


To finish the executive query, save it to a process set.

10.2.700 1255
Chapter 12 | Executive Dashboards Epicor ICE 3.2 Tools User Guide

1. Click the Save to Process Set button on the Standard toolbar.

2. The Save to Process Set window displays.

3. From the Process Set drop-down list, select the process set you want. In this example, you select the Sales
Order Backlog Status process set. (You created this new record during the previous Process Set section.)

4. Click OK.

Typically, you save the Executive Query to a process set


which then refreshes the cube based on a schedule
attached to the process. You can, however, click the
Submit button to send the process for execution by
System Task Agent.

5. To verify the process set now contains your query, navigate to Process Set Maintenance.
Menu Path: System Management > Process Sets > Process Set Maintenance

This program is not available in Epicor Web Access.

1256 10.2.700
Epicor ICE 3.2 Tools User Guide Executive Dashboards | Chapter 12

6. Click the Process Set ID button to find and select the process set you created previously in this chapter.

7. The executive query now displays within the Process Set Tasks grid. It has become a task that this process
set runs based on a schedule it uses.

8. Notice the Move Up and Move Down buttons. If the process set had multiple tasks, you could change
the order in which the tasks are run by selecting a task and then clicking one of these buttons.

Your executive query is now added to the process set.

Executive Query Examples


This section contains examples of how an executive query aggregates data. These examples detail the different
results that occur when you select the Summarize by BAQ check box, when you select the Summarize by Date
check box, and when you do not select either check box.

Example One
You have two BAQs pulling sales order data from the same tables. These BAQs look similar, but they use conditions
that cause different data results to display. One business activity query pulls in sales orders with today’s date,
while the other business activity query only pulls in open sales orders. This first example also assumes that no
data was present in the CubeID table when the executive query was run.
This table shows you the field maps selected for both BAQs and the data being returned by them:

Field Mapping Dimension Dimension Character 1 Decimal Decimal Run Date ExportID (BAQ
Set 2 1 2 ID)
The BAQ SalesPerson State “QueryType” Order Order The The application
dataor This is a Quantity Value application will populate the
calculated calculated will populate Run Date value.
fields: field. the Run Date
value.
BAQ 1 - John Doe Colorado Backlog 100 5,000 06/01/20XX The identifier (ID)
Salesperson for BAQ 1.
Backlog
BAQ 2 - Daily John Doe Colorado Daily Sales 12 750 06/01/20XX The identifier (ID)
Sales for BAQ 2.

10.2.700 1257
Chapter 12 | Executive Dashboards Epicor ICE 3.2 Tools User Guide

If neither the Summarize by BAQ nor the Summarize by Date check boxes are selected, the following results
display:

Data Results: John Doe Colorado "Blank" 112 5,750 "Blank" "Blank"

Notice the data from both BAQs is aggregated (pulled together) because the dimension pairs are identical. This
happens on all matching dimension pairs between the two business activity queries. If this dimension pair existed
in the Ice.SysCube table, the result would still be a single record that contains this aggregated data.
Now if the Summarize by BAQ check box is selected, the following results display:

Data Results: John Doe Colorado Backlog 100 5,000 06/01/20XX The identifier (ID) for
BAQ 1.
Data Results: John Dow Colorado Daily Sales 12 750 06/01/20XX The identifier (ID) for
BAQ 2.

In this situation, the data from both queries become separate records because the BAQ identifiers were different.
If additional data were within each BAQ, the data from each separated BAQ would first aggregate together. The
results of each BAQs’ aggregated data, however, would display separately.
Next, if the Summarize by Date check box is selected, the following results display:

Data Results: John Doe Colorado "Blank" 112 5,750 "Blank" "Blank"

In this situation, notice the data from both BAQs is aggregated together. Because the dimension pairs were the
same and they both used the same Run Date, they aggregate. This would happen on all the matching dimension
pairs created between the two BAQs.

The Summarize by Date option also works differently if the


Run Date is set dynamically to Today or First of Month. If this
executive query is set to Today and it is run on different dates
(06/01/20XX and 06/02/20XX), separate results for the data
display. If the Run Date is set dynamically to the First of Month,
however, the results of both BAQs’ run dates (06/01/20XX and
06/02/20XX) aggregate together into a single record.

If existing data were within the Ice.SysCube table from a previous query run, the records display separately because
both query runs use separate Run Date values.

Example Two
You have one BAQ pulling either Open Order or Backlog data for your salespeople. This BAQ was run previously
on 06/01/20XX, so the Ice.SysCube table currently holds data. It is now 06/02/20XX, and you are running this
BAQ again.
This table shows you the field maps selected for the single BAQ and the data returned when it is run:

Field Mapping Dimension Dimension Character 1 Decimal Decimal Run Date ExportID (BAQ ID)
Set 2 1 2
The BAQ SalesPerson State “QueryType” Order Order The If the Summarize by
dataor This is a Quantity Value application BAQ check box is
calculated calculated will populate selected, the Export
fields: field. the Run Date ID value will be
value. populated.

1258 10.2.700
Epicor ICE 3.2 Tools User Guide Executive Dashboards | Chapter 12

Field Mapping Dimension Dimension Character 1 Decimal Decimal Run Date ExportID (BAQ ID)
Set 2 1 2
BAQ 1 - John Doe Colorado Backlog 100 5,000 06/01/20XX The identifier (ID) for
Salesperson BAQ 1.
Backlog
BAQ 2 - Daily John Doe Colorado Daily Sales 150 5,250 06/01/20XX The identifier (ID) for
Sales BAQ 1.

If neither the Summarize by BAQ or the Summarize by Date check boxes are selected, the following results display:

Data Results: John Doe Colorado Backlog 205 10,250 "Blank" "Blank"

Notice the data from both query runs is aggregated together because the dimension pairs are the same. This
would happen on all matching dimension pairs run through the executive query; this aggregated data then
populates the Ice.SysCube table.
Now if the Summarize by BAQ check box is selected, the following results display:

Data Results: John Doe Colorado Backlog 100 10,250 "Blank" The identifier (ID) for
BAQ 1.

In this situation, the data from both query runs is aggregated because the dimension pairs are the same and the
business activity query is the same one that was used to populate the data on the previous day.
Next, if the Summarize by Date check box is selected, the following results display:

Data Results: John Doe Colorado Backlog 100 5,000 06/01/20XX "Blank"
Data Results: John Dow Colorado Backlog 105 5,250 06/01/20XX "Blank"

In this situation, the data from both query runs display as separate records because the Run Date values are
different. If the Run Date values for both query runs were the same, however, the Delete Action determines if
the previous record remains to be aggregated with the new data, or if the previous data is deleted.

Create a Dimension BAQ


Now that your base BAQ and executive query are created, you can next build your second BAQ from it. This
second BAQ pulls dimension data from the base executive query for display on your dashboard. After you have
created this second BAQ, you must create an executive query for it that pulls this dimension data as well.
The purpose for this BAQ and its executive query is to provide a unique list of the Dimension Details. When the
Ice.SysCube table is populated by the first executive query, the Ice.SysCubeDim table that generates only has a
list of the dimension fields like Country, Product Group, and Salesperson. To get the unique list of dimension
details such as France, USA, Machined Parts, John Doe, and so on, you must aggregate the dimension fields
against the dimension data. The Dimension BAQ is required to do this process.
Navigate to Business Activity Query.
Menu Path: System Management > Business Activity Queries > Business Activity Query

This program is not available in Epicor Web Access.

Here’s what you do:

10.2.700 1259
Chapter 12 | Executive Dashboards Epicor ICE 3.2 Tools User Guide

1. Click the New button on the Standard toolbar.

2. Enter a Query ID for the query. In this example, enter OrderBLogDimension.

3. Enter a Description for this BAQ. In this example, you enter Order Backlog Dimension One.

4. Select the Shared check box. This makes the BAQ available to all users within your company.

1260 10.2.700
Epicor ICE 3.2 Tools User Guide Executive Dashboards | Chapter 12

5. Click the Query Builder > Phrase Build sheet to define the query phrase for the BAQ.

6. Within the list of tables on the left, locate the Ice.SysCube table.

7. Drag the table onto the Query Designer window.

10.2.700 1261
Chapter 12 | Executive Dashboards Epicor ICE 3.2 Tools User Guide

8. With the Ice.SysCube table selected, click the Table Criteria sheet in the lower left side of the BAQ Designer
Window.

9. Click the Add Row button to create a new criterion.

10. Select CubeID from the Field listing.

1262 10.2.700
Epicor ICE 3.2 Tools User Guide Executive Dashboards | Chapter 12

11. Tab to the Filter Value and from the filter listing, select specified constant. Once the type of filter has
been declared, you define the required constant. Click the specified link.

12. The Specify a Value window displays. Enter the name of the first executive query you created – in this
example, Cube1.

13. Click OK to accept the entry.


When you finish building your phrase, it should state the following:
select *
from Ice.SysCube as SysCube
where (SysCube.CubeID = 'Cube1')

14. Click the Display Fields > Column Select sheet.

10.2.700 1263
Chapter 12 | Executive Dashboards Epicor ICE 3.2 Tools User Guide

15. Select the columns you want displayed on the dashboard. Your selection may look similar to the following.

16. Now click the Analyze sheet.

17. Verify your Syntax is OK by clicking the Analyze button.

18. Click Save.

1264 10.2.700
Epicor ICE 3.2 Tools User Guide Executive Dashboards | Chapter 12

Build the Executive Query Against Data Dimensions


You now must create the executive query that references this new BAQ.
Menu Path: Executive Analysis > Business Activity Management > General Operations > Executive Query
Here’s what you do:

1. Enter the Cube ID you need for this executive query. In this example, enter Cube2.

2. Click the BAQ ID button to find and select the Data Dimensions BAQ you created. In this example, you
select OrderBLogDimension.

3. Select the Delete Action. In this example you select the Delete Entire Cube option.

4. Navigate to the Mapping > Mapping Detail sheet.

10.2.700 1265
Chapter 12 | Executive Dashboards Epicor ICE 3.2 Tools User Guide

5. You need only one field Mapping Set for this executive query. Your mapping may look similar to the
following.

6. Save the Cube definition.

7. Now click the Save to Process Set button.

8. From the Process Set drop-down list, select the process set that needs to contain this query. In this example,
you select Sales Order Backlog Status.

1266 10.2.700
Epicor ICE 3.2 Tools User Guide Executive Dashboards | Chapter 12

9. Click OK.

10. To verify the tasks you want are contained within the process set, navigate: Process Set Maintenance:
Executive Analysis > Business Activity Management > Setup > Process Set

11. In Process Set Maintenance, click the Process Set ID button to find and select the process set. In this
example, you select the OrderBackLog set.

12. Notice that both executive queries now display. The process set runs the base cube query first – followed
by the dimension query you just created.

Schedule a Process Set


To finish activating these executive queries, you next must schedule the process set that contains them. When
the schedule activates the process set, the executive queries run, refreshing with current data from the database.
Navigate to Schedule Process Set.
Menu Path: System Management > Process Sets > Schedule Process Set
To schedule your process set:

1. From the Process Set drop-down list, select the Sales Order Backlog Status.

10.2.700 1267
Chapter 12 | Executive Dashboards Epicor ICE 3.2 Tools User Guide

2. Now from the Schedule drop-down list, select the Daily Task Schedule. This indicates that the process set
runs its tasks once during each work day.

3. Select the Recurring check box; this indicates that this process set runs each time the system agent activates
this schedule.

4. When you finish, click Submit on the Standard toolbar.


For more information on scheduling process sets, review Automatic Data Processing in the Implementation
User Guide.

Create BAQs for Executive Dashboard Display


The BAQs and the executive queries you created both select and define the data you want on your executive
dashboard. Now you must create the BAQs that directly display the data on the executive dashboard. To do this,
create these three BAQs:
• Dimension BAQ – This BAQ defines the dimension options users can select from the executive dashboard.
This BAQ pulls data from the second executive query.
• Dimension Details BAQ – This BAQ pulls in the various detail records available with each selected dimension.
Users also select a detail option to display the data they need. This BAQ also pulls data from the second
executive query.
• Data BAQ – This BAQ is used to pull the data from the first executive query.

Dimension BAQ
To create the Dimension BAQ:

1. Launch the Business Activity Query Designer program.

2. Click the New button on the Standard toolbar.

3. Enter a Query ID that you can use to quickly find this BAQ.

1268 10.2.700
Epicor ICE 3.2 Tools User Guide Executive Dashboards | Chapter 12

4. Select the Shared check box.

5. Click the Query Builder > Phrase Build sheet (not pictured) to construct the query you need.

6. You could create a BAQ pulls all columns from the Ice.SysCubeDim table. The resulting BAQ phrase would
look similar to the following:
select *
from Ice.SysCubeDim as SysCubeDim
where (SysCubeDim.DimNum = 1)

You could define more filtering within this BAQ, but then
you would need to create several filters that do the same
function. Instead, you can define a filter within the
Dashboard Query Properties window that filters the Dim1
query in one location. For example, you could enter:
Ice.SysCubeDim.CubeID =<CubeName>. You could also
use the Query Builder > Display Fields > Column
Select sheet to select specific columns you want to
display.

7. Click Save.

Dimension Details BAQ


The Dimension Details BAQ pulls in the various detail records that are available with each selected dimension.
To create the Dimension Details BAQ:

1. Click the New button on the Standard toolbar.

2. Enter a Query ID that you can use to quickly find this BAQ.

10.2.700 1269
Chapter 12 | Executive Dashboards Epicor ICE 3.2 Tools User Guide

3. Select the Shared check box.

4. Click the Query Builder > Phrase Build sheet (not pictured).

5. Build the criterion to pull data from the second executive query to create a unique list of dimension data.
The resulting SQL phrase looks similar to the following:
select *
from Ice.SysCube as SysCube
where (SysCube.CubeID = 'Cube2')

6. Typically, you would use the Query Builder > Phrase Build > Display Fields sheet (not pictured) to select
the fields you want to see on the dashboard.

7. Click Save.

Data BAQ
The Data BAQ pulls the data from the first Executive Query. It locates the SysCube data and displays it on the
Executive Dashboard.
To create the Data BAQ:

1. Click the New button on the Standard toolbar.

2. Enter a Query ID that you can use to quickly find this BAQ.

3. Select the Shared check box.

4. When building the query, make sure to create the criterion that pulls data from the first Executive Query
you created and select columns you want to see through this BAQ. You can also define additional criteria
such as filtering data by date and so on.

1270 10.2.700
Epicor ICE 3.2 Tools User Guide Executive Dashboards | Chapter 12

5. Click Save.

Create and Deploy a Dashboard


Now that all the BAQs are in place, you are ready to add them to a dashboard. Because these queries are linked
to executive queries, you can select them to create an executive dashboard. If you need additional details about
how to create a dashboard, review the Dashboards chapter.

In order to create new dashboards, a user must be granted


Dashboard Developer permission in User Account
Maintenance.

Navigate to the Dashboard.


Menu Path: Executive Analysis > Business Activity Management > General Operations > Dashboard

This program is not available in Epicor Web Access.

To create an executive dashboard:

1. Create a new Dashboard Definition.

2. Add the Dimension BAQ query to the dashboard. Its grid view appears; in this example, it displays as the
Dimension ID grid.

3. Add the Dimension Details BAQ to the dashboard. Its grid view appears; in this example, it displays as
the Order Backlog Dim Detail: Summary grid.

4. Add the Data BAQ to this dashboard. Its grid view appears; in this example, it displays as the Order Backlog
Data: Summary grid.

10.2.700 1271
Chapter 12 | Executive Dashboards Epicor ICE 3.2 Tools User Guide

5. You then add the chart views and any other views that you want to present. In this example, you add a
Chart View for the data BAQ (OrderBLogData).
To complete the executive dashboard, you must deploy it to the Main Menu and make it available to users.

For more information about how to add a new dashboard


to the Main Menu, review the Deploy Dashboard to the
Menu section within the Dashboards chapter.

Verify the Process Set


Use the System Monitor to verify the application activates the process set and populates the executive dashboard
with current data. This program interacts with the system agent by running the schedules created within System
Agent Maintenance.
To verify the process set was run, navigate to the System Monitor.
Menu Path: System Setup > System Maintenance > System Monitor

This program is not available in Epicor Web Access.

The History Tasks sheet displays all the reports, processes, and executive queries recently run on your system.
In this example, the recently processed executive queries display.

To display the System Monitor, you can also click this program's icon on the system tray on the Windows
toolbar. If you need more information about the System Monitor, review Automatic Data Processing in the
Implementation User Guide.

Now that the executive dashboard is complete and its data is being actively refreshed by the application, your
users can launch it to display current data. In the example in this chapter, the sales order backlog information is
provided by the dashboard. This data is updated once every work day, so this executive dashboard always displays
current, accurate data.

1272 10.2.700
Epicor ICE 3.2 Tools User Guide Epicor Data Analytics | Chapter 13

Chapter 13: Epicor Data Analytics

Epicor Data Analytics (EDA) is fully integrated with Epicor 10 and uses data to help distributors understand their business
better, with function-specific content packs that provide a dashboard with deep integration into a specific set of Epicor
10 data-sales, purchasing, inventory, general ledger, accounts payable, and accounts receivable.
Review this list for information on key features in the Epicor Data Analytics (EDA) application.

Design Database

Common databases in Epicor Data Analytics (EDA) are sales, purchasing, inventory, finance and general ledger,
but you may see different databases depending on your setup.
Each database is populated with raw data from an ERP or other business system and data is most commonly
refreshed overnight.
Your source data is not affected by anything you do in EDA.
Administrators with permission can create new databases using database designer.

Add User-Defined Fields

Sometimes you need more fields because the available fields are not enough to handle your required customization.
In EDA, you can add user-defined tables and automatically joinable user-defined (UD) fields to the base EDA
content. You no longer need to edit SQL scripts to add unique data to the EDA database.
The automatically joinable user-defined fields are listed at the end of the columns list of each database stream.
Simply drag and drop custom fields to Measures and Dimensions to design a custom database.
Alternatively, you can link a UD table to the existing table. The UD table will be associated with the extended
table with columns SysRowID and ForeignSysRowID. Then you can add custom fields as you need.
To add user-defined fields to the Sales database:

1. From the Main Menu options, select Administration > Databases.

10.2.700 1273
Chapter 13 | Epicor Data Analytics Epicor ICE 3.2 Tools User Guide

2. From the Databases list, select the Sales database.

1274 10.2.700
Epicor ICE 3.2 Tools User Guide Epicor Data Analytics | Chapter 13

3. Click Design.

4. The automatically joinable user-defined fields are listed at the end of the columns list of each Database
Stream. You can add them to your database by dragging and dropping to Dimensions, Measures, or
Properties.

10.2.700 1275
Chapter 13 | Epicor Data Analytics Epicor ICE 3.2 Tools User Guide

Alternatively, you can add a user defined table and manually join it to the existing table. Proceed with the
following steps to join the user-defined Customer table to the existing Customer table and then add custom
fields to the Sales database.

5. On the Dimensions panel, click the Customer field.

1276 10.2.700
Epicor ICE 3.2 Tools User Guide Epicor Data Analytics | Chapter 13

6. Select the d_Customer table.

7. To manually link the d_Customer table with the user-defined ud_Customer table, from the d_Customer
columns, select the CustomerSysRowID field and drag and drop it to the Customer dimension.
All user-defined tables that you can manually join to the extended table have the Table_SysRowID name
and are listed at the end of the columns list. For example, this Customer table (d_Customer) may be linked
to the user-defined Country table via Country_SysrowID, Customer Group via CustGroup_SysRowID, and
so on.

8. Select the CustomerSysRowID field from the Customer dimensions list.

10.2.700 1277
Chapter 13 | Epicor Data Analytics Epicor ICE 3.2 Tools User Guide

9. From the ERP Tables list, select the ud_Customer, and drag and drop it to the Drag Here area.

10. Select the ForeignSysRowID column header and drop it to the Customer_SysRowID table.

1278 10.2.700
Epicor ICE 3.2 Tools User Guide Epicor Data Analytics | Chapter 13

11. From the columns list select a UD column and drag and drop it to the Properties area.

12. To change the description of the added property, click Edit.

13. In the Title field, enter a new name for this property.

14. From the Type drop-down list, select the type of the field.

15. Click Save.

16. Navigate to the Build sheet.

10.2.700 1279
Chapter 13 | Epicor Data Analytics Epicor ICE 3.2 Tools User Guide

17. Click Save and Build.

18. Navigate to Main Menu > Databases > Sales.

1280 10.2.700
Epicor ICE 3.2 Tools User Guide Epicor Data Analytics | Chapter 13

19. From the Customer dimensions, select the CustomerSysRowID field.

10.2.700 1281
Chapter 13 | Epicor Data Analytics Epicor ICE 3.2 Tools User Guide

The Properties list displays User-Defined Field. You can now use this field on your dashboard.

Add Base Currency Measures

You use Base Currency Measures to view the EDA content in the currency through which each company in your
database does business.
Each company can have up to three reporting currencies and one base currency available. A reporting currency
is one used to record, or report, the amounts on a transaction for financial activities such as taxing and auditing
purposes. A base currency is the primary currency used for transactions within a specific company.

Example You use the MXN currency as the reporting currency


for your companies. In the EDA Database Designer, the
Accounts Payable (AP) table will contain the Invoice Amount
and Invoice Amount Base columns. The Invoice Amount is
the measure on the reporting currency that you selected (MXN)
and the Invoice Amount Base is the base currency for the
company (for example, USD). Simply drag and drop the Invoice
Amount Base field to AP Measures to use it on the AP
dashboard along with the reporting currency.

1. From the Main Menu options, select Administration > Databases.

1282 10.2.700
Epicor ICE 3.2 Tools User Guide Epicor Data Analytics | Chapter 13

2. From the Databases list, select the Account Payables database.

10.2.700 1283
Chapter 13 | Epicor Data Analytics Epicor ICE 3.2 Tools User Guide

3. Click Design.

4. Drag the Discount Amount Base field and drop it to the Measures panel.

1284 10.2.700
Epicor ICE 3.2 Tools User Guide Epicor Data Analytics | Chapter 13

5. To change the description of the added measure, click Edit.

6. In the Title field, enter the name for this base measure.

10.2.700 1285
Chapter 13 | Epicor Data Analytics Epicor ICE 3.2 Tools User Guide

7. From the Formatting drop-down list, select the format for your currency base measure.

8. Click Save.

9. Navigate to the Build sheet.

1286 10.2.700
Epicor ICE 3.2 Tools User Guide Epicor Data Analytics | Chapter 13

10. Click Save.

11. Click Build to update the database.

12. Navigate to Main Menu > Databases > Accounts Payable.

10.2.700 1287
Chapter 13 | Epicor Data Analytics Epicor ICE 3.2 Tools User Guide

13. The measure displays on the Measures list.

1288 10.2.700
Epicor ICE 3.2 Tools User Guide Epicor Data Analytics | Chapter 13

Create Financial Statements Database

Use Financial Statements database to produce P&L Statement, Balance Sheet, Cash Flow, and Trial Balance
views. Available on the Finance Pack solution template, the database displays consolidated financial statements
in an accounting format and integrating account-based streams with the usual EDA analysis tools.
Every new Financial Statements database opens with a template to get you started with the data loading and
mapping process. It comes with placeholders for streams, dimensions and properties.

The Financial Statements database requires certain streams,


dimensions and properties for financial statements to display
correctly. Your data needs to fit into the usual accounting
categories and classifications, such as IAS 1.

This solution requires you to manually map accounting categories and classifications in an Excel sheet when
creating the Financial Statements database.
You start by exporting the list of accounts from the existing EDA General Ledger IS/BS database to an Excel
spreadsheet. You copy-paste its content to the excel template that comes with EDD where you map categories
and classification to these GL accounts using standard set of categories available for EDA, ie you specify if the
GL account is a revenue account, cash account, etc, and import the updated Excel spreadsheet into EDA. You
then design and build the Financial Statements database to use the P&L Statement, Balance Sheet, Cash Flow,
and Trial Balance views.

10.2.700 1289
Chapter 13 | Epicor Data Analytics Epicor ICE 3.2 Tools User Guide

Export Chart of Accounts to Excel

Use the General Ledger BS/IS database to export your chart of accounts to Excel. The imported data includes
Company Code, GL Account Display Code, GL Account Name and GL Account COA Code.

1. On your Home page, from the Databases list, selects General Ledger BS/IS.

2. Click Company.
If there are no rows, from the Period drop-down list, select Custom and apply a custom period that
contains accounting data. In this example, January 2010 - December 2010.

1290 10.2.700
Epicor ICE 3.2 Tools User Guide Epicor Data Analytics | Chapter 13

3. In the Properties list, clear the Name check box.

10.2.700 1291
Chapter 13 | Epicor Data Analytics Epicor ICE 3.2 Tools User Guide

4. Click GL Account.

5. In the Properties list, select the Display Account check box and the COA Code check box. Along with
the Account Name, you need to export GL Display Account and COA Code to the Excel spreadsheet.

1292 10.2.700
Epicor ICE 3.2 Tools User Guide Epicor Data Analytics | Chapter 13

6. Click Nest.

7. Drag the Company dimension into the Drag Here box next to Levels to sort the GL accounts by company.

10.2.700 1293
Chapter 13 | Epicor Data Analytics Epicor ICE 3.2 Tools User Guide

8. Click Export, and from the options list, select XLSX.

1294 10.2.700
Epicor ICE 3.2 Tools User Guide Epicor Data Analytics | Chapter 13

Map Accounts

Use the Account Mapping for Finance Database.xlsx template file that comes with EDA to perform account
mapping.

1. Open the exported excel file and copy the following columns to clipboard: Company Code, GL Account
Nmae, GL Account Display Account and GL Account COA Code.

2. Navigate to the EDA installation folder and open the Account Mapping for Finance Database.xlsx file.

10.2.700 1295
Chapter 13 | Epicor Data Analytics Epicor ICE 3.2 Tools User Guide

3. Paste the copied columns in cell A1 on the Data Sheet list .

1296 10.2.700
Epicor ICE 3.2 Tools User Guide Epicor Data Analytics | Chapter 13

4. Navigate to the Data Entry sheet.

5. From the Category drop-drown list, select the accounting category for the GL account.

6. Use the Classification column to specify the GL account classification.

7. In the IsCash column, specify if it is a cash account.

8. Click File > Save As and save the file in the CSV format.

10.2.700 1297
Chapter 13 | Epicor Data Analytics Epicor ICE 3.2 Tools User Guide

Design Financial Statements Database

Import the excel spreadsheet to EDA and build the Financial Statements database.

1. In EDA, from the Main Menu options, select Administration > Databases.

2. From the Databases list, select the Financial Statements database.

3. Click Design.

1298 10.2.700
Epicor ICE 3.2 Tools User Guide Epicor Data Analytics | Chapter 13

4. From the Dimensions list, select Account.

5. Expand the data sources panel from the arrow at the right of the screen and click Upload.

10.2.700 1299
Chapter 13 | Epicor Data Analytics Epicor ICE 3.2 Tools User Guide

6. In the Upload window, click Choose File, and then select the updated Account Mapping for Finance
Database.csv file.

7. Select the File has header row check box.

8. Click Upload.

1300 10.2.700
Epicor ICE 3.2 Tools User Guide Epicor Data Analytics | Chapter 13

9. Drag the Account Mapping for Finance Database data item from the panel on the right into the Drag
Here box. (Refresh the page, if necessary).

10. To join the tables, drag the Company_Account header to the CompanyCOACodeGLAccount header.

11. Drag the Category and Classification headers to the corresponding placeholders in the Dimensions list.

10.2.700 1301
Chapter 13 | Epicor Data Analytics Epicor ICE 3.2 Tools User Guide

12. Drag the Name header to the Name placeholder.

13. Drag and drop the IsCash header to the IsCash placeholder.

14. Navigate to the Build sheet.

15. Click Save.

1302 10.2.700
Epicor ICE 3.2 Tools User Guide Epicor Data Analytics | Chapter 13

16. Click Build to create the Financial Statements database.

17. Once built, click Open.

18. The Financial Statements database displays.

19. Use the Modes drop-down list to switch between Profit & Loss, Balance Sheet, Cash Flow and Trial
Balance.

Troubleshooting

The troubleshooting section addresses some issues that may occur with EDA.

Inventory Databases Do Not Display Historic Data

The Inventory Monthly and Inventory Weekly databases use the PartBin table as a source table. Once you
start using the content, it will take the monthly or weekly snapshot of your inventory.

10.2.700 1303
Chapter 13 | Epicor Data Analytics Epicor ICE 3.2 Tools User Guide

1304 10.2.700
Epicor ICE 3.2 Tools User Guide Index

Index
.net process, c# 873 baq specified expression 58
.net process, vb.net 874 base cube query (create) 1251
bpm advanced user rights 534
32bit vs 64bit odbc 418 bpm base elements 533
bpm data form directive 852
bpm data form directive, bpm data form action 852
A bpm data form directive, design email template 855
bpm data form directive, sent email action 855
activate a baq zone 202 bpm data form directive, test form 859
add a query to the dashboard 970 bpm data forms 845, 846, 848, 849, 850, 851
add favorite dashboard, launch dashboard 1126 bpm holds 540
add function call parameter values 70 bpm holds – how to use 540
add more set field actions 1239 bpm tracing 898
add new definition 404 bpm update processing 151
add report view 1042 bpm workflow designer 556
add the baq markup (baq combo) 382 business activity query (baq) 1248
advanced bpm processing 158, 1167 business activity query searches 488
advanced bpm rights 863
advanced data aggregation 328
advanced group by clause editor 112 C
advanced search with range, add 1013
advanced search, conduct 964 .net assembly 865, 867
advanced search, use 494 calculated field 94, 96, 101, 103
advanced searches 493 baq constants 103
aggregate data using pivot 72 example one 94
analyze 161 functions 96
analyze and test query 162 operators 101
apply table filter 406 call bpm data form 585
asynchronous actions, processing 629 call SC Workflow 586
attach data tag 606 callers 585
attach hold 608 case studies 204
auto print 610 case studies, bpm 725
auto print, case study 776, 777, 779, 782, 784 change log 611
availability of workflow elements 569 chart settings 1007
chart settings, modify 1007
chart view, add to dashboard 1004
B column mapping 153
column select 82
baq and report datasets 433 combine results sets using union 310
baq application server settings 199 common table expression query 358
baq best practices 203 condition 596
baq combo 374 conditions, list 597
baq info zones 202 configure service connect workflow 146
baq report designer 433 copy and paste workflow elements 570
baq report, add 438 copy query 175
baq report, create 438 create a calculated field 90
baq report, customize 459 create a new directive 551
baq report, design 446 create an executive dashboard - overview 1249
baq report, implement 455 create closed orders subquery 303
baq report, option fields 442 create cte subquery 358
baq report, standard interface 434 create group by expression 113
baq report, test 444 create intersect subquery 351
baq search 173 create invoice view subquery 321
baq search, use 492 create new dashboard 1135
baq searches 488 create new datasource type 403
baq searches, enable fields 488 create new filter group 404
baq special constant 64 create new variables 573

10.2.700 1305
Index Epicor ICE 3.2 Tools User Guide

create open orders subquery 299 data tag search, perform 509
create order view subquery 315, 328 data tag searches 505
create query parameter 323, 360 data tag searches, add to a record 505
create quote view subquery 335 data tag searches, add to grid 507
create subquery 124 data tags, bpm directives 511
create the directive 554 database viewing tools 21
create toplevel BAQ 311, 348 debug bpm directive 910
create toplevel subquery 305, 339, 369 debugging prerequisites 909
create URL view 1137 debugging using visual studio 909
create variables using actions 575 define basic processing details 220
current date + specified number of days 65 define business activity query attributes 30
custom actions 548 define custom action 186
custom code directive 837 define main subquery 122
custom code directive, create directive 837 define parameter 187
custom code directive, test directive 841 define the query (baq combo) 374
custom global alert, alert action 948 define the query (labor summary) 205
custom global alert, alert condition 945 define the query (not clocked out) 213
custom global alert, create data directive 943 define updatable fields 138
custom global alert, refine shortcut link file 941 dependent directive 631
custom global alert, test alert 954 dependent directives 631
custom global alert, test shortcut link 956 design crystal report 1031
customer contact baq, activate processing 1197 design external business activity query 428
customer contact baq, add ship to table 1186 developer mode, switch 966
customer contact baq, add tables 1181 dimension baq 1268
customer contact baq, define updatable fields 1195 dimension baq and executive query (create) 1259
customer contact baq, link role code table 1184 dimension details baq 1269
customer contact baq, query 1180 directive export 883
customer contact baq, select columns 1190 directive import 885
customer contact baq, sort order 1194 directive level variables 573
customer contact baq, test 1198 directive management 882
customer contact updatable baq 1180 directive scope 536
customize element block 565 directive update 887
customize the form (baq combo) 378 directive variables 577
directives 543
dirty rows, multiple 630
D disable bpm 915
dashboard (create and deploy) 1271 display fields 82
dashboard as advanced search, enable 1073
dashboard browse, add to dashboard 1061 E
dashboard creation 966
dashboard developer rights 965 enable external datasources 426
dashboard modification 1075 enable post directive 612
dashboard title bar, modify 1071 enable standard directive 612
dashboard user notes and tech notes 1069 enternal method logic 871
dashboard user notes, tech notes, update 1069 enterprise search 524
dashboard, access 1100 enterprise search, activate 525
dashboard, copy 1075 enterprise search, filter options 532
dashboard, navigate 960 enterprise search, smart client 526
dashboard, test, deploy as UI application 1095, 1105 enterprise search, web client 529
dashboards, deploy 1095 Epicor ERP and Epicor Service Connect Interoperability 144
data baq 1270 epicor sharepoint publisher 1140
data dictionary viewer 21 esc credentials, update 895
data dictionary viewer – field view 22 ESP dashboard, adjust 1149
data dictionary viewer – table view 21 execute custom code 589
data dimensions (build baq against) 1265 execution settings 188
data directive, custom global alert, action sequence 952 executive dashboard creation 1249
data directive, standard global alert, action 923 executive dashboard display (create baqs) 1268
data directive, standard global alert, action sequence 927 executive dashboard example 1244
data directive, standard global alert, condition 921 executive dashboard setup 1246
data directive, standard global alert, create 919 executive query 1249
data directives 544 executive query (limitations) 1250
data tag maintenance 512 executive query (what it adds) 1250

1306 10.2.700
Epicor ICE 3.2 Tools User Guide Index

executive query examples 1257, 1258 how it works 546


export and import dashboards 1089
export datasources 415
export definition 1089
I
export query data 197 import compatibility 887
export query definition 177 import datasources 417
extend first condition 730 import definition 1091
external business activity queries 402 import query definition 179
external datasource maintenance 402 import user rights 886
external datasource metadata maintenance 420 intersect and except subquery type 348
external method, attach 875 invoke bo method 592
external method, build method 875 invoke BO method, bpm case study 786, 787, 789, 790, 791,
external method, deploy 875 795, 800, 805, 806
external method, test method 879 Invoke external method 590
external methods 862

L
F
labels 606
field attributes editor 106 labor summary baq 205
field help 24 list of conditions 597
field mapping 1253 locate the object of the directive 551
fill table by query 625
fill table by query, bpm case study 786, 787, 789, 790, 791, 795,
800, 805, 806 M
filter dashboard data 1127
filter, apply, subscribe, published order, line number 1053 mandatory field, bpm case study 725, 727, 728, 733, 735, 737,
flow chart 596 738, 741, 744, 745
method arguments 864
method directives 543
G mobile access rights 1111
mobile dashboard device, deploy 1120
gauge view, add to dashboard 1020 mobile dashboard, home page 1124
general principles 557 mobile device dashboard, create 1112
general properties 135 mobile device dashboards 1111
general query properties, modify 975 mobile menu maintenance 1123
global alert 916 mobile navigation, define 1115
global alert data directive 919 modify field properties 425
global alert groups 936 modify query properties 975
global alert setup 916 multi threaded save 1079
global alert setup, email 916 multiple dirty rows 630
global alert setup, shortcut link, base 918
global alert, setting up standard 929
global alerts, setting up custom 941 N
grant rights to modify a query 183
grid properties - add image column to grid based on rule, modify named search, create 494
999 named search, details 498
grid properties - add rule to highlight cells, modify 995 named searches 494
grid properties - change grid display, modify 985 named searches, auto load search 502
grid properties, modify - filter, apply to grid 990 named searches, auto populate data 500
grid properties, modify, display columns, change, group by, new business activity query 30
summarization in grid, enable 982 new grid view, add to dashboard 991
groups 882 new web part page, create 1141
not clocked out baq 213

H
O
hold type maintenance 538
hold type maintenance – how to use 538 operation specific filters 68
hold type, bpm case study 746, 748, 750, 753, 754, 757, 758, other 609
760, 762, 764, 765, 768, 770, 772
holds 538 P
how bpm works 548
how executive dashboards work 1245 parameters 577

10.2.700 1307
Index Epicor ICE 3.2 Tools User Guide

phrase build - add table 33 searches, default features 466


phrase build - function call parameters 69 searches, hot key 469
phrase build - pivot subquery for clause 72 searches, quick 471
phrase build – additional controls 35 secondary query, add to display line item shipment information
phrase build – filter values 55 1049
phrase build – subquery criteria 51 select and create columns for display 208
phrase build – table criteria 46 select baq display columns 307
phrase build – table list 44 select columns 301, 305, 362, 367
phrase builder – table relations 36 select columns for display (not clocked out) 215
predictive search 515 select columns set operator type subqueries 86
predictive search, activate 515 select display columns - toplevel cte innersubqueries 82
predictive search, create 521 select report data 1035
predictive search, source baq 517 select value(s) of field from specified subquery 67
predictive search, test 523 send e-mail 617
primary directive 631 service connect workflow 862, 869
process link properties 1026 set argument 624
process link, add for customer entry 1026 set bpm data field 621
process set (save to) 1255 set by query 622
process set (schedule) 1267 set field 623
process set (verify) 1272 setters 621
process set maintenance 1247 show message 619
programming action signatures 872 simple updatable baq 218
programming interface generator form 865 sort order 118
publish 1052 specified constant 57
publish and subscribe functionality 1049 specified parameter 59
ssrs report options 437
standard execution flow 549
Q standard global alert, alert group 935
query fields, publish 1052 standard global alert, alert group, activate 936
query properties - publish to title bar, modify 977 standard global alert, alert group, add person to group 938
query properties – apply filters to query, modify 979 standard global alert, alert group, assign person to team 939
query, add 970 standard global alert, alert group, create group 937
quick search tab 482 standard global alert, alert group, test 940
quick search, activate 472 standard global alert, specific recipient 929
quick search, context menus 484 standard global alert, specific recipient, activate 930
quick search, create 472 standard global alert, specific recipient, sales order 932
quick search, criteria 476 standard global alert, specific recipient, test 933
quick search, default program 485 standard global alert, specific recipient, work force 931
quick search, detail sheet 473 standard system dashboards 959
quick search, display 482 standard template workflow 150
quick search, test 481 subquery list 131
quick searches 471 subquery options 121
subscribe 1053
system queries 27
R
raise exception 616 T
recompile a directive group 889
remove data tag 607 table relations - manually connect tables 41
remove holds 609 table relations - predefined dictionary relations 38
report link, add to dashboard 1045 test the baq 309, 345, 371
report options 1030 test the results (baq combo) 385
retrieve external tables 421 test updatable query 165
review bpm holds 542 the chart properties window 1004
run bpm designer 184 the chart view 1004
the dashboard browse 1061
the gauge properties window 1020
S the gauge view 1020
the general sheet 30
schedules 1246 the grid properties window 982
search interface, default 466 the grid view 982
search options, override 505 the process link 1026
searches 466 the query builder 33

1308 10.2.700
Epicor ICE 3.2 Tools User Guide Index

the report view and report link 1030 updatable field editor 140
the tracker properties window 1011 updatable mobile dashboards 1131
the tracker view 1010 updatable query settings 135
the url/xslt view 1023 updatable query, set up 1158
trace log, client 898, 901, 904 update a directive group 887
trace log, server 906 update and create supplier records 222
tracker view, add for advanced search 1011 update processing 143
transmission rules 572 update table by query 627
troubleshooting actions 898 update table, bpm case study 807, 808, 809, 811, 813, 815,
817, 820
URL link, add to display customer website 1023
U URL query phrase subscribers 1135
updatable baq 1157 url/xslt properties 1023
updatable baq method directives 545, 1230 use except subquery type 356
updatable baq method directives, actions 1230 use table list 424
updatable baq method directives, default data 1231 user rights 133
updatable baq method directives, define action 1236 using business process management 549
updatable baq method directives, get methods 1233 using inner subqueries 299
updatable baq method directives, post-processing directive 1234 using variables tab 573
updatable baq method directives, publish data 1231
updatable baq method directives, select action 1235 V
updatable baq method directives, test) 1240
updatable baq rights 1155 validate directive 562
updatable baq, analyze 1173, 1177 validation 584
updatable baq, fields 1161 variables 577
updatable baq, properties 1160 variables, context menu 585
updatable baq, update processing 1166, 1168 variables, directive 577
updatable baqs, regenerate 1205 view system queries 27
updatable business activity query 132 views, arrange within SharePoint page 1147
updatable dashboards 1207 views, reusing 1081
updatable dashboards, contact grid properties 1220
updatable dashboards, create 1208
updatable dashboards, customer grid properties 1212
W
updatable dashboards, customer query 1209 web dasher 1152
updatable dashboards, test 1225 web page, modify 1143
updatable dashboards, tracker view 1223 where-used 171
updatable dashboards, updatable contact query 1215

10.2.700 1309
Index Epicor ICE 3.2 Tools User Guide

1310 10.2.700
Additional information is available at the Education and
Documentation areas of the EPICweb Customer Portal. To access
this site, you need a Site ID and an EPICweb account. To create an
account, go to http://support.epicor.com.

You might also like