With Dynamics 365 Portals you can add Entity Web Forms which are the Portals’ way of displaying Dynamics 365 CRM Forms, allowing Portal Users to Create, View and Update records in Dynamics 365. The screenshot is an example of a Web Form that shows a simple Lead form to collect information about the Portal User.
The Web Form has two separate pages, shown above and below to collect the necessary data.
The below screenshot shows the Lead that had been created in Dynamics 365. One thing we notice here is that even though the User had submitted from the Portal the Status is New.
In this scenario it might make more sense for the Status to change to something more appropriate like Submitted, which can be seen in the screenshot below. In this case we can use Web Form Metadata.
If we navigate to the Second Step of the Web Form, there should be a Related Entity called Entity Metadata. If we create one, we will be given the screenshot below. For this example, we would be creating a Type of ‘Attribute’ and setting the Status Reason field.
If we scroll further down, we will arrive at a ‘Set Value On Save’ area which allows us to Set the Value of the Status Reason field when the form have been saved, which in this case would be when the Submit button is selected. Set this to 2, which is the Submitted Status Reason and save the new Metadata record.
Going back to the Dynamics 365 Portal and filling out the Contact Us Page a second time would then create the below Lead with the correct Status of Submitted.