How to create a relationship using module loader?

I get the error "Manifest file must specify the package type" when I use the following manifest.

$manifest = array (
0 =>
array (
'acceptable_sugar_versions' =>
array (
0 => '9.0.3',
),
),
1 =>
array (
'acceptable_sugar_flavors' =>
array (
0 => 'PRO',
),
),
'readme' => '',
'key' => 'JCCC',
'author' => 'JCCC',
'description' => '',
'icon' => '',
'is_uninstallable' => true,
'name' => 'Courses',
'published_date' => '2020-08-10',
'type' => 'module',
'version' => 1379709849,
'remove_tables' => 'prompt',
);

$installdefs = array(
'relationships' => array(


array(
'meta_data' => '<basepath>/SugarModules/relationships/relationships/accounts_contacts_1MetaData.php'
)
);

Parents
  • The error is that it is not recognizing the Type of the package. I think your problem is at the beginning of your definition.

    Try this

    $manifest = array (
    'acceptable_sugar_versions' =>
    array (
    0 => '9.0.3',
    ),
    ),
    'acceptable_sugar_flavors' =>
    array (
    0 => 'PRO',
    ),
    ),
    'readme' => '',
    'key' => 'JCCC',
    'author' => 'JCCC',
    'description' => '',
    'icon' => '',
    'is_uninstallable' => true,
    'name' => 'Courses',
    'published_date' => '2020-08-10',
    'type' => 'module',
    'version' => 1379709849,
    'remove_tables' => 'prompt',
    );
  • Still getting the same response.

  • Looks like I missed some parentheses. Try this:

    $manifest = array (
    'acceptable_sugar_versions' =>
    array (
    0 => '9.0.3',
    ),
    'acceptable_sugar_flavors' =>
    array (
    0 => 'PRO',
    ),
    'readme' => '',
    'key' => 'JCCC',
    'author' => 'JCCC',
    'description' => '',
    'icon' => '',
    'is_uninstallable' => true,
    'name' => 'Courses',
    'published_date' => '2020-08-10',
    'type' => 'module',
    'version' => 1379709849,
    'remove_tables' => 'prompt',
    );
Reply
  • Looks like I missed some parentheses. Try this:

    $manifest = array (
    'acceptable_sugar_versions' =>
    array (
    0 => '9.0.3',
    ),
    'acceptable_sugar_flavors' =>
    array (
    0 => 'PRO',
    ),
    'readme' => '',
    'key' => 'JCCC',
    'author' => 'JCCC',
    'description' => '',
    'icon' => '',
    'is_uninstallable' => true,
    'name' => 'Courses',
    'published_date' => '2020-08-10',
    'type' => 'module',
    'version' => 1379709849,
    'remove_tables' => 'prompt',
    );
Children