on 02-12-2018 1:16 PM
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
Hello Joseph BERTHE ,
Have you ever got the right solution for this? I have exactly similar requirements and came across this post.
Regards
Angshuman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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));
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));
},
User | Count |
---|---|
68 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.