cancel
Showing results for 
Search instead for 
Did you mean: 

Populating fields while draft creation

0 Kudos

I want to populate some fields while creating new entity on the fiori ui, so where I will implement that functionality so whenever a new draft is created I prepopulate some of the fields.

maheshpalavalli
Active Contributor
0 Kudos

Hi Rajeev,

Are you talking about the draft entry creation in the ABAP programming model for Fiori?

BR,

Mahesh

0 Kudos

Yes, I want some fields to be filled beforehand in the form while creation when user creates a new entry from the UI, I have created a list report application with draft.

Accepted Solutions (1)

Accepted Solutions (1)

maheshpalavalli
Active Contributor
0 Kudos

Hi Rajeev Singh,

You need to do this manually.

1. Create a custom action for create and hide the pre defined add action.

2. In the action event handler, call the create action which is created by default by the

	urlParameters = {
			"parameter1": "value1",
			"parameter2": "value2"
		};
		var oPromise = oApi.invokeActions("/EntitySetNameCreate", [], urlParameters);

		oPromise.then(function(aResponse) {
			if (aResponse[0] && aResponse[0].response) {
				var oResponseContext = aResponse[0].response.context;
				if (oResponseContext) {
					  var oNavController = that.extensionAPI.getNavigationController();
		                          oNavController.navigateInternal(oContext);

				}
			}
		});


BR,

Mahesh

Answers (1)

Answers (1)

leonardofreitas
Active Participant
0 Kudos

Hi,

l recommend you search, l found similar topics like this:

https://stackoverflow.com/questions/43045744/sapui5-autocomplete-input

Att,

Leonardo de Freitas