cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori Elements : How to navigate to an object page in Edit mode ?

Joseph_BERTHE
Active Contributor
0 Kudos

Hello,

All is in my title.

In my scenario, I have an Object page which describe the Sales order header and a list of Items.

When the user click on the action Create new Item (custom button) the application shows a popup to propose to the user a Wizard. At the end of the wizard, the application adds the item into the sale order, and then I do a navigation to the newly item.

But I want to navigate directly in edit mode.

How to handle it ?

Regards,

Joseph

View Entire Topic
Angshuman
Participant
0 Kudos

Hello Joseph BERTHE ,

Have you ever got the right solution for this? I have exactly similar requirements and came across this post.

Regards

Angshuman

former_member736093
Discoverer
0 Kudos

Hi achakr2

Have you found a solution for this. I have exactly same requirement..

Thanks

Sonal

Angshuman
Participant

Hi sonalsap0507,

I was not able to find the exact solution, but I did it in an alternate way. Whenever the app is navigating to the object page I was triggering the "press" event of the "Edit" button in the Object Page extension controller manually. That may not be the correct way but solved my purpose.

Here is my sample code. Added the code inside onInit() function

		this.extensionAPI.attachPageDataLoaded(function (Evt) {
			var editBtn = this.getView().byId( "**** Edit button ID****");
			if (editBtn) {
				editBtn.firePress();
			}
		}.bind(this));

shivaraj1993
Explorer
0 Kudos

HI, joseph.berthe and @achakr2 I have similar scenario like external navigate to object page in edit mode, I have tried above method not working

can i get any result?

Frank1
Participant
0 Kudos

Hi Shivaraj Gowda

Did you solve it? Could you please sharing your solution?

Best regards.

Louis-Arnaud
Participant
0 Kudos

Hello,

Know that this is old, but I managed to do it that way :

- add a custom column with a custom button for action "go directly to edit mode"

- in list report controller, add this :

onGoToEdit: function (oEvent) {
var oBindingContext = oEvent.getSource().getBindingContext(); var oExtensionAPI = this.extensionAPI; var fnNavigateAfterEdit = function (oEvent) { return new Promise(function (fnResolve, fnReject) { var oNavigationController = oExtensionAPI.getNavigationController(); oNavigationController.navigateInternal(oEvent[0].response.context); fnResolve(); }); };
var fnNavigateAlreadyEdit = function (oEvent) { return new Promise(function (fnResolve, fnReject) { var oNavigationController = oExtensionAPI.getNavigationController(); oNavigationController.navigateInternal(oBindingContext); fnResolve(); }); };
this.extensionAPI.invokeActions( "<service_name>.<service_name>_Entities/<entity>Edit", //you can find the action name with network in debug mode when you press the edit button oBindingContext ).then(fnNavigateAfterEdit.bind(this), fnNavigateAlreadyEdit.bind(this));
},