Sunday, April 18, 2010

DataCaptionFields and DataCaptionExpr property

This is a simple and known work around to set the form/page caption. This is particularly useful if you want to set an option field as form caption because changing the DataCaptionFields property won't work in the form and page.

In the following example scenario, I will include "Document Type" into the caption of the sales order form. This can be achieved by simply creating a function and changing the DataCaptionExpr property.

  • Create a function.

image

  • Add the following code in the function.

image

  • Change the DataCaptionExpr property as below:

image

  • Run the Sales Order and see the ouput.image

2 comments: