on 2025 Feb 17 5:33 PM
Hi experts,
I am trying to update the properties of the Attachment Reuse Component that is included on the standard Create Maintenance Request application. I want to update the flavor to "withCheckin" and remove the "Add a Link" action. I have created an adaptation project in BAS and I have tried the following:
Unfortunately, I have had no luck. I can technically update the properties of the component via the extension controller, but my changes are overridden once the component entirely loads in. If I could find a way to set the properties after the component is entirely loaded in then that would work.
Another option is adding a change to the manifest app variant. I was able to successfully do this on "My Maintenance Requests" but that's much more straight forward since its a true Fiori elements application.
Example of what I am trying to accomplish:
Request clarification before answering.
I wasn't able to solve the issue using a manifest change, but I was able to change the properties with a controller extension.
I made a new function that gets called after any batch request completes on the component.
_setAttachmentServiceAttributes: function () {
var oComponent = this.getView().byId("workRequestCreateAttachSrvCompContCreate").getComponentInstance();
oComponent.getRootControl().getController().oModel.attachBatchRequestCompleted(function (oEvent) {
oComponent.setFlavor("withCheckin");
var fieldControl = oComponent.getAttributes();
fieldControl._VisibleActions.RENAME = true;
fieldControl._VisibleActions.DELETE = true;
fieldControl._VisibleActions.ADD = true;
fieldControl._VisibleActions.ADDURL = false;
fieldControl._VisibleActions.DOCTYPE = false;
fieldControl._VisibleAttributes.ENABLELINK = false;
oComponent.setAttributes(fieldControl);
oComponent.setMode("I");
}.bind(this));
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
62 | |
8 | |
7 | |
6 | |
6 | |
5 | |
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.