Loading a Record on Launch of UDXX Form

Throwing this out here,
Has anyone ran across a reliable way to Auto Load a specific Record (passed in via the LFO) into the UD Form?
I’ve tried every trick in the book and nothing seems to work reliably. The latest attempt is using a timer… shudder

1 Like

In form load would you not just call oTrans.GetByID(“param1”,“param2”,etc …) Params being passed from LFO

thanks Dan I should have said I’ve tried all the standard tricks.
I can run GetByID and InvokeSearch and all that it works fine (record loads) and then it immediately clears.

There’s something funky with this UD Forms that makes them clear after… I can’t seem to figure out what.

You’re the expert here, but have you checked the trace files after your customization to see if there’s anything else happening after your calls?

Embrace the System.Timer :rofl:

image

1 Like

Hi Pedro, yes it is not a tracing issue. it works fine if I put it in a button click the issue is some “magical” event I couldn’t find.
However I was telling @jgiese.wci about it (complaining) and he tried it on his side (same issue) but he finally figured out what the problem is.
Epicor in it’s infinite wisdom ALWAYS processed the LFO on the EpiBaseForm (Below the current UDXX implementation). The issue was that I’m passing the ValueIn into my LFO and I am Parsing / and loading the record.
Then Epicor on their own EpiBaseForm (Loaded) event, sees that my LFO has data in the ValueIn and decides to Parse it Themselves. Which doesn’t work because my ValueIn string doesn’t conform to the standard format they are expecting. So the search returns NULL and clears the screen.

A BIZILLION Pioints to @jgiese.wci for being my second pair of eyes. Got it to work by not using ValueIn and instead passing the value in ContextValue property.
image

2 Likes

Embrace the System.Timer

1 Like

So what was the fix, clear the LFO when you were done with it?

No I used ContextValue instead of ValueIn.

1 Like

He just needed someone to take a step back and look at it from another angle. It’s ok @josecgomez these things happen. Until another day!

image

There goes that head :joy:
image

2 Likes

Would someone please give me the code to call the UDXX form from an Epicor form via a button and the code on the UDXX form side to populate the fields on the UDXX form and read the data based on the passed fields automatically after the form loads?

Thank you!
Richard