NAV2017 - Web Service - Sub Page - Filter RecordID

Hello everyone,

I have a card-page which contains among others a sub-page. I need to filter this sub-page via a RecordID filter being able to filter by code as a record ID can't be linked via a SubPageLink Property.

The code in the card page is as followed:

In the OnAfterGetCurrRecord Trigger:

CurrPage.BMGTicketingTranslationList.PAGE.SetRecLinkFilter(Rec.RECORDID);

Here is the filter in the sub page:

SetRecLinkFilter(RecId : RecordID)

SETRANGE("Record ID", RecId);

CurrPage.UPDATE(FALSE);

All this works properly in the RTC client. But I need to publish the page as Web Service and unfortunately under these conditions the RecordID filter doesn't work.

As a result I receive all data-sets in the sub-page hence the filter has been ignored.

If I debug the Web-Service, the code is run correctly, but then the result is wrong.

Does anybody can give me an advise about what to do? Actually this should work with Web Services, shouldn't it?

I'd appreciate your help.

Pierre

  • Hello,

    Maybe the unfiltered result is in the cache of the browser.

    Try to clear it.

    Also check if it works with onaftergetrecord trigger.

    OnAfterGetCurrRecord Trigger

    After the current record is retrieved from the table.

    OnAfterGetRecord Trigger

    When a record has been retrieved but not yet displayed.

    regards

  • In reply to THomas Barbut:

    Hello Thomas,

    thank you for your answer.  I don't use the Web Client. I want to use the page as Web Service. I check the Web Service via .NET Web Service Studio.

    I attached a xml file where you can see the result. 

    I already tried the option with OnAfterGetRecord without success.

     

    8512.response_example.xml
    <?xml version="1.0" encoding="utf-16"?>
    <Soap:Envelope xmlns:Soap="http://schemas.xmlsoap.org/soap/envelope/">
      <Soap:Body>
        <Read_Result xmlns="urn:microsoft-dynamics-schemas/page/partner01tktsaisoncomplete">
          <Partner01TktSaisonComplete>
            <Key>28;rxUBAAJ7/zIAMAAxADUALwAxADY=10;33071215162;26;Partner01_Tkt_Spielpaarung33;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhw==10;33847184220;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhwE=10;33847184230;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhwI=10;33847184240;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhwM=10;34212736980;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhwQ=10;33847184260;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhwU=10;33847184270;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhwY=10;33847184280;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhwc=10;33847184290;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhwg=10;33847184300;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhwk=10;33847184310;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhwo=10;33847184320;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhws=10;33847184330;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhww=10;33847184340;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhw0=10;33847184350;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhw4=10;33847184360;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhw8=10;33847184370;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhxA=10;33847184380;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhxE=10;33847184390;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhxI=10;33847184400;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhxM=10;33847184410;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhxQ=10;33847184420;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhxU=10;33847184430;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhxY=10;33847184440;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhxc=10;33847184450;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhxg=10;33847184480;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhxk=10;33847184490;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhxo=10;33847184500;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhxs=10;33847184510;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhxw=10;33847184520;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhx0=10;33847184530;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhx4=10;33847184540;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAh4I=10;33847184550;36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAh4M=10;33847184560;27;BMGTicketingTranslationList7;68;f8MAAH0TrxUBAAJ7/zIAMAAwADEALwAyADAAMAAyAAAAAAAAh3EXAAACe/9FAE4ARw==10;34335444340;68;f8MAAH0TrxUBAAJ7/zIAMAAwADEALwAyADAAMAAyAEEAAAAAAACHcRcAAAJ7/0UATgBH10;34335469640;68;f8MAAH0TrxUBAAJ7/zIAMAAwADIALwAyADAAMAAzAAAAAAAAh3EXAAACe/9FAE4ARw==10;34335504010;68;f8MAAH0TrxUBAAJ7/zIAMAAwADIALwAyADAAMAAzAEEAAAAAAACHcRcAAAJ7/0UATgBH10;34335525530;68;f8MAAH0TrxUBAAJ7/zIAMAAwADMALwAyADAAMAA0AAAAAAAAh3EXAAACe/9FAE4ARw==10;34335541890;68;f8MAAH0TrxUBAAJ7/zIAMAAwADMALwAyADAAMAA0AEEAAAAAAACHcRcAAAJ7/0UATgBH10;34335559990;60;f8MAAH0TrxUBAAJ7/zIAMAAxADYALwAxADcAAAAAAACHcRcAAAJ7/0UATgBH10;34330126530;</Key>
            <Code>2015/16</Code>
            <Beschreibung>Heimspiele 2015/16</Beschreibung>
            <Freigabe_Internet>false</Freigabe_Internet>
            <Gruppenkontringent>false</Gruppenkontringent>
            <Abo_Verwaltung_Web_aktiv>false</Abo_Verwaltung_Web_aktiv>
            <Partner01_Tkt_Spielpaarung>
              <Partner01_Tkt_Spielpaarung>
                <Key>36;sBUBAAJ7/zIAMAAxADUALwAxADYAAAAAhw==10;33847184220;</Key>
                <Spielseriecode>2015/16</Spielseriecode>
                <Spieltag>0</Spieltag>
                <Stadioncode>03</Stadioncode>
                <Heim_Fremdspiel>Heimspiel</Heim_Fremdspiel>
                <Datum>0001-01-01</Datum>
                <Uhrzeit>15:30:00.0000000</Uhrzeit>
                <Heimmannschaft>Borussia</Heimmannschaft>
                <Gastmannschaft>Dauerkarte 2015/16</Gastmannschaft>
                <Veranstaltungsname>Dauerkarte 2015/16</Veranstaltungsname>
                <Dauerkarte_gültig>false</Dauerkarte_gültig>
                <Anzeige_Topevent>false</Anzeige_Topevent>
                <Heimfanblock_im_Web_ausblenden>false</Heimfanblock_im_Web_ausblenden>
                <Verkaufsart>kein_Verkauf</Verkaufsart>
                <Internet_Verkaufsstart_am>0001-01-01T00:00:00</Internet_Verkaufsstart_am>
                <Webverkauf_abgeschlossen>false</Webverkauf_abgeschlossen>
                <Warteliste_aktivieren>false</Warteliste_aktivieren>
              </Partner01_Tkt_Spielpaarung>          
            </Partner01_Tkt_Spielpaarung>
            <BMGTicketingTranslationList>
              <BMG_Ticketing_Translation_List>
                <Key>68;f8MAAH0TrxUBAAJ7/zIAMAAwADEALwAyADAAMAAyAAAAAAAAh3EXAAACe/9FAE4ARw==10;34335444340;</Key>
                <Record_ID>Spielserie 2017: 2001/2002</Record_ID>
                <Field_Number>6001</Field_Number>
                <Language_Code>ENG</Language_Code>
                <Description>11</Description>
              </BMG_Ticketing_Translation_List>
              <BMG_Ticketing_Translation_List>
                <Key>68;f8MAAH0TrxUBAAJ7/zIAMAAwADEALwAyADAAMAAyAEEAAAAAAACHcRcAAAJ7/0UATgBH10;34335469640;</Key>
                <Record_ID>Spielserie 2017: 2001/2002A</Record_ID>
                <Field_Number>6001</Field_Number>
                <Language_Code>ENG</Language_Code>
                <Description>22</Description>
              </BMG_Ticketing_Translation_List>
              <BMG_Ticketing_Translation_List>
                <Key>68;f8MAAH0TrxUBAAJ7/zIAMAAwADIALwAyADAAMAAzAAAAAAAAh3EXAAACe/9FAE4ARw==10;34335504010;</Key>
                <Record_ID>Spielserie 2017: 2002/2003</Record_ID>
                <Field_Number>6001</Field_Number>
                <Language_Code>ENG</Language_Code>
                <Description>33</Description>
              </BMG_Ticketing_Translation_List>
              <BMG_Ticketing_Translation_List>
                <Key>68;f8MAAH0TrxUBAAJ7/zIAMAAwADIALwAyADAAMAAzAEEAAAAAAACHcRcAAAJ7/0UATgBH10;34335525530;</Key>
                <Record_ID>Spielserie 2017: 2002/2003A</Record_ID>
                <Field_Number>6001</Field_Number>
                <Language_Code>ENG</Language_Code>
                <Description>44</Description>
              </BMG_Ticketing_Translation_List>
              <BMG_Ticketing_Translation_List>
                <Key>68;f8MAAH0TrxUBAAJ7/zIAMAAwADMALwAyADAAMAA0AAAAAAAAh3EXAAACe/9FAE4ARw==10;34335541890;</Key>
                <Record_ID>Spielserie 2017: 2003/2004</Record_ID>
                <Field_Number>6001</Field_Number>
                <Language_Code>ENG</Language_Code>
                <Description>55</Description>
              </BMG_Ticketing_Translation_List>
              <BMG_Ticketing_Translation_List>
                <Key>68;f8MAAH0TrxUBAAJ7/zIAMAAwADMALwAyADAAMAA0AEEAAAAAAACHcRcAAAJ7/0UATgBH10;34335559990;</Key>
                <Record_ID>Spielserie 2017: 2003/2004A</Record_ID>
                <Field_Number>6001</Field_Number>
                <Language_Code>ENG</Language_Code>
                <Description>66</Description>
              </BMG_Ticketing_Translation_List>
              <BMG_Ticketing_Translation_List>
                <Key>60;f8MAAH0TrxUBAAJ7/zIAMAAxADYALwAxADcAAAAAAACHcRcAAAJ7/0UATgBH10;34330126530;</Key>
                <Record_ID>Spielserie 2017: 2016/17</Record_ID>
                <Field_Number>6001</Field_Number>
                <Language_Code>ENG</Language_Code>
                <Description>Test Test</Description>
              </BMG_Ticketing_Translation_List>
            </BMGTicketingTranslationList>
          </Partner01TktSaisonComplete>
        </Read_Result>
      </Soap:Body>
    </Soap:Envelope>

  • In reply to PierreC82:

    Hello,

    Maybe try it on OnOpenPage trigger.
    It should work.
    I have done this before and it worked.
    Can't remember on which trigger I had the filter.

    regards,
  • In reply to THomas Barbut:

    Hello,

    unfortunately this don't work. I guess that is not possible.

    Regards
    Pierre
  • In reply to PierreC82:

    RecordID is a very special field. It's 250 characters long, but when you export it, then you only get the same "representation" as if you just put it into a page. You just get a text with the table name and primary key.
    You could create a function which would return the value in a more useful fashion.
Related