Open benknowles opened 7 years ago
getModules does in fact only return visible modules. The initialization should be reworked to do something like:
available = ["Accounts", "Contacts", ...] # populated from getModules
requested = ["Accounts", "Tasks"] # from configuration
modules_to_init = if requested.empty?
available
else
requested & available
end
@amalc This goes along with the other issue we were discussing previously about opening up rubyzoho into other services. "getModules" has been added to several services like Recruit so this will make initializing the default modules pretty straightforward without having to hardcode everything.
As of today if you try initializing a module that's hidden from the menu it will return an error so we definitely need to replace the hardcoded array at some point.
https://www.zoho.com/crm/help/api/getmodules.html
Need to verify that this doesn't include modules that are "hidden" which leads to an error code when initializing.