Create and configure Adaptive Form
The following video walks you through the steps to create and configure Adaptive Form to create and display lead objects.
Transcript
After creating the Form Data Model, the next step is to create a form based on that particular Form Data Model. So to do that, I’ve logged into my AEM forms instance, go into the form, forms and documents, and create a form, adaptive form. Select any of the template. In my case, I’m going to select a blank template here. Give a meaningful name here. So you can call it, Create Lead in Dynamics. Make sure you select the appropriate theme here. So theme is nothing but a group of CSS files that define the look and feel of your forms. I’m going to select Ultramarine or Marine. You can select any of those themes. I’m going to select Ultramarine. The configuration container, this is very important. Remember, our Cloud services configuration and the Form Data Model selected the Microsoft as the configuration container. So we also need to select the same configuration container here, so that the Form Data Model which is in that configuration container becomes available to your adaptive form. Select and in the Form Data Model here, select Form Data Model, and here it was called Microsoft. So I can search Microsoft Dynamics and click on Create to create your adaptive form. So I have configured this form to have three fields here, first name, last name, and description, button which is configured to invoke the insert lead operation that we configured in our Form Data Model. There’s a table which allow us to display the leads of Microsoft Dynamics here in this adaptive form. So let’s look at the Data Sources tab here, the adaptive form here. So when you go in here, it shows you there’s a Microsoft Dynamics and there’s a lead object and inside the lead object are the various properties. So to drag and drop the property here, I simply selected the first name and dragged and dropped it onto my form here. In a similar manner, I did for the last name and the description field here. Then I dragged a simple button here and I’ve configured the rule editor of that particular button to invoke the service post lead operation here. So if you go in here, and the form model object here. So when the button is clicked, invoke the post lead service operation of our Form Data Model here. Then the input parameters, it has a lot of input parameters, but we’re only going to specify the description and the first name and last name. So all you need to do is to drag and drop these appropriate fields here onto this box here, so that the value in that field will be passed as a parameter to the post lead service operation. We’re not going to do anything with the output here and save this. In a similar manner here, we have dropped a table which will display the lead. So let’s take a look at the table here. So this is the table, which has a header row, which has the first name and last name here, and the row one here has two pex boxes to display the first name and last name of the leads here. How we get the leads is on the click of this particular button here. So if you select this button, go to the rule editor, I have configured the click event of that particular button to invoke the get leads service operation. There is no input parameter and the output, I’m mapping it to my two columns of my table here, the first name and the last name. There’s one more thing that you need to specify because our table will grow depending on the number of leads returned by our service call. We need to make sure that our row is configured appropriately. So select row one and the minimum count is one and maximum set it to minus one so that it displays n number of unlimited number of leads in your table. So this is how our form is going to look like. So let’s take a look at the form in runtime. So go in here. I’m going to select the form is selected and do a review and enter a meaningful name here. So the first name is let’s say Conrad Sims. First name and last name is Conrad Sims. Description is created from AEM forms. Then when I hit the create lead button, it should insert these values in Microsoft Dynamics to create a lead object. So do that and it is created. Then let’s click on this button to fetch all the leads in the Microsoft Dynamics database. So click on this and here are all the lead objects here. So if you were to see the lead that we just created, it’s here Conrad Sims. So this is how you can interact with Microsoft Dynamics using AEM forms.
recommendation-more-help
4859a77c-7971-4ac9-8f5c-4260823c6f69