Pass parameters to an external website Dashlet

Hello everybody,
i created a very little website to manage some private information and i used SuiteCRM APIs to get users and to control their log-in.
My goal is to create a dashlet in the SuiteCRM homepage that is a web iframe with my little portal inside.
In your opinion, how can i get the current user info (session and into this dashlet?
I would like to bypass the second login with the same username and password!
Thankyou :blush:

For security reasons, browsers don’t allow that behavior anymore (I might be wrong on that one) .

The solution could be if your other site allows to embed the user id and password In the URL. Something like

That way you can use a logic hook to customize the URL to match the logged user’s information.

Thanks for the reply Broz! The solution seems to be ok but I’m not sure about what you mean; is there a way to have a process_record logik hook also in the iFrame Dashlet? In this case you suggest to override the $url in the iFrame with the $url . ‘?sessionId=12345&userId=7890’;
any suggestion about how to do this? :grinning:

This one might help you

Ok now I understand what you mean; the fact is that I need to use the iFrame Dashlet, that in my opinion seems more clean as a solution; maybe there’s a way to process the variable of the url to open in the frame!

Hi everyone, after a week of testing i thnk the one by pgr was not the solution i was looking for; i would like to understand better how the iFrame Dashlet works; i think it’s better to process the url while the iFrame is generated. Have you got any other suggestion? :pray:
thank you again, ale

What happened when you tried?

What is still missing?

I don’t really understand where you’re at currently, so it’s hard to help you…

The screenshot represents what i need from the processig of thw Website Dashlet!
That is not a field by any module i guess; am i wrong?
Thank you again

What does that mean?
The site you want to show inside the Dashlet requires authentication? You need to establish a session with it?

Is it the same session as SuiteCRM, or a different one?

You probably need some custom code to add that kind of parameters to the URL. But if you can make the site not need the session authentication, that’s easier.

Have a look at this dashlet here, it uses a custom entry-point. That way you can put whatever PHP code you like to make up the dashlet:

Yes to all your questions; my website uses the same SuiteCRM autentication, so could be enough to pass the session id of the autenticated user!

Ok, if you can get it to work. I don’t know how to do that…

With the entry-point, you get full control.

thank you pgr, it worked wih a custom entry point!
thankyou again!

1 Like