Reading values passed in URL to application

Hi there!

I am attempting to have a value passed in to an application that I build via the URL - this would be useful as I can provide a link in an email that will take a user directly to the entry.

Currently, I have attempted the following:
image

Value:

"%session.context.initialValueIn.contextValue.adjID%"

However, I am receiving an error:
image

I have also attempted to create a condition that first checks if the value is ‘undefined’ before trying to update TransView with the value, but I believe that it simply doesn’t recognize the ‘adjID’ context at all.

What is the proper way to do this? I would like to be able to pass a value in the URL such as:
image

I can’t seem to figure out how Epicor handles this in their applications as well.

where is this ‘deep linking’ coming from?

Look at the Share button in the overflow menu. It will generate the deep link.

image

2 Likes

This link does not work for my use-case - I have built this application fully from scratch using UD02.

For example, if I generate this deep link after going to ID 15 manually:

Then the link will not take me to ID 15 in my application - this will take me to the regular landing page of my application:

I am looking to pass the ID within the URL - this ‘share’ button seems to generate just a regular link to the base application.

How does Epicor declare variables that can be included in the URL?

Can you paste an anonymized link here? I get the landing page when I try to create my own but the share one goes to the correct record…sometimes. Maybe it’s app-related and some work while others don’t? :person_shrugging:

1 Like

https://cadcentraldtpilot**.epicorsaas.com/SaaS********/apps/erp/home/#/view/LQtAdj01?channelid=12b88fe4-9934-49c9-a809-c454&layerVersion=0&baseAppVersion=0&useBroadcast=1&company=*****&site=Main

Attempted to anonymize - not sure if channelID matters so I redacted some characters from there.

It is a fully custom app so this is definitely the issue - from what I can see from Epicor’s purchase order entry is, for example, they have directly in the URL TransView.PONum=16487
example end of URL:
&site=Main&pageId=Details&KeyFields.PONum=16487%60&pageChanged=true

Then, inside the application the only functionality that I could find around this is:
image
image
Trying this exact same thing does not work in my application. Additionally, I have tried adding KeyFields the same as them and initializing the value to 0 on_load as they also do this prior to the setIDFromValueIN being called.

Though, after tracing there is no calls to this event whatsoever
image

Expanded:

To me, it appears as though this value is ‘magically’ being set.

1 Like

Use-case,
I have a BPM called on post-processing of an update on the UD02 table I am using that to send an email notification:

I would like for this link in the BPM email to carry the ID = 19 over to the application.

1 Like

TL;DR; →

If there is not a dataview called KeyFields, then make one, and add your column.
If it is, just add the column.

If you had to create it from scratch, Initialize it with either after form load, or create an event to on window.onload.

The pic to set it is in that post or here →

then

image

1 Like

Kevin to the rescue once again!
I was certain that I had tried this exact thing - but will give it a shot right now :slight_smile:

Will update with results.

1 Like

I learned everything I know from @hmwillett :rofl:

6 Likes

On window load:
image

Data View:
image

To display for testing:

URL:
image

Result:
image
:frowning:

did you add the column to the dataview?

No, dataview is empty.
Copied what was shown in the post but I will attempt with the column added

Apparently, there’s a whole video of me demoing and setting this up out there in the wild. Who knew?

8 Likes

1 Like

Still nothing

Marking Hannah’s video as solution as I already know that if I follow this then I will get it working :laughing:

Looking forward to 45 minutes of learning!

Listening to 45 minutes of me yammering with a cold. I can think of better things to do. :rofl:

3 Likes

Just curious if you ended up getting this working with that video?

1 Like

Will be working on this today - I’ll follow up in the post,
Had a long weekend here in Canada :grinning_face:

2 Likes