Activity grid and Notes Preview is not in sync and it is not displaying proper data

I am trying to give a activity tab in sales order just like Opportunity scree. I have not able to find any option to use Grid with preview control from UI customization. I have tried to use a grid and a html control to show tasks & the notes.

The notes in the html control should display current row task notes. This is not working properly and the notes always shows the first record detail

enter image description here

enter image description here

Upvotes: 1

Views: 196

Answers (1)

DChhapgar
DChhapgar

Reputation: 2340

To achieve your goal you will need two container controls

  1. Grid Control bound to out-of-box data view Activity
  2. Form Control bound to new data view with same DAC as of used in Activity DAC.

Same record can be displayed on multiple container controls (Grid and Container Control having PXHtmlView control to display Activity Notes) on a page by defining a second data view with same (EPActivity in our case) DAC.

Define a new data view as below in Graph Extension.

public class SOOrderEntryPXExt : PXGraphExtension<SOOrderEntry>
{
    public PXSelect<EPActivity, Where<EPActivity.taskID, Equal<Current<EPActivity.taskID>>>> CurrentActivity;
}

Place a form container control on Tab along with PXGrid and bind the container control to data view CurrentActivity.

And enable AutoCallBack as below to display current Activity’s Note. Where CstFormView1 is a container control having PXHtmlView control.

        <px:PXGrid runat="server" Width="100%" ID="gridActivities" …>
            <AutoSize Enabled="true" />
            <AutoCallBack Command="Refresh" Target="CstFormView1" />
            <Levels>
                <px:PXGridLevel DataMember="Activities">
                    <Columns>
                    …
                    </Columns>
                </px:PXGridLevel>
            </Levels>
        </px:PXGrid>

Upvotes: 3

Related Questions