Feature Request : On dynamic installation page

Hi freshdesk community.!
I am facing issue on dynamic installation page.
I was trying to build an app which connects to business central api.
For connection we need Tenant ID, User ID, Web services key, Company name and Server type.
So in my case i am unable to validate properly on change event. As of now, according to docs currently supported event is “change” on installation page.

In my case, When i try to do it with each input on change it calls the dynamics api to validate user inputs.

What i was expecting is to call the api on submit button instead of on change event. If there is just one input validation, that’s fine but in our case all inputs are required and if there is one wrong, it will not let them install the app.

Current scenario :
It is showing errors even the inputs are valid, means sometime it works and sometime it won’t.
Let’s suppose if one field is incorrect and we are on the other field and we typed that correct, it will show error on correct input instead of incorrect input. Simple means, on change events check for the latest input change value.

Expected :
It should show error while we submit the form instead of on change event.


1 Like

Welcome to Freshworks Developer Community, Danial.

Today, the installation page using iparams.json will only observe the change event. We haven’t figured new cases to include newer events like click or similar. At the moment, I invite you to use custom installation page and build the UI using iparams.html and include JS files.

Here is a tutorial on how you can do it:

Here is the code to sample app:

I will also take this as a feedback item to pass on to the app platform team to record this as a feature request. As you can see the events property can accept more inputs.

Before you consider using custom installation page as mentioned above, consider following:

But when user enters all the inputs, the latest API call to business central api should succeed. The function that makes the succeeded API call should return an empty string – "". It’s only then app platform will allow the app to be installed.

Is there a restriction that business central api doesn’t respond if app makes repeated failed API calls? In this case every change of character in input field will make API call until the last character that succeeds.

1 Like

As @Saif said, you need to implement with debounce function, so that the API call won’t trigger for some time assuming the values are entered before the function call.
and you need to return the empty string if the response is successful or send the error message if the response is not succeded.
and make sure you will wrap the request in the promise function and resolve/reject only if you receive the response from the API.

and we will take the feature request for the button with click events in Iparams.json

Hope it helps :slight_smile:


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.