Using API Service and Custom API Handlers together

Hello ,
I have a Comment Data Table and On the AfterUpdate Callback of the Comment , through the Server Side code , I want to Update another Data table named 'Notification ’ by creating a File in a directory . ( Via Server Code Again)
I scanned through the docs but didn’t find any scenario of using file services in the AfterSave or BeforeSave callbacks .
I read that we could do File operations through the server by leveraging API Services .
Seems like I need to use both of them in conjunction to each other .
I could do all of these stuffs easily through client side , but I want to leverage server side functionality which is probably making the scenario harder for me .
Please guide me Or give me hints on How I could achieve this one :slight_smile:

Hello,
Please explain more precisely the workflow you trying to achieve.
Artur

Hello , @Artur Dzidzoiev
The thing I want to do is I want to deploy a Custom Service named ‘NotificationService’ running over the server , which recieves some Arguments from the Client Side , or Even Custom Business Logic side ( Maybe an AfterSave Call-back ) .
The Service recieves those Arguments and does 2 Things :

  1. Modifies a Column of Another Database Table
  2. Sends Push Notification

My First Thoughts are that I could create Something like :

public class NotificationService implements IBackendlessService{


public void CreateObjects(){

//HEre, I work with All backendless Data Services 
//Like , Backendless.Data.of(query,.....) 
}


public void SendPushNotifications(){
//Here, I Use the Messaging Service to send Push Notifictation to my users 


}




}

So , Please give me Pointers on how to achieve this feat :slight_smile:

Hello Pujan,
You can leverage any amount of services in your custom code. It is not a problem to send push and update item in table in one service call (method like public void createObjectAndSendPush())
Artur