Hi ,
I have some issue when I try to extend a multitenant application into SAP CAP when I try to implement a new function.
Is good to know that I am using @sap/cds-mtxs library.
I already have deployed a multitenant app that was activated from a subscriber subaccount.
Also I was able to build and activate an extension app that add two new fields for an entity. Code below:
extend Sales with { // 2 new fields.... x_priority : String enum {high; medium; low} default 'medium'; x_salesRegion : String(44); }
Now I am trying to add a new function to the service and implement it
extend service CatalogService with { function x_func() returns String; }
Function implementation:
const cds = require("@sap/cds");
module.exports = cds.service.impl(async function (service) { this.on("x_func",async(req)=>{ return "Hello!"; }); });
After activating the extension and test the function x_func() on the subscriber I receive the following error message
Not sure if is possible to implement a function into a extension app and how.
Guide that I followed is here: https://cap.cloud.sap/docs/guides/extensibility/customization