1
votes

I have been trying to get Note Text to show up into a generic inquiry screen but it seems that it just shows a paperclip like an attachment but nothing is actually attached to it. It brings up the file manager when you click on the paperclip in the grid. Essentially the main goal here is to get the notes text to display in the results grid. I have setup a DAC that is from the Service Order table to the notes table. And I did the relation of ServiceOrder Left JOIN to Notes and the key field is the NoteID.

Here is the XML for the Generic Inquiry:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<data-set>
  <relations format-version="3" relations-version="20170805" main-table="GIDesign">
    <link from="GIFilter (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIGroupBy (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIMassAction (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIMassUpdateField (DesignID)" to="GIDesign (DesignID)" />
    <link from="GINavigationScreen (DesignID)" to="GIDesign (DesignID)" />
    <link from="GINavigationParameter (DesignID, ScreenID)" to="GINavigationScreen (DesignID, ScreenID)" />
    <link from="GIOn (DesignID, RelationNbr)" to="GIRelation (DesignID, LineNbr)" />
    <link from="GIRecordDefault (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIRelation (DesignID, ParentTable)" to="GITable (DesignID, Alias)" />
    <link from="GIRelation (DesignID, ChildTable)" to="GITable (DesignID, Alias)" />
    <link from="GIResult (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIResult (ObjectName, DesignID)" to="GITable (Alias, DesignID)" />
    <link from="GISort (DesignID)" to="GIDesign (DesignID)" />
    <link from="GITable (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIWhere (DesignID)" to="GIDesign (DesignID)" />
    <link from="SiteMap (Url)" to="GIDesign (DesignID)" type="WeakByUrl" linkname="toDesignById" baseurl="~/GenericInquiry/GenericInquiry.aspx" paramnames="id" />
    <link from="SiteMap (Url)" to="GIDesign (Name)" type="WeakByUrl" linkname="toDesignByName" baseurl="~/GenericInquiry/GenericInquiry.aspx" />
    <link from="ListEntryPoint (ListScreenID)" to="SiteMap (ScreenID)" />
    <link from="SiteMap (ScreenID)" to="GIDesign (PrimaryScreenIDNew)" linkname="to1Screen" />
    <link from="SiteMap (NodeID)" to="SiteMap (ParentID)" type="WeakToParent" recursive-nesting="yes" include-parents="False" />
    <link from="GIDesign (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIFilter (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIFilter (NoteID)" to="GIFilterKvExt (RecordID)" type="RowKvExt" />
    <link from="GIGroupBy (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIOn (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIRelation (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIResult (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIResult (NoteID)" to="GIResultKvExt (RecordID)" type="RowKvExt" />
    <link from="GISort (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GITable (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIWhere (NoteID)" to="Note (NoteID)" type="Note" />
  </relations>
  <layout>
    <table name="GIDesign">
      <table name="GIFilter" uplink="(DesignID) = (DesignID)">
        <table name="Note" uplink="(NoteID) = (NoteID)" />
        <table name="GIFilterKvExt" uplink="(NoteID) = (RecordID)" />
      </table>
      <table name="GIGroupBy" uplink="(DesignID) = (DesignID)">
        <table name="Note" uplink="(NoteID) = (NoteID)" />
      </table>
      <table name="GIMassAction" uplink="(DesignID) = (DesignID)" />
      <table name="GIMassUpdateField" uplink="(DesignID) = (DesignID)" />
      <table name="GINavigationScreen" uplink="(DesignID) = (DesignID)">
        <table name="GINavigationParameter" uplink="(DesignID, ScreenID) = (DesignID, ScreenID)" />
      </table>
      <table name="GIRecordDefault" uplink="(DesignID) = (DesignID)" />
      <table name="GISort" uplink="(DesignID) = (DesignID)">
        <table name="Note" uplink="(NoteID) = (NoteID)" />
      </table>
      <table name="GITable" uplink="(DesignID) = (DesignID)">
        <table name="GIRelation" uplink="(DesignID, Alias) = (DesignID, ParentTable)">
          <table name="GIOn" uplink="(DesignID, LineNbr) = (DesignID, RelationNbr)">
            <table name="Note" uplink="(NoteID) = (NoteID)" />
          </table>
          <table name="Note" uplink="(NoteID) = (NoteID)" />
        </table>
        <table name="GIResult" uplink="(Alias, DesignID) = (ObjectName, DesignID)">
          <table name="Note" uplink="(NoteID) = (NoteID)" />
          <table name="GIResultKvExt" uplink="(NoteID) = (RecordID)" />
        </table>
        <table name="Note" uplink="(NoteID) = (NoteID)" />
      </table>
      <table name="GIWhere" uplink="(DesignID) = (DesignID)">
        <table name="Note" uplink="(NoteID) = (NoteID)" />
      </table>
      <table name="SiteMap" uplink="(DesignID) = (Url)" recursion="(NodeID) = (ParentID)" linkname="toDesignById">
        <table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
      </table>
      <table name="SiteMap" uplink="(Name) = (Url)" recursion="(NodeID) = (ParentID)" linkname="toDesignByName">
        <table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
      </table>
      <table name="SiteMap" uplink="(PrimaryScreenIDNew) = (ScreenID)" recursion="(NodeID) = (ParentID)" linkname="to1Screen">
        <table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
      </table>
      <table name="Note" uplink="(NoteID) = (NoteID)" />
    </table>
  </layout>
  <data>
    <GIDesign>
      <row DesignID="f6ed028b-51d9-49e0-a893-881ac49640cd" Name="ServOrderAuditHist" FilterColCount="3" PagerStyle="0" PageSize="0" NewRecordCreationEnabled="0" MassDeleteEnabled="0" AutoConfirmDelete="0" MassRecordsUpdateEnabled="0" MassActionsOnRecordsEnabled="0" ExposeViaOData="0">
        <GIFilter LineNbr="1" IsActive="1" Name="Date" FieldName="audithistory.changeDate" DataType="string" DisplayName="Change Date" IsExpression="0" ColSpan="1" Required="0" />
        <GITable Alias="audithistory" Name="PX.SM.AuditHistory">
          <GIRelation LineNbr="1" ChildTable="serviceorder" IsActive="1" JoinType="L">
            <GIOn LineNbr="1" ParentField="combinedKey" Condition="E " ChildField="srvOrdType" Operation="A" />
          </GIRelation>
          <GIResult LineNbr="2" IsActive="1" Field="batchID" IsVisible="1" DefaultNav="1" RowID="2846cf9b-219c-4a5a-b209-84fddc6c2340" />
          <GIResult LineNbr="3" IsActive="1" Field="changeDate" IsVisible="1" DefaultNav="1" RowID="e87e8b9b-4e65-4d74-a09b-32f9b042a2d4" />
          <GIResult LineNbr="4" IsActive="1" Field="changeID" IsVisible="1" DefaultNav="1" RowID="0323d539-ec30-422a-9095-6e9a32ad0b70" />
          <GIResult LineNbr="5" IsActive="1" Field="=Replace([audithistory.CombinedKey],' ','')" Caption="CombinedKey" IsVisible="1" DefaultNav="1" RowID="50807018-a8a1-422f-b4c8-85f41db06ecd" />
          <GIResult LineNbr="6" IsActive="1" Field="modifiedFields" Caption="ModifiedFields" IsVisible="1" DefaultNav="1" RowID="65ff668b-1a0c-4bb6-b302-541f45c96505" />
          <GIResult LineNbr="7" IsActive="1" Field="operation" IsVisible="1" DefaultNav="1" RowID="e1afd786-abdc-4011-af1b-de9a6ca8c070" />
          <GIResult LineNbr="8" IsActive="1" Field="screenID" IsVisible="1" DefaultNav="1" RowID="6a779a62-58db-4033-ab1e-317eb1b5d6eb" />
          <GIResult LineNbr="9" IsActive="1" Field="tableName" IsVisible="1" DefaultNav="1" RowID="6de2b416-c264-434c-8c84-5090c756dd64" />
          <GIResult LineNbr="10" IsActive="1" Field="userID" IsVisible="1" DefaultNav="1" RowID="e8a8e72b-8518-42e7-b5a9-82011f366c18" />
          <GIResult LineNbr="11" IsActive="1" Field="userID_description" IsVisible="1" DefaultNav="1" RowID="687c4f34-7344-4ff8-9607-249e9ee74f88" />
          <GIResult LineNbr="12" IsActive="1" Field="=LEFT([audithistory.CombinedKey], 3)" Caption="WOType" IsVisible="1" DefaultNav="1" RowID="2eb4a478-e697-4f16-832a-7f03ce8e453a" />
          <GIResult LineNbr="13" IsActive="1" Field="=RIGHT([audithistory.CombinedKey], 6)" Caption="WONumber" IsVisible="1" DefaultNav="1" RowID="7acd89c5-b352-4fa3-a928-a2f786e3311f" />
        </GITable>
        <GITable Alias="notes" Name="PX.Data.Note">
          <GIResult LineNbr="14" IsActive="1" Field="noteText" SchemaField="notes.NoteText" IsVisible="1" DefaultNav="1" RowID="2f941414-94f6-4225-b37e-a26fea9d6ad4" />
        </GITable>
        <GITable Alias="serviceorder" Name="FieldService.ServiceDispatch.FSServiceOrder">
          <GIRelation LineNbr="2" ChildTable="notes" IsActive="1" JoinType="L">
            <GIOn LineNbr="2" ParentField="noteID" Condition="E " ChildField="noteID" Operation="A" />
          </GIRelation>
        </GITable>
        <GIWhere LineNbr="1" IsActive="1" DataFieldName="audithistory.screenID" Condition="E " IsExpression="0" Value1="SD300100" Operation="A" />
        <GIWhere LineNbr="2" IsActive="1" DataFieldName="audithistory.operation" Condition="NE" IsExpression="1" Value1="D" Operation="A" />
        <GIWhere LineNbr="3" IsActive="1" DataFieldName="audithistory.changeDate" Condition="G " IsExpression="0" Value1="[Date]" Operation="A" />
        <GIWhere LineNbr="4" IsActive="1" OpenBrackets="(        " DataFieldName="audithistory.combinedKey" Condition="RL" IsExpression="0" Value1="TPP" Operation="O" />
        <GIWhere LineNbr="5" IsActive="1" DataFieldName="audithistory.combinedKey" Condition="RL" IsExpression="0" Value1="LOWE" CloseBrackets=")        " Operation="A" />
        <SiteMap linkname="toDesignById">
          <row Position="20" Title="Service Order Audit History" Url="~/GenericInquiry/GenericInquiry.aspx?id=f6ed028b-51d9-49e0-a893-881ac49640cd" Expanded="0" IsFolder="0" ScreenID="GIFR0235" NodeID="8b0a25e3-3a83-4324-80a0-7b78fe4c1e8f" ParentID="7d6dc2e0-301d-4689-b8b1-ba2f28baa299">
            <SiteMap Position="4" Title="Explore" Expanded="1" IsFolder="0" NodeID="7d6dc2e0-301d-4689-b8b1-ba2f28baa299">
              <SiteMap Position="1" Title="Work Area" Description="main@DataEntryF" Expanded="0" IsFolder="0" NodeID="31c4a483-3979-498e-bcc7-4891839872f5">
                <SiteMap Position="1" Title="Service Management" Url="~/Frames/Default.aspx" Expanded="0" IsFolder="0" ScreenID="SD000000" NodeID="abf4d047-7c3f-40fe-abc6-89f992c9b464">
                  <SiteMap Position="25" Title="Service" Url="~/Frames/Default.aspx" Expanded="0" IsFolder="0" ScreenID="FS000000" NodeID="1d096eb2-3eef-4206-b801-181debd3005d">
                    <SiteMap Position="0" Title="Sitemap Root" Url="~/Frames/Default.aspx" Expanded="0" IsFolder="0" ScreenID="00000000" NodeID="00000000-0000-0000-0000-000000000000" />
                  </SiteMap>
                </SiteMap>
              </SiteMap>
            </SiteMap>
          </row>
        </SiteMap>
      </row>
    </GIDesign>
  </data>
