Skip to content

[BUG] Create New File wizard ID selection does not work with preprocessor symbols #662

@PeterConijn

Description

@PeterConijn

In order to phase out non-table objects, we often surround them with preprocessing symbols after obsoleting them, in order to free them up for reuse.

However, when we do this, the AZ AL Create New File wizard does not recognize that and sees the object ID (in this case 11094985) as available. It probably checks the first line, but needs to ignore preprocessing (#) lines if the preprocessing lists the code in between as active.

#if DW127 or DW128
codeunit 11094985 "SOAP Management W1 ELC"
{
    Access = Public;
    ObsoleteState = Pending;
    ObsoleteReason = 'Soap handling is now done in the standard SOAP codeunits "SOAP Web Service Request Mgt." and "Soap Client SYS ELC"';
    ObsoleteTag = '27.3';

    [...a whole bunch of obsolete code...]
}
#endif

Reproduction Scenario:

  1. Surround the first or second object in your range with preprocessing symbols as above - make sure you choose symbols that mark the code as enabled
  2. Run the new file wizard for that object type
  3. Note that the object ID matches your preprocessed object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions