Hello everyone, I don't know if this is the correct channel to ask this question, but if somebody could help, it would be great.
I have created a HubSpot multi step form UI extension using HubSpot CLI,
here is my Requirement: We are working on a multi-step form UI Extension embedded within a custom object (p_retirement_plans).
The requirement is to save form data step-by-step as the user progresses through each section.
What we've tried so far:
Initially, we used hubspot.records.update() directly to save form data, but it didn’t produce the expected results.
Then, we implemented a serverless function (saveRetirementPlan) to handle saving, inside serverless.json i have rendered this function correctly, and trying to invocate in my first form (Retirement plan details)
Issue:
The error occurs right after submitting the first step (Retirement Plan Details).
When the user clicks “Next,” the serverless function is triggered, but it fails with the error, means I'm not able to invocate the serverless function even everything goes well, getting this below issue:
[runServerlessFunction] 'name' field must be a non-empty string
This happens even though we're not explicitly passing a 'name' field and all required parameters are sent correctly.
Further we Attempt (Bidirectional Property Refresh):
We also implemented the bidirectional property refresh method (as per HubSpot’s GitHub example) to ensure updated property values after saving.
However, the issue persists, and we now get:
[runServerlessFunction] Failed to execute serverless function 'saveRetirementPlan': Unknown error (n/a)
This error occurs :
after submitting the first portion of the form.
All fields are properly filled and interacted with, yet the error still appears.
I've attached a Loom video walking through the issue step-by-step:
(
https://www.loom.com/share/4f4ad2b3892540e9ad67899002426f5f?sid=849104d7-4214-4864-ae71-f48565d4e39b)
here I simply wants to invocate the serverless function properly inside my multi Step form, so I can save the form field data in HubSpot CRM, so please let me know where I'm doing mistake or please provide me proper approach for this?