How to Create Custom PreviewPartRef in Form in AX 2012

Description:-

You can customize the enhanced preview to show additional information from the related table. Typically, you want enhanced preview to show important information about the related record so that you do not have to leave the current form. For example, the enhanced preview for the customer account field of the sales orders list page shows important information from the customer record.

To customize the values or the format that appears in the enhanced preview, you can use the title fields for the table, the AutoIdentification group for the table, or a part. A part is a specialized type of control that shows a collection of data. To customize enhanced preview, you use the same type of info part or form part that you use to add a FactBox to some forms. For information about parts.

The following table shows the properties you use to specify the enhanced preview. In addition, the table lists the precedence used to find the enhanced preview. When you point to a control with enhanced preview, the system uses the value of the PreviewPartRef property of the control to identify the part. If the control property is empty, the system looks for values in the PreviewPartRef property of the table, and then the field group and titlefields of the table, For example, if the PreviewPartRef property of the control specifies an info part, that info part is used for the enhanced preview and the values of the table PreviewPartRef, AutoIdentification, and TitleField properties are ignored.


Step 1: Create table add Field in table name it “PreviewDemoTable”. Fields are (ID, Name and Field)
  • Open AOT Node.
  • Open data Dictionary Node
  • Right Click on Table Node and Click New table to Create Table.

Step 2: Create Form and Name itPreviewPartdemo”.
  • Open AOT Node.
  • Right click on Forms Node and Click New Form.
  • Now add Grid in Design Node by Right Click in Design >New Controls>Grid.
Step 3: Add DataSource in Form and In Design Insert Grid by Right Click on Design and select Grid to add. After Drag and Drop DataSource Field Control in Design > Grid.


Step 4: Create New Form and Name itPreviewPart”.
  • Open AOT Node.
  • Right click on Forms Node and Click New Form.
  • Drag and Drop table in DataSource Node.
  • Name it.
  • Now Open Designs node and Select Design.
  • Set Properties as in below Image.



·         Now add Grid in Design Node by Right Click in Design >New Controls>Grid.


·         After Click on Grid and Set Property like Image Below.



Step 5: Now Create FormPart Name it “PreviewPartDemo”.
  • Open AOT Node.
  • Open Parts Node.
  • Right Click FormParts Node And Select New Form Parts.

·        Set Property as in Image.
Step 6: Create Display Menu Items Name it “PreviewPart”.
  • Open AOT Node.
  • Open Menu Items.
  • Right Click on Display Node Click new Menu Items (Or) Drag and Drop Created  PreviewPart in Display Menu Items.
  • Set Property as in Image.

Step 7: Now Open Created PreviewPartDemo Form Open Designs>Design>Grid>ID.
  • Select ID from Grid Controls.
  • Set PreviewPartRef Property to PreviewPart (Menu Items Name).

Step 8: Now Open PreviewPartDemo form and Drag Mouse in ID Filed. You can see tool tip window open.             

Related Posts

Previous
Next Post »

2 comments

comments

Thanks for comments.....