Rest Api method
Application Type
Traditional Web

Hi!!!

GET method CheckCustomerDataById:


This method should check (by Customer.Id) whether there is data in the tables of Addresses, Contacts, Documents. The answer should be in the form of a List with the structure: Data (Text), Result (Boolean). In Data, write the name (i.e. Address, Contacts, Documents), in Result, write the result (True / False).


how to implement the method? I'm confused.

help me


CommonRest.oap

Hi,

I modified your code including structure and logic. not able to publish without dependencies. Hence, oml attached. 

Thanks, Aadhavan S

CommonRestsv3.oml

Hello,


Aadhavan Shanmugam is right, but I analyzed better and the query could return records for the same Costumer. For me the best way is to isolate the queries this way and I changed the structures to send a list to addresses, contacts and documents and I think it will work. I enclose the OML.

Regards,

Jorge Rodrigues

CommonRestsv3.oml

Hello,


Aadhavan Shanmugam is right, but I analyzed better and the query could return records for the same Costumer. For me the best way is to isolate the queries this way and I changed the structures to send a list to addresses, contacts and documents and I think it will work. I enclose the OML.

Regards,

Jorge Rodrigues

CommonRestsv3.oml

Hi,

From what I saw, a costumer can have several contacts, several documents and several addresses, right? Do you want the service to return a list of them all? Or just that it returns in just one record separated by some character?

Regards,

Jorge Rodrigues

Thank you)


Hi,

I modified your code including structure and logic. not able to publish without dependencies. Hence, oml attached. 

Thanks, Aadhavan S

CommonRestsv3.oml

Hello,


Aadhavan Shanmugam is right, but I analyzed better and the query could return records for the same Costumer. For me the best way is to isolate the queries this way and I changed the structures to send a list to addresses, contacts and documents and I think it will work. I enclose the OML.

Regards,

Jorge Rodrigues

CommonRestsv3.oml

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.