</data-set>

Note: There is another Table Left Join on here but it should not effect the results as it is confirmed working properly. I am also using Acumatica version 6.10.2118.

Update: In my GI instance there is another table called Audit History and the joining between this table to Service Order table is compromising the join between the Notes and Service Order table. Brendan's answer does work when another table is not involved.

1

1 Answers

3
votes

Sorry I do not have field service configured in my instances so I didn't look at your example GI but you should be able to include the note text as a field if you Join the note table and display the NoteText field as shown below in a quick example...

enter image description here

enter image description here

enter image description here

enter image description here

Here is the exported GI I used to test. I tested in the latest 6.1 and 2017R2 builds and both worked. This export is from 6.10.2515:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<data-set>
  <relations format-version="3" relations-version="20170805" main-table="GIDesign">
    <link from="GIFilter (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIGroupBy (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIMassAction (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIMassUpdateField (DesignID)" to="GIDesign (DesignID)" />
    <link from="GINavigationScreen (DesignID)" to="GIDesign (DesignID)" />
    <link from="GINavigationParameter (DesignID, ScreenID)" to="GINavigationScreen (DesignID, ScreenID)" />
    <link from="GIOn (DesignID, RelationNbr)" to="GIRelation (DesignID, LineNbr)" />
    <link from="GIRecordDefault (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIRelation (DesignID, ParentTable)" to="GITable (DesignID, Alias)" />
    <link from="GIRelation (DesignID, ChildTable)" to="GITable (DesignID, Alias)" />
    <link from="GIResult (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIResult (ObjectName, DesignID)" to="GITable (Alias, DesignID)" />
    <link from="GISort (DesignID)" to="GIDesign (DesignID)" />
    <link from="GITable (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIWhere (DesignID)" to="GIDesign (DesignID)" />
    <link from="SiteMap (Url)" to="GIDesign (DesignID)" type="WeakByUrl" linkname="toDesignById" baseurl="~/GenericInquiry/GenericInquiry.aspx" paramnames="id" />
    <link from="SiteMap (Url)" to="GIDesign (Name)" type="WeakByUrl" linkname="toDesignByName" baseurl="~/GenericInquiry/GenericInquiry.aspx" />
    <link from="ListEntryPoint (ListScreenID)" to="SiteMap (ScreenID)" />
    <link from="SiteMap (ScreenID)" to="GIDesign (PrimaryScreenIDNew)" linkname="to1Screen" />
    <link from="SiteMap (NodeID)" to="SiteMap (ParentID)" type="WeakToParent" recursive-nesting="yes" include-parents="False" />
    <link from="GIDesign (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIFilter (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIFilter (NoteID)" to="GIFilterKvExt (RecordID)" type="RowKvExt" />
    <link from="GIGroupBy (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIOn (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIRelation (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIResult (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIResult (NoteID)" to="GIResultKvExt (RecordID)" type="RowKvExt" />
    <link from="GISort (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GITable (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIWhere (NoteID)" to="Note (NoteID)" type="Note" />
  </relations>
  <layout>
    <table name="GIDesign">
      <table name="GIFilter" uplink="(DesignID) = (DesignID)">
        <table name="Note" uplink="(NoteID) = (NoteID)" />
        <table name="GIFilterKvExt" uplink="(NoteID) = (RecordID)" />
      </table>
      <table name="GIGroupBy" uplink="(DesignID) = (DesignID)">
        <table name="Note" uplink="(NoteID) = (NoteID)" />
      </table>
      <table name="GIMassAction" uplink="(DesignID) = (DesignID)" />
      <table name="GIMassUpdateField" uplink="(DesignID) = (DesignID)" />
      <table name="GINavigationScreen" uplink="(DesignID) = (DesignID)">
        <table name="GINavigationParameter" uplink="(DesignID, ScreenID) = (DesignID, ScreenID)" />
      </table>
      <table name="GIRecordDefault" uplink="(DesignID) = (DesignID)" />
      <table name="GISort" uplink="(DesignID) = (DesignID)">
        <table name="Note" uplink="(NoteID) = (NoteID)" />
      </table>
      <table name="GITable" uplink="(DesignID) = (DesignID)">
        <table name="GIRelation" uplink="(DesignID, Alias) = (DesignID, ParentTable)">
          <table name="GIOn" uplink="(DesignID, LineNbr) = (DesignID, RelationNbr)">
            <table name="Note" uplink="(NoteID) = (NoteID)" />
          </table>
          <table name="Note" uplink="(NoteID) = (NoteID)" />
        </table>
        <table name="GIResult" uplink="(Alias, DesignID) = (ObjectName, DesignID)">
          <table name="Note" uplink="(NoteID) = (NoteID)" />
          <table name="GIResultKvExt" uplink="(NoteID) = (RecordID)" />
        </table>
        <table name="Note" uplink="(NoteID) = (NoteID)" />
      </table>
      <table name="GIWhere" uplink="(DesignID) = (DesignID)">
        <table name="Note" uplink="(NoteID) = (NoteID)" />
      </table>
      <table name="SiteMap" uplink="(DesignID) = (Url)" recursion="(NodeID) = (ParentID)" linkname="toDesignById">
        <table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
      </table>
      <table name="SiteMap" uplink="(Name) = (Url)" recursion="(NodeID) = (ParentID)" linkname="toDesignByName">
        <table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
      </table>
      <table name="SiteMap" uplink="(PrimaryScreenIDNew) = (ScreenID)" recursion="(NodeID) = (ParentID)" linkname="to1Screen">
        <table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
      </table>
      <table name="Note" uplink="(NoteID) = (NoteID)" />
    </table>
  </layout>
  <data>
    <GIDesign>
      <row DesignID="479b3a0d-2de4-4f8e-9b55-a19f3b46a36d" Name="testnote" FilterColCount="3" PagerStyle="0" PageSize="0" NewRecordCreationEnabled="0" MassDeleteEnabled="0" AutoConfirmDelete="0" MassRecordsUpdateEnabled="0" MassActionsOnRecordsEnabled="0" ExposeViaOData="0">
        <GITable Alias="InventoryItem" Name="PX.Objects.IN.InventoryItem">
          <GIRelation LineNbr="1" ChildTable="Note" IsActive="1" JoinType="L">
            <GIOn LineNbr="1" ParentField="noteID" Condition="E " ChildField="noteID" Operation="A" />
          </GIRelation>
          <GIResult LineNbr="1" IsActive="1" Field="inventoryCD" IsVisible="1" DefaultNav="1" RowID="37044060-0fbb-48e5-a38f-1dc0becb6e6c" />
        </GITable>
        <GITable Alias="Note" Name="PX.Data.Note">
          <GIResult LineNbr="2" IsActive="1" Field="noteText" IsVisible="1" DefaultNav="1" RowID="175f364b-607d-479d-b1c9-1008af652388" />
        </GITable>
      </row>
    </GIDesign>
  </data>
</data-set>