ONLY external database in custom subpanel

Hello guys, itā€™s been so long since I post or reply here, been busy with other projects but always using suitecrm. Iā€™m stuck in a task and I would like your help, sadly my friend @pgr left the community, maybe he know what I need.

I would like to show in a subpanel under Accounts module that particular account balance getting that info from our ERP, IĀ“ve tried to manipulate the custom subpanel but it seems that it always requires an internal relationship. Tried to replicate the ā€œpurchased productsā€ subpanel

I donā€™t think a hook can work this time because thereā€™s no data to retrieve internally, only externally.

What Iā€™m doing currently is an iframe that shows the data from another website but is not what I want.

Iā€™m using Suitecrm 7.11

you can use in subpanel array ā€˜get_subpanel_dataā€™= ā€œfunction:function_nameā€
and in this function macke data.

Mike, I tried a iframe for my situation, but it couldnā€™t load the page presumably because you need to be a logged-in user to view the page. Couldnā€™t figure out how to format the url to pass the credentialsā€¦ grr. I will keep watching this thread for inspiration =)

I did try this, using the Purchased Products as an example and also using this guide https://www.urdhva-tech.com/blogs/add-custom-subpanel-in-accounts-module but in both cases they are consuming local data, not external data.

do you manage the external web page? if you do, you can configure your parameters to pass some hash as login (not a great thing to do). in my example I pass the Account number as a parameter to get the external data shown in SuiteCRM as an iframe, but I want as a subpanel with the format of suitecrm.

Hi @mikebeck ! Good to see you again!

Me, left the Community?


Nah, still just barely hanginā€™ onā€¦

Iā€™d say you have to separate problems to solve here:

1. Getting the data from the external system

This will be a classical ā€œwrite PHP to grab data from an APIā€ problem. If your system provides a good API, you get clean data (JSON for example). If it doesnā€™t, then you will need to get HTML and parse it to get the data.

2. Showing it in a subpanel

It should be possible, although Iā€™ve never done it. If you canā€™t find a way to inject an array directly into the subpanel (which should be possible somehow), you can still try writing your data to a temporary table in the database, so you could then tell the subpanel (through the get_subpanel_data function) the SQL it could use to retrieve it.