is there any way to insert a salesforce record upon clicking of submit in smart capture form for cloud pages.
This are the following approach that I'm thinking of but I'm not sure if they're possible.
1.) I have a validation for my smart capture form field via , Is it possible to add SSJS inside this script so if all is valid I can just do a SSJS to insert salesforce record?
2.) Pass a primary key to the thank you cloud page. So upon clicking of submit it will be redirected to a thank you page from there I can use the primary key to get values from to the dataextension and insert in salescloud with ampscript
Any recommendation would be swell.