on 03-26-2024 12:43 PM
Hi all,
I'm a Javascript-Noob but need some of it for my Fiori Elements Enhancements.
I built an App where I want to have a Custom Action. Within this action I'm calling an API to fetch values and then calling a fragment I built with XML. Inside the Fragment the values fetched will be visible in a dropdown. On Business Application Studio everything is working. My Fragmentis opening without problems and my data is presented there.
Then I deployed the App to our BTP as an HTML5-Application (via MTA). The App is opening and everything works beside the Fragment. My coding looks like this (instead of debugger I'm doing some things, but in the end I'm opening the Fragment via the open()-Method.
var QueryTaskCodes = jQuery.ajax
({
type: "GET",
contentType: "application/json",
url: URLTaskCodes,
dataType: "json",
success: function (data) {
if (!that.pDialogCloseCreateNotification) {
that.loadFragment({
id: "CreateAndClose",
name: "some.app.ext.fragment.CreateAndClose",
type: "XML",
controller: that //this
}).then((oDialog) => {
debugger;
that.pDialogCloseCreateNotification = oDialog;
that.pDialogCloseCreateNotification.open();
});
}}})
Within the Busines Application Studio Preview the debugger shows, that oDialog is set.
However, on BTP HTML5-App it's undefined.
What am I missing? What am I doing wrong?
Best wishes,
Julian
Aah, seems I had used a deprecated function for my Fiori Version. BAS seems to be a little bit more relaxed on this topic than BTP 😄
I changed
that.loadFragment({
to
Fragment.load({
Now it's opening the Fragment in my App.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.