Introduction

In certain circumstances, we must send a Webresource certain parameters. The event level of a form’s comma separated list of parameters option must be used in order to accomplish this. To learn more about the “account name” of the selected “Bank Details,” the “account name” logical name was pass as a parameter to the “Bank Details” form, for instance.

Step 1
Login to the required Powerapps environment using URL make.powerapps.com by providing the user name and password and click on Solution on the left-hand side and after chose the required solution as shown in the below figure.

Step 2

After Step 1, I have created a new webresource as show in the below figure.

Update the bellow code into “Demo for Parameter Pass” webresource.

function CheckAccount(executionContext, accountname) {
let formContext = executionContext.getFormContext();
if (formContext !== null && formContext != ‘undefined’) {
var account = formContext.getAttribute(accountname).getValue();
alert(“Account Name:” + account);
}
}

After, save Webresource code and publish it.

Step 3

After Step 2, open “Bank Details” main form and navigate to on load event and under configure event sub window, look for the section “Comma separated list of parameters that will be passed to the function” and pass logical name of Account Name as “crmdemo_accountname” as shown in the below figure.

Then open any on “Demo” record and observe an alert with accountname as shown in the below figure.

For any Help or Queries Contact us on info@crmonce.com or +918096556344