Let's Get Funcy - Epicor Functions

Well I have a few more 500 tricks but need to scope 600 so I can circle around to some more dog and pony shows…

1 Like

@Bart_Elia Is Serilog logging only supported with Task Agent or will other things support it as well. Specifically Multi-Company, Posting Engine and MRP?

1 Like

Only Task Agent at this time.

1 Like

it will be handy to mark BAQ as internal or whatever meaningful, to ignore the security overhead checks.

this way when baq call made in script editor, performance maybe on par to BOReader?

1 Like

For posterity, dont make the same mistake I did…

When simply clicking the NEW button on a library, it will create a" function WITHOUT code block". So dont freak out when you dont see a code block in a designer after making this mistake haha, (Note the different icons)

3 Likes

I have good company then. The FIRST time I used Functions in an early internal POC, I made the same mistake.

3 Likes

Can these be called from a configurator?

2 Likes

Likely not here on first release from a widget standpoint, but if not at the least you could call it from rest or some really really fancy reflection code.

1 Like

Reflection is banned*, and if you try to circumvent it by coding directly in the xml file importing is blocked… I have tried.

How can I make REST calls from a configrator?

  • Explicit reference to System.Reflection is blocked, though you can still do things like GetType().GetProperty or GetType().GetMethod
1 Like

I’m not super familiar with configurator but if you can use custom code at all you would be able to make the rest call. This sort of thing

var client = new RestClient("http://{{Host}}/api/v1/Erp.Bo.SalesOrderSvc/SalesOrders");
var request = new RestRequest(Method.GET);
request.AddHeader("Postman-Token", "c55691ca-dbaf-4a4b-ac3f-726a205091cc");
request.AddHeader("cache-control", "no-cache");
request.AddHeader("Authorization", "Basic [token]=");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
1 Like

Custom code is allowed on client side, but only base c#, no references. I could do that in a customization but not a configurator. There is a web browser control though, I wonder if I could hack that to make REST calls.

1 Like

lame

3 Likes

I hope that it’s vNext. Configurator is a big UD Method/Function user base. I curious to know what the Kinetic configurator is going to look like. :thinking:

Separately, I’m wondering when we’ll get BAQ access to PCInputValues. (Pinging @Rich) I just lost configured opportunities to SalesForce because I can’t report on it. I’m holding them back but it’s just a matter of time before we have two part configurators to maintain. :frowning:

3 Likes

Yes, I was very excited when I saw the thread title as I hoped it would help solve some of the painful configurator organization / restriction issues I have.

You don’t happen to use ECC with your configurators do you? If so could you take a look at this thread?

1 Like

Sorry. We do not use ECC. Nobody puts a million dollar metrology solution into a shopping cart. :rofl:

2 Likes

@Mark_Wonsil - I thought we discussed this. There is a way if you can use an external query that redirects back into your E10 DB and uses the view that Epicor provided. Can you do that with your current cloud situation?

1 Like

It looks like even us MT users are allowed to use custom code in these new functions…

DB access is limited to read only – does that mean we can still update the database through BO’s or is it totally locked down so that you can’t even update via BO’s?

1 Like

I don’t know about DT, but I can’t create external BAQ’s at all.

1 Like

Can call BOs as usual. There isn’t the standard DB context available with the way functions are designed so it limits those options. It makes sense functions could conceivably be called where there is not context.

1 Like

@MikeGross

No External BAQs and can’t create views in SaaS.

1 Like