Hello everyone,
How can I get the self-created “filter code” to work? Unfortunately, I couldn’t find anything in the documentation or videos. What I saw in a video was that Erik had also stored self-created filter codes.
Best regards,
Andre
You have to create an AL extension that subscribes to the event in codeunit 70319679.
Just checked, make sure you’re on the latest version of Advanced Cloud Security… There’s a new event replacing the original one.
Hi Erik,
I think I was too hasty with the screenshots, because I can’t find a way to attach files to this question. Am I blind, or do I have to create a new question for that? There you have the option to upload files.
I am currently updating to version 6.0.0.158.
So, with the new event, the filtering no longer works. I programmed the following in the event subscriber:
[EventSubscriber(ObjectType::Codeunit, Codeunit::”ACS Published Events EFQ”, GetFilterCode2, ”, false, false)]
local procedure GetFilterCode2(FilterCode: Record “ACS Filter Code EFQ”; User: Guid; var FilterValue: Text)
var
ACSUserSec: Record “ACS User Filter EFQ”;
begin
// Message(‘%1’, FilterCode.Code);
if (FilterCode.Code = ‘KWG01’) then
if ACSUserSec.Get(User) then
FilterValue := ACSUserSec.”KWG_Kitchenfilter”;
// FilterCode.();
// FilterCode.Modify();
end;
I can’t even get into the event with the debugger, which means that the event is probably not being triggered yet. Or I’m doing something completely wrong.
Have you added your User Filter to the list and marked it as event driven?
Hi Erik,
Thanks for the reply.
I’ve now done it with the code unit, but I don’t think I’ve done it quite right. I’m sending a screenshot of the code. So it works—the filter is used from the filter page and the filtering also works. The selection is filtered on the standard “Contact List” page, but on a page created by another app, the fields are no longer visible (see screenshot). I couldn’t find the page under Problem Fields. The page also no longer displays any fields when I remove the filters for my user. Do you have any idea what I’m doing wrong?