web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / HIMBAP / Setting Case Origin from Dy...

Setting Case Origin from Dynamics 365 Portal

Mahendar Pal Profile Picture Mahendar Pal 45,095

Sometime we may need to set default value for the entity field in portal forms. In this post we are going to discuss, how we can leverage entity form metadata to fulfil this requirement.

Requirement: Identify if case is created from Dynamics 365 Portal.

Solution: If you have worked with custom service module earlier then you might be aware of the Case Origin (caseorigincode) field which is a option set field. This field is used to configure case origin, for example if case is reported through phone, email, web etc. We can reuse this field to identify if case is reported from the Customer Portal. Let’s see how we can implement this using following steps:

1. First add an option for Portal in case origin field, navigation to Settings->Customizations->Customize the system from top navigation bar.
2. Navigate to Fields under Case entity and open case origin field.
3. Click on Edit button and add new option for Service Portal
case1
**Keep note value of the Service Portal
4. Save and publish your changes.
5. Navigate to Portals->Entity Forms from top navigation bar.
6. Open your case entity form and Navigate to Entity Form Metadata section
7. Click on + sign, to create new Form Metadata record
8. Set Type as attribute and set attribute name
case3
9. Navigate to Set Value On Save and use following option
case4
**Make sure value is matching to your Service Portal option value
10. Save and Close your changes.
Now when you will create case from Portal, case origin will be set as
case5

Hope it will help someone!!

Comments

*This post is locked for comments