Hi,
I am brand new to Suite CRM and would appreciate some help and/or advice. I need to create a new module which reads a list of publications from a database on another server. This list would then populate the choices (possibly with a dropdown) for a field in the new module.
Our not-for-profit, when requested, sends out publications. We need to be able to create a contact or pull up an existing contact and then from our list of publications (in the database), populate multiple fields with which publications were sent and when they were sent.
We want to be able to see that contact John Johnson received publications A, B and C on 03/01/2016 for example.
Does anyone have any suggestions as to where to start or possibly where I might find some documentation that might point me in the right direction?
Thank you in advance.
I would suggest you look into using the REST API to update the database in SuiteCRM from your external database application.
1 Like
That makes sense. However, I’m not seeing much help/documentation for that. I can see the sugar documentation such as here
http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.5/API/Web_Services/REST/
and here
http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.5/API/Web_Services/Legacy_REST/SOAP_APIs/Examples/REST/PHP/
I don’t see the equivalent REST for SuiteCRM located someplace similar to
{site}/v2/rest.php
or
{site}/v10/rest.php…
I apologize if this is a stupid question. But how does the REST API work for SuiteCRM as compared to SugarCRM?
Again, thank you for any light you can shine on this for me.
yes there’s the equivalent (and same) from SugarCRM in SuiteCRM http://yoursuitecrminstante/service/v4_1/ and you’re reading the wrong documentation, that’s for 7.5 (pro version of SugarCRM) you need to read the Community version http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_6.5/
best regards
1 Like
Thanks so much for your suggestions and insight Andy @andy and Mike @mikebeck!
I’ve been pondering this for the past few days trying to think of the best plan of attack. I’ve also been getting to know SuiteCRM a little bit better.
I failed to explain the full scope of what we need as I really hadn’t thought the whole process through. Here is, I hope, a better summary.
We need the ability to pull up or create a contact.
a. From the contact detail overview or the edit view of that contact, we need to see a list of all publications that have been sent in the past to that contact as well as the dates they were sent.
b. From the add contact screen or the edit contact screen, we need access to our entire list of publications (maybe 100). This list is held in a mysql database on another server.
c. We need to be able to select one or more of those publications and have the name of the publication/s and the current date (date sent) saved in association with that contact (in the SuiteCRM database).
As I look at the many built-in modules in SuiteCRM, I wonder if I could repurpose one that we don’t need. For example, we have no need for the contract module. What if I rename that module, hiding most of the fields and trying, somehow, to incorporate this new functionality into that module? Or perhaps a different unneeded module, if it more closely matches our needs. Is this completely ridiculous? Am I missing an obvious road block?
I’ve not worked with REST API but would like to learn.
Again, any and all help is very much appreciated!
I think what you should do is not re-purpose an existing module but create a custom module with only the fields you need. The basis for the custom module can be created very easily by using suite’s built in module builder. This will let you create and deploy a basic custom module which you can then use to modify the code to do what ever you want.
With regards to the REST API that is used for creating records in Suite from an external application and pulling data from Suite into an external application. What you want to do is Pull data from an external application into Suite which is slightly different. Does your external application have its own web service API or anything like that? if so you would want to use that from the code side of your custom module to pull in the data and then manipulate it in Suite. if both these applications are going to be deployed on the same server could you not just use code in your custom module to connect directly to the other applications database then it should be no problem at all to do what ever you want with the data assuming you have the coding skills.
1 Like
Is the external database on the other server a well known product or a custom application? If its a well known application what is it?
1 Like
Andy,
No, it is just an in-house (different server) list of available publications. The list does get updated regularly which is why we want to access the original list and not a duplication of it.
It might be possible to launch SuiteCRM on the same server if that would help.
https://attra.ncat.org/
If there is no API to use then really all you need to be able to do is connect to the remote database from the custom PHP code you would need to write in the custom SuiteCRM module. If your company runs both servers then it really shouldn’t be that difficult for a developer to do.
Really the difficulty here will be learning how to develop on SuiteCRM. See this post for links to resources etc https://suitecrm.com/forum/developer-help/9102-how-to-get-started-developing-with-suitecrm
1 Like
Thanks again for your help. After working on other projects for a while, I’m finally able to focus on this project again.
Here’s my stupid question. As I study the structure of the files etc. of SuiteCRM, I’m wondering how the modules relate to one another. You suggested creating a new “module”. However, I want my new module to be part of an existing module, ie the contact module. I might be getting the terminology confused, so please forgive me if that’s the case. I need the list of publications to show up (or my publication module) when a user views the contact module for an individual. How do I insert my new module, if you will, within an existing module? Or, how do I associate my new module with the contact module?
I hope that makes sense.
Thanks again in advance.
I don’t see where to edit my last post, so I’ll mention it here.
After more reading, more edits etc…
I need the list of publications to show up (or my publication module) when a user views the contact module for an individual. How do I insert my new module as a subpanel, within an existing module?
I have made progress. I’ve created a new module and defined the relationships so that my new module is a sub-panel for the contact module.
I now need to customize my code to retrieve from a database the contents for a dropdown list that a use can use to select the publication name to populate the publication field.
Can someone please tell me where these edits should be made? Where do I put my custom code? /custom/Extension/modules/MyNewModule/Ext/Layoutdefs?
@Andy,
Which code are you referring to here?
“If there is no API to use then really all you need to be able to do is connect to the remote database from the custom PHP code you would need to write in the custom SuiteCRM module.”
I have created a new module and defined the relationships so that my new module is a sub-panel for the contact module.
I now need to customize my code to retrieve from a database the contents for a dropdown list that a use can use to select the publication name to populate the publication field.
Can you tell me where these edits should be made? Where do I put my custom code? /custom/Extension/modules/MyNewModule/Ext/Layoutdefs?
Thank you in advance!