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:
Here is the filter in the sub page:
SetRecLinkFilter(RecId : RecordID)
SETRANGE(“Record ID”, RecId);
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.
Maybe the unfiltered result is in the cache of the browser.
Try to clear it.
Also check if it works with onaftergetrecord trigger.
After the current record is retrieved from the table.
When a record has been retrieved but not yet displayed.
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 (7.03 KB)
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.
unfortunately this don’t work. I guess that is not possible.
September 29, 2017, 4:02pm
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.