NOT a lost cause - a function for new labor dtl with no code

Yeah I love time bombs. I had one cooking (built by someone else) that was a wicked labor reporting customization, super sharp, but little did we know it was not updating in the proper fashion so it was unintentionally reversing backflush transactions for an unrelated job and operation. Whoops! I know I have some of my own that I created too, I just didn’t know it at the time.

YES! That is what I find so difficult. That is why these other methods that are checking for different data might not come into play with the scenario that I traced out or the business process that we follow now… but if the process changes I would imagine the BPM would have to too! Otherwise you could be messing things up or it just doesn’t work anymore.

All of this to try out a function using REST like Wonsil challenged us to do.

I have to now figure out how to turn on REST v2 and then I will build my function for inventory transfer based on the BPM I made.

Loving this post @JasonMcD Thanks for linking the posts that helped you cause they helped me too. Thanks @Banderson for your original post and for your comments here!

1 Like

:scream:
Now I am frantically looking through our system for the bombs.

REST V2 is on by default all you need to do is enable API keys and such.

I have no idea if there are any :woozy_face: If nathan bonner can make them so can I @jdewitt6029 so I wouldn’t be surprised if something I did had an adverse affect on something that wasn’t noticeable right away.

Thank you Jose! I will enable the keys then!

How do you get the execute custom code in the callers section? I only have invoke bo method and invoke function.

You have to predict the future, lol.

When you create the function, you have to deliberately create a new “widget function with code.”

And you may need to check a box on the library, give yourself permissions, etc.

You can literally copy and paste the widgets from the non-code function to the code-able function, though, so all is not lost.

As an update, this function is actually in use every day here as part of a time-entry PowerApps app I made. As of next Monday, it is the only way they are allowed to do time entry here. No paper time cards, no DMT.

So again, thank you to all who made this easy enough for me to understand it! @josecgomez @Banderson @Mark_Wonsil

3 Likes

Is it possible to turn a existing function into one with code without recreating it? I tried to paste the execute custom code into my existing function without code and got this

I think you are going the opposite way that you need to.

  1. Open non-code function; copy all widgets
  2. Open code function and paste widgets
  3. Add custom code block, connect it in, etc.

And of course there is a step zero before all that - create the code function (the header/signature) with all of the inputs and outputs

Or, you know, use the @ckrusen method of automatically binding 283 fields… No code required.

Yeah I tried that and got a ton of compile errors

Blake,
Looks like that error message might be related to your user account. Do you have “BPM Advanced User” permissions on your user account?

image

Well I now know your pain. What is the deal with this one?! It wants an update every time!

Did you find an easier way to set the bins, etc.? Do I even need these objects just to set the bin?

Don’t let @hkeric.wci see this widget mania.

No, I had to keep those rowmods in there. Haso was explaining why in another post and that’s one reason why he doesn’t use the widget approach.

-Utah

2 Likes

Indeed. He even borrowed your picture.

Yeah, you’re baiting me into rehashing that and I am doing all I can to resist, but anyway… That is insane. OK, confirmation is what I wanted and I got it. Thank you.

#Widgets4Ever

EDIT:

Hey future readers of this thread, this Jason from the future (but still your past). :crystal_ball: :ghost:

If you came to this post to learn how to make an EFx without code, I am proud of you!

But I want you to know that after this reply here, we get into a lengthy discussion of why using widgets is great or a waste of time. So to save you time, if you just came to learn, you can probably stop reading now. But if you want to hear the discussion, read on.

I’m not trying to be a contrarian here, but it would seem to me that custom code would be easier to understand if you’re doing any type of logic/calculations than all the widgets. I see the push to “no code”, I don’t really understand what is being gained by going the all-widget route. If I have code, I can copy/paste it into my favorite editor and review/modify it pretty easy. With the widgets, I’m having to click on each of them individually to see what’s being set on any particular widget.

My guess is there’s a good reason for the no-code route - I’m guessing I must’ve been absent the day it was explained. Any feedback would be appreciated.

Thanks.
Kevin Simon

1 Like

Oh yes.

Kevin,

Based on my understanding… it all depends on the use case.

-Utah