Hello.
I have a multi tenancy enabled CAPM project - CRM . This has an app router and a srv application deployed in my dev CF space.
I created another capm project SAAS . I am consuming CRM service from SAAS project following capire. package.json of SAAS application is like this.
"CRMService": { "kind": "odata-v4", "model": "srv/external/CRMService", "[production]": { "credentials": { "destination": "CRMSRV", "path": "/crm" } } }
These applications are deployed in BTP Trial sub-account . I created a destination service and a service key , to maintain "CRMSRV" destination ( using OAuth2UserTokenExchange , pointing to srv url of CRM service ) and bound it to SAAS srv application.
From the same Trial account, I created subscription for both CRM & SAAS. Post setting up routes and reroute URL , through saas subscription endpoint , I can reach CRM service - the destination is properly picked up .
Later I created another (consumer) sub-account and subscribed to both CRM and SAAS . CRM url can access the corresponding entity set data and SAAS can access its own. But, when I use SAAS url to fetch CRM data ( since SAAS has CRM api consumption setup ) , I get "Error during request to remote service: Failed to load destination" . sWhat am I missing ?
1 - If I am not creating a destination in consumer sub-account , mustn't it consider the destination of provider sub-account ?
2 - If I must create a destination in consumer sub-account, what would be the target URL ? consumer sub-account URL of CRM ? I tried this and failed.
Is it something missing in the Service.js I implemented ?
Service.js
Error from log
Failed to load destination. Caused by: Could not fetch client credentials token for service of type "destination". Caused by: undefined
Sreehari