Configuration settings missing at module admin panel

I am building a module that reqiures an admin panel.

I successfully have created an Admin panel link that looks like: "javascript:parent.SUGAR.App.router.navigate("MyModule/config", {trigger: true});"

The module has a ModuleConfigApi class and also a setup of config-drawer layout in the same manner as the Opportunities and Forcasts modules.

When clicking on the link in the Admin panel I get the following notification: "MyModule Configuration Error MyModule does not have any configuration settings"

How do I come pass this, anyone that has done this before or that has any directions. How do I fix the "configuration settings"?

FYI: Sugar 7.6.1.0 ENT.

  • Hi.

    I'm not sure, but in module Opportunities has method:

    public static function setupOpportunitiesSettings()
    {
        $admin = BeanFactory::getBean('Administration');
        $oppsConfig = self::getDefaults();
    
        foreach ($oppsConfig as $name => $value) {
            if (is_array($value)) {
                $admin->saveSetting('Opportunities', $name, json_encode($value), 'base');
            } else {
                $admin->saveSetting('Opportunities', $name, $value, 'base');
            }
        }
        return $oppsConfig;
    }
    

    As I understand, this method works once when installing the module and creates a configuration for module with default values.

    You need create default configuration for your module.

  • I changed

    public static function setupMyModuleSettings

    to

    public static function setupkeyxy_MyModuleSettings

    the key was keyxy_.

    One step forward, the panels loads now. Just had to Rebuild & Repair.