APIs & Integrations

GCP
Member

Updating Database

I have landing page #1 with a form. One of the fields on my form is called “special_id”. When the user submits the form, I will redirect the user to landing page #2.

On landing page #2, I will look up a url in HubDB based on the “special_id” field and perform a JS window.location.href = ‘…’ based on the value pulled from the database.

I plan to create a custom module for use on landing page #2. This module will access the database and force the “redirect”.

Some questions:

  1. Will landing page #2 have access to the property {{contact.special_id}} that was populated on form submission of landing page #1?

  2. Does landing page #2 have the ability to update a cell in the HubDB table using HubL? If not, can I make rest calls from my custom module to update a cell’s value?

0 Upvotes
5 Replies 5
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Updating Database

Hi @TomEjc,

Correct, server side scripting is not possible in HubSpot.

0 Upvotes
GCP
Member

Updating Database

From the documentation I see on HUBL regarding HubDB is that commands only allow read-only access to HubDB. In order to update HubDB, it seems a rest call is necessary. Can you share where this is documented as you explain above?

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Updating Database

@GCP You are correct. If you want to update a record in HubDB you can use this API here. It will have to be made server-side however.

http://developers.hubspot.com/docs/methods/hubdb/hubdb_overview

0 Upvotes
TomEjc
Participant

Updating Database

Yes… And how to create server-side script in Hubspot? I think it is not possible, is it?

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Updating Database

@GCP

  1. Yes it will!(using HubL)

  2. Yes it does have the ability to do so. — You cannot make a rest call as it would need to be a server-side call.

0 Upvotes