Display Value from a Lookup field in another entity using Calculated field – Microsoft Dynamics CRM

If you ever need to get a value from a lookup field or from other related entity,  one of the ways to go is use calculated field.

In the scenario below, we want to get value from lookup field: Product ID and then display this in another entity: Quote Line.

The first thing to do is to create a custom field in the Quote Line entity.

In this scenario, Productidtest:

    1. In the Quote Line entity fields, click new
    2. Add a display name
    3. select calculated as the field type
    4. In the field type, click on Edit button to open the Field Definition Editor for Productidtest.
    5. This is aspect, we need to set the condition to check if the Product ID contains data for the existing product.
    6. Under Condition, click the Add condition
    7. In the entity field, select Existing Product
    8. In the field select Product ID
    9. In the Operator select Contains data
    10. Select the check button to save your action
    11. Under Action, click “Add action”
    12. Here we will set the Productidtest to Product ID. This will get product number value we want to display in the field.
    13. In the edit control, type and select productid (lookup)
    14. Type “.”
    15. Type and select productnumber
    16. Select the check button to save your action
    17. Finally it will look like this:
    18. Click on Save and Close button.
  1. Finally add the productidtest field to Quote Line entity.
  2. Save and Publish  the entity.
  3. Refresh your browser.

Product entity

 

Product ID displayed in the Productidtest field in Quote Line entity

Watch the Video

 

 

 

 

 

Advertisement