on 03-16-2023 9:04 AM
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
I’m not sure but in this example prepend is used: https://github.com/SAP-samples/cloud-cap-samples/blob/main/bookstore/srv/mashup.js
Maybe you can have a look into this example?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
10 | |
8 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.