I have written an application (using power automate) to create AP invoices. My code creates a group under a system account, then creates the invoice. It then notifies accounting. They are not able to access the invoice in AP Entry because the group is still assigned to this system user. I tried to clear the ActiveUser field of the group, but no luck. (I tried a POST method and set the ActiveUser to “”)
how do I make it so that my program ends and the accounting team can review/edit and post that invoice.
thanks for the quick response - why do you say you would not use the REST methods directly? Isnt REST the best way to ensure the business rules are adhered too?
ok this is kinda strange. I went into SQL server and wrote an update sql statement and set the Active user to “” and it worked, but the RESTAPI post method would not blank it out.
Only some of the rules. Data integrity is managed client-side to a large extent. REST includes some failover data integrity checks, but it’s not super consistent. It’s like DMT; you can do some rather cursed things if you use any methods that aren’t the client UI. For example, change a part revision BOM without checking it out or back in in a single step ( ) which totally works except for when it mostly works.
Definitely treat SQL as read only… Epicor was not developed with the participation of highly skilled and empowered database professionals. There be dragons. To be fair Epicor isn’t remarkable in this way - it’s kind of standard for systems that predate SQL and quite common for the rest.
Remember, you are still using REST whether you call the OData, RPC, or Epicor Functions.
The advantage of the Epicor Function is YOU get to create the calling signature. You can reduce the number of calls (often to one), and you not leak all those implementation details into your client. If Epicor changes a business object, you just have to update your function and not all of your REST clients.