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?
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
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