"Use HubSpot contact search API to search the contact from there you can get the property of the object as well if it is found. Now you have to Contact update API to update the contact property. If you are still not able to do this then please let me know and I'll provide the curl of both the API.
If your property is not updated then recheck the internal name of the property you are updating, if it is still not updated please share the SS of error msg you are getting Or share your code."
"I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member. Thanks!"
Trying to update user's first name and last name based on property 'updated by user id'
SOLVE
@AkshayPanchal - just validated that Company property 'hs_updated_by_user_id' does return the value indicated in the owners API and designated as 'userId' in that JSON.
I'd advise a two step test:
- make sure you can write a static test string successfully to your custom Company property
- Mkae sure you matching code for userId returns valid first/last name values
If both these work, then, as I understand your question, you should be in business.
"Use HubSpot contact search API to search the contact from there you can get the property of the object as well if it is found. Now you have to Contact update API to update the contact property. If you are still not able to do this then please let me know and I'll provide the curl of both the API.
If your property is not updated then recheck the internal name of the property you are updating, if it is still not updated please share the SS of error msg you are getting Or share your code."
"I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member. Thanks!"
Trying to update user's first name and last name based on property 'updated by user id'
SOLVE
Hi @GRajput , Thanks for input, this property is on company level. Hence, would need company API's is what I assume. The problem is according to the log, the code was implemented successfully but somehow the values do not show up in the property. As I am totally new to the HubSpot custom code world I am still researching what could go wrong.
Trying to update user's first name and last name based on property 'updated by user id'
SOLVE
@SteveHTM Yes I figured this yesterday that this property is read-only. So switched my approach. what I am now stuck with is that if there is a user that makes changes to one of my company property. This user should be reflected in another property 'updated by user name' but still no success.
Trying to update user's first name and last name based on property 'updated by user id'
SOLVE
Also bear in mind that there are now 3 (yes three) different user IDs which are used for different purposes in HubSpot - make sure you have the right ID type or translate from one to another using the APIs.
Trying to update user's first name and last name based on property 'updated by user id'
SOLVE
@AkshayPanchal - just validated that Company property 'hs_updated_by_user_id' does return the value indicated in the owners API and designated as 'userId' in that JSON.
I'd advise a two step test:
- make sure you can write a static test string successfully to your custom Company property
- Mkae sure you matching code for userId returns valid first/last name values
If both these work, then, as I understand your question, you should be in business.