Function

That would be the third report I have made in the past couple of weeks :rofl:

1 Like

Season 2 Nbc GIF by Manifest

6 Likes

You’re well short of the record. Keep trying!

2 Likes

I think I am figuring out my function. Can you guys suggest what the best way to test it would be? And also how would you print a message from within the function. I am using a custom code function.

I can’t in good conscience not say something before you just recreate the previous logic.

You still haven’t explained why this is necessary in the first place.

We may be able to help you fix the underlying issue.

As for testing your function, you can promote it and test from the Rest Help Screen.

https://yourserver/server/api/help/v2/

(Add an output variable and fill it with messages.)

1 Like

I get that all the time when opening clients from the browser. I think the tokens used for authentication expire after about an hour if you have the module opened for that long.

Ok, think I finely fount the reason we did tiles. Epicor doesn’t code these entries correctly, so we have to correct then for the DD file that we generate and upload to our bank.

1 Like

I generally send in the output variable from the subsequent update/getnew/etc method directive by calling the function from the desired method directive… but as everyone has summed up so far, need to know what you’re trying to do to be able to help. Are you trying to do this on a button click? Could this be handled as records are originally saved in a BPM or is this only ran manually for some specific reason?

It feels like you’re rewiring the original tables. PreEmpDed only has ‘C’ or ‘S’ BankAcctType records already, so these seem unnecessary unless you’re somehow direct sql storing something else in there. If it’s because the screen shows something else, data displayed isn’t always the same as data stored - some fields have a different Display vs Value visually.

This feels like it should already be taken care of by standard logic. We don’t use the module ourselves but I don’t know why they’d let you save a deduction with zero value. Unless, again I’m scared you’re creating these records manually in sql.

You’re setting a base Epicor ID field equal to a custom field. Not familiar with the business object, but it’s referring to a PayTypeID which is bound to 5 specific values. Unless you’re doing a clever calculation here to originally set your PROTCode_c, you could just set it originally or you’re trying to bypass the PayTypeID restrictions with custom values. Very dangerous to do this without running in through the proper business logic and not really supported / condoned if the latter. Many times Epicor is running additional logic in the background that isn’t as simple as Adding/Removing/Updating a single sql record.

What you originally posted screams “direct sql manipulation” to me which from my understanding would/could void your maintenance agreement. From what I see you’re trying to do, without knowing fully the background of what endpoint you’re trying to reach, it feels this could be done in an Update data or method directive on the PRChkDtl table alone. As far as calling BO’s in functions, I recommend calling using the service contracts that Kevin taught me about last year, they’re a life saver. :smiley:

What is this in reference to? It feels like you’re having half of the conversation outside of this thread.

2 Likes

This is a button and on the o click event of the button. I am trying to print a message to the user like “finished” or something to tat effect. Like a puppup message or something.

we generate a file that gets uploaded to our bank every payroll. Before that file get generate, we have to fix the ACH check entries tries because epicore doesn’t code them correctly for the bank and rather correct all the records manually for possibly hundreds of records. We run this set of procedures that does it for them.

Pretty sure this is a job for the Electronic Interface Maintenance. Have you looked into that? It should allow you to define the export format to match what your bank expects.

3 Likes

I did this with a custom Check Register report style, and we print using the Excel-Data Only output.

We then just open it in excel and save to CSV (comma delimited)… done.

3 Likes

Kaz Proctor Please GIF by Wentworth

2 Likes

@cbastijanic as a bunch of the community members have said this is very far from best practice and it will cause you issues with your support contract if / whenever you have problems. I’m certain we can find a solution that will not use this direct DB writes that will still satisfy the requirements.

I suspect you’ll have a hard time getting anyone to help you with this actual solution if you aren’t willing to try a best practice method since nobody wants to be responsible for giving you bad advice.

Epicor has built in facilities to generate ACH files such as electronic interface module, you can also generate a file using a simple BAQ and Dashboard which you can manipulate to your heart’s content to get the data you want.

Many ways to skin this particular cat, but direct Db should probably not be one of them.

6 Likes

Is Epicor moving away from Swagger?

https://yourserver/server/apps/resthelp

The link I’ve used for so long is listed as the “old help page”
image

2 Likes

I guess I’ve only ever been to the “old help page”.

1 Like

I like the new one though, I can add headers and stuff

1 Like

This is the first time I herd of electronic interface. What is it and how would I use it.

1 Like

It’s what we use to do exactly what you’re doing.
I personally have not used it (contractor did) so I can’t answer the next part, but I imagine someone will be along shortly with the skinny.

1 Like

Just search for Electronic Interface in your application help. It describes what they are (pasted below) and how to set them up.

Electronic interfaces provide details to a plug-in program the system uses to perform specific formatting for output data. They also recognize and convert a specific form of input data to a standard format accepted by the system. Such plug-ins, for example, are bank interface formats a specific bank or country needs to perform Electronic Funds Transfer (EFT) and electronic reports.

2 Likes