Prospects (Targets) not available when performing a meta module list

I am very new to SuiteCrm, I have installed v7.11.18, I have managed to get to grips with the V8 api and successfully integrated with both contacts and leads, however, I am stumped on something I suspect is obvious: I want to interact with Prospects (Targets) and ProspectLists (Target Lists) as I need to generate these from a separate data set, however when I call {suite.url}/V8/meta/modules neither Targets nor Prospects appear in the list of modules, how do I enable them?

Take a look into these posts for some ideas:

Thanks for the response, but the Prospects and ProspectLists are not custom modules as I understand it, they are part of the standard modules - when debugging the meta list I can see that Prospects and ProspectLists are in the $moduleList but are never returned.

So the reason I cannot see Prospects is because it is in the $modInvisList in modules.php, if I comment out Prospects and ProspectLists then these appear as modules and I seem to be about to interact with them in the same way as Leads and Contacts. Am I ok to carry on using them this way? is there a reason that these modules would be deemed ‘Invisible’?

Could this be related to the Display Modules and Subpanels option in Admin?

It wouldn’t make much sense to restrict the API because of that, but I am just wondering.

Thanks for your reply.

Prospects are all set as Displayed in the admin settings, if you look in Api/include/modules.php it creates a list called $modInvisList which is used by ModuleListProvider->getModuleList() which gets the module list, removes modules that your ACL is disabled, then calls $this->removeInvisibleModules($modules) which strips out any module in the $modInvisList from the returned set. $modInvisList is only ever setup once - nothing seems to override it so my concern was that Prospects should not be used by the API, I am just in the process of testing that out now and assuming it all works I will post back here.


This all works fine, so ploughing on in this direction.

Do you see any reason why these modules should be unavailable through the API? I don’t. Maybe we should make a PR to fix this, don’t you think?

The only thing I noticed was that I couldn’t create relationships to leads (even though I tried to setup the relationship through Studio), but that was not an issue for me as it is not critical.

A PR would be a good idea, I have no idea how to raise a PR :smiley:

There is documentation

… but if you have problems you can ask on GitHub, everybody will try to help you, since we all know there’s a learning curve, and yet we are interested in having Community contributions.

It it’s too much or you just don’t have the time, just open an issue describing this and copy-paste your code changes in there. That’s a starting point to get help raising a PR.

I wonder if the issue with the Target relationships is because the standard way of relating Targets to the modules is through the Target List. Maybe that causes some issues when trying to relate directly, I don’t know.

Done, I created a bug and then a subsequent pull request, hopefully following the convention all the way through

Nice work!

Looks good to me.

I have to warn you that Github has been a bit slow so don’t expect this to get merged anytime soon. But if you’re lucky, it might (it’s not a complicated PR to assess), and anyway, its existence is useful because it documents the problem and provides a solution to anyone Googling around for this.

Thanks :tada: