Would it be possible to extend a Core file using the defaultExt folder?

Hello!

I have the following question: would extending a Core file with a defaultExt folder be possible?

Specifically, I want to make a small change in core/app/core/src/lib/store/record-list/graphql/api.list.get.ts

But it seems it won’t take effect when I ran the build-dev:defaultExt

I followed the following documentation guide:

Motive: I want to add ‘%’ symbols to a list view field filters, so the user doesn’t need to add them by default.

Thanks!

  1. Enable the extension folder by setting 'enabled' => true, in the file at {ROOT}\extensions\defaultExt\config\extension.php
$extensions['defaultExt'] = [
    'remoteEntry' => '../extensions/defaultExt/remoteEntry.js',
    'remoteName' => 'defaultExt',
    'enabled' => true,
  1. Run php bin/console cache:clear from the command line at root path. Let it complete.
  2. Make your changes in typescript files.
  3. Run the yarn run build-dev:defaultExt --watch (let it complete) test the code changes in progress. Refresh the current page to verify the code change effects. Run 'yarn run build-dev:defaultExt' OR 'yarn run build:defaulExt' to include the extension package.

Using $sugar_config['search_wildcard_infront'] = true; in public/legacy/config_override.php should help.

1 Like