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

Setting Up App-to-

App Interactions
Hands On Exercises
Disclaimer
This document is for informational purposes only and is subject to change without notice. This document and
its contents, including the viewpoints, dates and functional content expressed herein 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 account manager. 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. We welcome user comments and reserve the right to revise this publication
and/or make improvements or changes to the products or programs described in this publication at any time,
without notice.

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 standard 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 local laws or 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 ® is a registered trademark and/or trademark of Epicor Software Corporation in the United States,
certain other countries and/or the EU. All other trademarks mentioned are the property of their respective
owners.

Copyright © 2021 Epicor Software Corporation Epicor.

All rights reserved. No part of this publication may be reproduced in any form without the prior written consent
of Epicor Software Corporation.
Setting Up App-to-App Interactions

Table of Contents

Setting Up App-to-App Interactions 4


Introduction 4
Learning Objectives 4
Prerequisites 4
Tips and Tricks 5
Environment Setup 5
Accessing Kinetic 5
Logging in 6
Refreshing the database 6
Exercise 1: Build Query and Report 7
Building a query to get part details 7
Creating a BAQ report 9
Setting up report filter 10
Exercise 2: Create Kinetic UI and Deploy to a Menu 12
Generating the report UI 12
Adding report application to the menu 13
Configuring report style 15
Designing report layout (optional) 17
Exercise 3: Set Up Part Label Printing in Job Entry 20
Job Entry: Adding launch button and event 20
Print Part Label: Adding events to process incoming data 23
Testing the interaction 26
Summary 29

3 December, 2021
Setting Up App-to-App Interactions

Setting Up App-to-App Interactions


Introduction
In this course, you will see how you can call another application from your application, as well as
exchange data between parent and child data views.

Imagine that we need to print a label for a part produced in a job. That label can include details on
part, job, customer, etc. In this example, we will just print current job part number and description.

To do this, we will first create a custom query and BAQ report - Print Part Label, generate a Kinetic UI
for it, and design its style. Then we will modify Job Entry (the parent application) by adding a control
that would call Print Part Label and pass the current part number to it. Finally, we will modify the
report to receive the value sent from Job Entry and automatically set the appropriate filter.

Learning Objectives
After completing this course, you will be able to:

l Create a BAQ report based on a user-defined query


l Generate application for a BAQ report
l Set up app-open action to call a child application
l Configure the child application to receive and process data incoming from the parent app

Remember! What you see, you remember, but what you do, you understand.

Prerequisites
l Product version 2021.2.
l Designing report style requires Microsoft Report Builder installed on your device.
l Your user account must have:
o SSRS Report Designer option enabled to design report layout
o Security Manager rights to add new menus
l The following tools programs are available in smart client only:
o Business Activity Query Designer
o BAQ Report Designer

4 December, 2021
Setting Up App-to-App Interactions

o Report Style
o Menu Maintenance

Tips and Tricks


If you are a new user or you have been using the application for years, you might benefit from using the
following tips and tricks as you go through the course:

l Whether you are interested in a particular field, check box, or program, use the Application Help
that you launch from within the system.
l Work with fully expanded programs. This enhances visual experience and prevents incorrect
selections.
l Properly read the workshop descriptions so you know what follows.
l Take your time and do not rush.

Environment Setup

Accessing Kinetic
While you can use a web (browser) or smart (desktop) client to access Kinetic interchangeably, some
system management programs are only available in Classic UI. The course instructions will guide you to
launch the desktop client whenever you need to use such program.

In all other cases for the best user experience, we recommend using a Kinetic browser client. Choose
any of the two options below to open Kinetic in a browser:

l In the smart (desktop) client from the Home Page, go to the User menu and select the Open
Kinetic in Browser option.

The system automatically launches the Home Page in your web browser. Note that you may be
required to re-enter your user password to log in.

l In the web browser, directly enter the URL of your Home Page using the following format:

5 December, 2021
Setting Up App-to-App Interactions

https://[ServerName]/[KineticInstance]/apps/erp/home/ - for example, https://sfo-


euvm.local/Kinetic2021_2/apps/erp/home/.

On the Kinetic login page that displays, enter your credentials.

Supported browsers
Make sure you use the latest version of any browser from the list below:

l Microsoft Edge®

l Mozilla Firefox®

l Apple Safari ® (for Mac OS ®)

