opening a form from external Application



I have the need to open a form that is on my publish site in an Iframe that will open on an external application (Dynamic CRM) for this I want to send a few parameters so that the form opens the correct record from Dynamics CRM.

lets say I want to pass the casenumber and casedate from my external application into the publish instance of AEM. how do I read the parameters being passed? what is the query string look like? is this possible?


I want to add this below:

you can see here how the argument of a caseid is being hardcoded, could that be the parameter being passed?


Accepted Solutions (1)

Accepted Solutions (1)




First you need to make sure you have selected the Form Data Model Prefill service for your form as shown below


Then you need to change the binding  fo your FDM from literal to Request Attribute. The string in the binding value can be any name. For example I have put accountnumber here. This accountnumber will be used in the code in the jsp page


Next, you need to create a NEW AF Template and Page Component as shown in this video

Saving And Retrieving Adaptive Form Data . It is recommended that you use the same page component that is provided in the article

Create your AF based on this new template. Associate your Form Data Model with this form

this is the best practice for your use case since we are going to populate the form based on url parameter

Then in the worker.jsp replace the code with the following code

Map<String,Integer>map = new java.util.HashMap<String,Integer>();



        System.out.println("There is a accountnumber parameter in the request"+request.getParameter("accountnumber"));




When your AF is being loaded this code will get executed. This will check for accountnumber parameter(This needs to be the same as you have specified in the above screenshot) parameter in the URL. We then create a map with the appropriate values and pass the map in the slingRequest. This will populate your for with the results from the FDM get method

for example  when you load an AF with the following URLhttp://localhost:4502/content/dam/formsanddocuments/forumsdemoform/jcr:content?wcmmode=disabled&acco...


The form will fetch data associated with accountnumber 37 and populate the form

Let us know through this forum if this works or you have any more questions