Creator : Adding a customer record on sign up - getting the zohoid
I have an external sign up form and when the new user signs up I use the following script to update the customer portal :
thisapp.portal.assignUserInProfile(input.Email,"nzaas");
What I want to do is also add a record to a form called customers and then link it to the customer portal account with a user field :
insert into customer
[
Added_User=zoho.loginuser
customer_name=input.Name
email=input.Email
customer_account = ??? (this is a user field)
]
However I need to insert a customer_account field which is the zoho id. I can't use the zoho.loginuser value as the customer may sign up and not log in immediately but I can update this new record in the customer portal info with the first piece of script. So there must be a way to access that value ...

So how can I lookup the portal customer name using the email they signed up with ?