l Google™ Chrome

Logging in
l Log in to the training environment using the epicor/epicor credentials.

l Make sure you are logged into the Epicor Education Company/Main Plant.

l If you are a cloud-based Kinetic customer, then note the following about your Epicor-hosted
education company. All logins referenced in the course (such as manager, or epicor) should be
prefixed with the <site ID>-. For example, if your site ID is 98315, then wherever you are
instructed to use the login epicor, instead use 98315-epicor. The password is 'Train18!'.

Refreshing the database


l We recommend refreshing the database before starting the course.

6 December, 2021
Setting Up App-to-App Interactions

Exercise 1: Build Query and Report


In this exercise, we will create a custom report that we will use to print part labels. We can use this
report as a standalone application to print labels for any parts in the system, but in this example, we
will launch it from Job Entry to print just one label for the current part in the job.

Building a query to get part details


In this step, create a Business Activity Query (BAQ) to get part data from the database. It will be very
light and quick to execute.

1. In smart client, open Business Activity Query (BAQ).


2. In the Toolbar, press New to add a new query.

3. For Query ID, type in XX_PartDetailsForLabel where XX are your initials.

Take note of the query ID - XX_PartDetailsforLabel, you will need it to configure


the report.

4. Add a Description - for example, Part details for printing labels from job.
5. Select Shared and All Companies.

7 December, 2021
Setting Up App-to-App Interactions

6. Next, go to the Query Builder tab and on the Tables panel, select Erp.Part.
7. Double-click on Erp.Part to add it to the design canvas:

8. On the Display Fields tab, choose PartNum and PartDescription fields:

9. Finally, go to the Analyze tab and press Test to verify the query results:

8 December, 2021
Setting Up App-to-App Interactions

10. Save the query and exit Business Activity Query Designer.

Creating a BAQ report


In this step, use the new query to build a report.

1. Open BAQ Report Designer.


2. In the Toolbar, press New to add a new report definition:

9 December, 2021
Setting Up App-to-App Interactions

3. In the Report ID field, enter XXPrintLabel where XX are your initials.


4. Add a Description - for example, Print part label from job.
5. Press BAQ ID and select the XX_PartDetailsForLabel query.
6. For Form Title, enter Print Part Label.
7. Keep all other defaults and save your definition. Stay in the designer.

Setting up report filter


In this step, we will add a filter that limits the part records we select to print. We will also use this
filter to receive part number from Job Entry.

10 December, 2021
Setting Up App-to-App Interactions

1. Go to the Filter tab, then from the New drop-down in the Toolbar, select New Filter:

A new line is added to the Report Filters grid.

2. From the drop-down in the Filter column, select Part_PartNum and press Tab.

All other columns automatically fill in.

3. Save the report definition and keep the designer open.


Continue building and designing the report in the next exercise.

11 December, 2021
Setting Up App-to-App Interactions

Exercise 2: Create Kinetic UI and Deploy to a Menu


We will use this report both as a child and standalone application. To access this report, add it to the
Menu. In this exercise, let's generate a user interface (UI) for the report and add a menu item for it.

Generating the report UI


1. In BAQ Report Designer, make sure the PrintPartLabel definition is open, then from the Actions
menu, select Preview Application:

This action automatically generates files for the report application on the server.

The application ID that you will need to specify for the menu, as well as for app-
open action in Job Entry, generates in the following format: Ice.UIRpt.
[ReportDefinitionID] - in this example, Ice.UIRpt.XXPrintLabel.

2. Review the report application that pops up:

12 December, 2021
Setting Up App-to-App Interactions

3. Close the preview.


4. Save the report definition and exit BAQ Report Designer.

Adding report application to the menu


In this step, let's add the report to the menu.

1. Open Menu Maintenance.


2. In the navigation tree, go to Production Management > Job Management > Reports.
3. Select the Reports node; from the New drop-down in the Toolbar, choose New Menu:

Use the Detail page to add the new menu item.

13 December, 2021
Setting Up App-to-App Interactions

4. Set up the new menu item like this:

l For the Menu ID, enter UDXXPPL where XX are your initials.

l For the Name, type in Print Part Label. This name displays on the menu.

l Keep the default Order Sequence (0), this way it will be on top of the report list.

l Select the Kinetic App Program Type.

l In the Program field, select Ice.UIRpt.XXPrintLabel.

