I’ve a doubt regarding Controllers at Axelor erp.
I’m in the need of calling axelor functions externally, for example to publish an endpoint to create a Lead
POST http://localhost:8080/xxxx/createLead with the information needed sent as body
In this controller I would inject the needed services to call the internal code of the ERP that executes those actions when the user clicks on it on the UI.
I’ve seen there’s the possibility to create custom controllers/services and so, but in the documentation I’ve found that you finally finish adding this endpoints to the form or as an action (maybe I’m missing something).
My idea is to be able to publish it inside my ERP with a custom path and custom parameters, just like a normal CRUD endpoint.
Hello @PakMax thanks for your response.
Yes I’ve had a look at them, but maybe I’m missunderstanding them, and as the examples I’ve seen at the documentation for REST service are pure CRUD operations on entities.
Then if I don’t get it wrong, with advanced services I could create a « com.axelor.apps.crm.web.HelloController » with a « sayHello » method and just call it with the needed json payload (for example) with a POST to « /ws/rest/com.axelor.apps.crm.web.HelloController/sayHello » ?