Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
719
stars
242
forks
source link
Custom Filter Token do not work for GUID Fields #7728
1. Describe the bug
Custom Filter Token do not work for GUID Fields
2. To Reproduce
Steps to reproduce the behavior:
Implement an Custom Filter for a GUID Field.
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Filter Tokens", 'OnResolveTextFilterToken', '', true, true)]
local procedure OnResolveTextFilterToken2(TextToken: Text; var TextFilter: Text; var Handled: Boolean)
begin
if StrLen(TextToken) < 5 then
exit;
if StrPos(UpperCase('MYFILTER'), UpperCase(TextToken)) = 0 then
exit;
Handled := true;
TextFilter := '{00000000-0000-0000-0000-000000000001}'
end;
Test the custom filter token on the modified by field on customer card.
Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient.
3. Expected behavior
I Expect the custom filter tokens to work for guid fields like any other data type
4. Actual behavior
An Error Message is shown:
The filter "%MYFILTER" is not valid for the Modified By field on the Customer table. The variable "%MYFILTER" was not understood.
5. Versions:
AL Language: v13.0.971907
Visual Studio Code: 1.88.1
Business Central: 24.0
List of Visual Studio Code extensions that you have installed: none
Final Checklist
Please remember to do the following:
[x] Search the issue repository to ensure you are reporting a new issue
[x] Reproduce the issue after disabling all extensions except the AL Language extension
[x] Simplify your code around the issue to better isolate the problem
Hi, this issue is out of scope of for this repository. You should do one of the following:
Open a support request to CSS through the PartnerSource portal
Open a bug in Collaborate
Contact your Service Account Manager (SAM) in your local subsidiary to understand what is included in your contract as of support incident and PAH (Partner Advisory Hours). Your SAM might also direct you "step by step" how to open a support request or how to get credentials, if this is the first time for you or your company
As a reminder, this repository only handles issues to do with the compiler or VSCode development experience for AL.
Please include the following with each issue:
1. Describe the bug Custom Filter Token do not work for GUID Fields
2. To Reproduce Steps to reproduce the behavior:
Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient.
3. Expected behavior I Expect the custom filter tokens to work for guid fields like any other data type
4. Actual behavior An Error Message is shown:
The filter "%MYFILTER" is not valid for the Modified By field on the Customer table. The variable "%MYFILTER" was not understood.
5. Versions:
Final Checklist
Please remember to do the following:
[x] Search the issue repository to ensure you are reporting a new issue
[x] Reproduce the issue after disabling all extensions except the AL Language extension
[x] Simplify your code around the issue to better isolate the problem