5. Save the new menu item.

6. Close and relaunch Kinetic.

7. To verify it's in the menu, on the Home Page, search for 'xx print' where xx are your initials:

14 December, 2021
Setting Up App-to-App Interactions

Configuring report style


In this step, let's create a custom report style.

1. Open Report Style.


2. Press Report ID to search for and open the XXPrintLabel report where XX are your initials.
3. Go to the Styles > Style Detail > Detail tab that displays the default style.
4. Then, in the Actions menu, select Copy Report Style:

15 December, 2021
Setting Up App-to-App Interactions

On the Report Copy Location dialog that pops up, select Copy again.

5. Open the style copy and change its description to PrintLabelFromJob.


6. Go to the Companies/Images tab and set the new style as a default for the Epicor Education
company, or other company that you currently use:

7. Save the new style.


8. From the Actions menu, select Download SSRS Report.

16 December, 2021
Setting Up App-to-App Interactions

9. Select a location on your machine and save the report layout file.

When you download a report to a target folder, the system creates additional
folders under it - \reports\CustomReports\. For example, if you choose to save
the report file to your C:\ drive, the path for the report will be
C:\reports\CustomReports\.

10. Keep the Report Style program open.

Designing report layout (optional)


In this step, we will use Microsoft Report Builder® to design the report page layout.

This optional step is not required to demonstrate how the two applications interact.
Complete it for the full scenario experience.

If necessary, download Report Builder from the Microsoft® site here.

1. Open the report in MS Report Builder.

2. Remove Page Footer and Page Header by right-clicking each element and selecting the Remove
option:

17 December, 2021
Setting Up App-to-App Interactions

3. Reduce page width; then in the Main menu, go to Insert > Table > Insert Table:

4. Click anywhere on the page layout; this adds a default table to the layout.

5. Select this table and right-click in the top left square:

6. On the Properties panel, in the DataSetName drop-down, select BAQReportResult.

If you don't see the Properties panel, you may need to go to View in the Main
menu and select the Properties check box.

18 December, 2021
Setting Up App-to-App Interactions

7. In the first Data column, right-click the blue icon to bring up the available fields and choose
Part_PartNum.

8. In the second Data column, select Part_PartDescription.

9. Change the headers to just Part and Description.

10. Remove the third column.

Your layout should look similar to this:

11. Save the file and exit Report Builder.

12. Return to Report Style. From the Actions menu, select Upload SSRS Report.

13. Select the same location you previously chose for file download - for example C:\.

14. Once the report successfully uploads, save the style and exit the program.

We are now done with setting up the child application. Move on to Exercise 3 where we will start
working in Application Studio.

19 December, 2021
Setting Up App-to-App Interactions

Exercise 3: Set Up Part Label Printing in Job Entry


In this exercise, you create a layer for Job Entry that contains a new button that launches the Print Part
Label report with a preset filter based on the current job part. We will also add a layer to the report
that contains additional logic to accept the part number value passed in from Job Entry.

Job Entry: Adding launch button and event


In this step, we will add a component (a button) to the Job panel card on the Job Details page. We will
also link an event to it that will open the print report and pass the current part number as a 'value in'.

1. From Home Page, launch Job Entry and open Application Studio.
2. In the top-right corner of the screen, press the <NewLayer> link and create a new layer:

l For Layer Name, type in XX_PrintPartLabel where XX are your initials.

l Add a Description - for example, Print part label from job.

l Press Save Layer.

3. Open the Details page layout and select the Job panel card.

4. From the Toolbox > Components tab, select a Button and add it to the header of the Job panel
card.

20 December, 2021
Setting Up App-to-App Interactions

5. Edit the newly added button properties like this:

l Change the default Id to btnPrintLabel.

l Change the Label to Print Part Label.

l Expand the Behavior property group and press On Click to generate a new event linked to
this button.

The event gets created:

21 December, 2021
Setting Up App-to-App Interactions

Let's keep the auto generated event ID - btnPrintLabel_OnClick.

6. Go to Toolbox > Actions, select the app-open action and add it to the flow.
7. On its Properties panel, drill down to Basic > Parameters and configure the button like this:

22 December, 2021
Setting Up App-to-App Interactions

l In the View field, enter the report application ID - Ice.UIRpt.XXPrintLabel.

l In the Print Part Label report, we will create a separate layer that interacts with Job Entry.
Call it XX_PrintFromJob where XX are your initials. Enter this ID into the Layer field.

l Select the Slide Out option. This will open the report in a sliding panel. If you don't select
this option, the report will open in a separate window.

l In the Who Launched field, enter the ID of the parent application - in this case,
Erp.UI.JobEntry.

l Press Edit in the Value In field to define what data passes into the child application.

In the JSON EDITOR that pops up, enter the following code:

{"Filter1" : "{JobHead.PartNum}"}

Instead of Filter1, you can name this parameter anything you want - for
example, PartFilter. You will need to specify this ID in the report-side
logic.

{JobHead.PartNum} - is the part number of the current job record.

8. Save your layer and exit Application Studio.

Print Part Label: Adding events to process incoming data


In this step in the Print Part Label report, we create an event that maps the incoming value from Job
Entry to the Filter1 field of the report. We will also add a before event to the base initialize event that
in its turn is called from the GetNewParameters event. By adding that extra logic we will make sure the
report properly identifies the context for the incoming data.

23 December, 2021
Setting Up App-to-App Interactions

1. Launch XX Print Part Label and open Application Studio.


2. Add a new layer. In the Layer Name field, enter the ID we created in Job Entry - XX_PrintFromJob
where XX are your initials.

3. Add a new event; on the sidebar menu, go to Events and press .


4. Name it as SetPartFilter.
5. On the design canvas, select the No Trigger widget and edit its properties like this:

l Type - Event

l Hook - Before

l Target - initialize.

Whenever the base initialize event is called in the application, the SetPartFilter event will
automatically run first.

6. Now, on the Toolbox > Actions panel, select condition and add it to the flow.
7. On the condition properties, go to Advanced > Param and enter the following expression to
initialize the context:

context && context.initialValueIn && context.initialValueIn.ValueIn

8. Press the True option; from the Select an Action panel, select the row-update action.

24 December, 2021
Setting Up App-to-App Interactions

9. Select the row-update action on the canvas and edit its properties:

l Go to Basic > Parameters and press to add a new parameter.

l Select Columns and press again to activate column properties.

l In the Ep Binding field, select ReportParam.Filter1. This is the field on the ReportParam
view that we will update with an incoming value.

25 December, 2021
Setting Up App-to-App Interactions

l In the Value field, press Edit (the pencil icon) and enter the following line into the
JSON EDITOR:

"%session.context.initialValueIn.ValueIn.Filter1%"

This code uses the specified context to pass the Filter1 value from Job Entry. We will
define this context in the next steps.

10. Save and publish the layer.

Publish the layer to make it available for calls - in this example, from Job Entry.
Apply the layer to the menu if you wish to use this configuration when you
open the report as a standalone application.

11. Exit Application Studio.

Testing the interaction


In this step, test the interaction between the Job Entry and Print Part Label applications.

1. Open Job Entry and from the Overflow Menu, select Application Studio.
2. Press <NewLayer> and select Change Layer.
3. Open the XX_PrintPartLabel layer where XX are your initials.
4. Select Preview.
5. Open any job record.
6. On the Job details page, press Print Part Label.
7. Note the Print Part Label report displays in a sliding panel. In the Filter card, the part number
from the current job record is selected.

26 December, 2021
Setting Up App-to-App Interactions

8. Use Print Preview to download the report PDF or use Client Print to directly send the report to a
client printer.

l To make your layer available to all users in your company, from the
Application Studio Overflow menu, select Publish. Then, go to Menu

27 December, 2021
Setting Up App-to-App Interactions

Maintenance, and select the Job Entry menu item. Press Customization
and move the Print part label from job layer to the list of Selected
customizations. Save and restart Kinetic.
l To print directly from a browser, install Epicor Edge Agent. Learn more
about that in Application Help.

You have successfully completed all three exercises.

28 December, 2021
Setting Up App-to-App Interactions

Summary
In this course, you learned how to:

l Create a BAQ report based on a user-defined query


l Generate application for a BAQ report
l Set up app-open action to call a child application
l Configure the child application to receive and process data incoming from the parent app
We love feedback! Once you have closed this course and you are back on the Course Details page,
please use the Feedback button to let us know how well this course met your needs and
expectations. Thank you.

29 December, 2021

You might also like