Posting this type of question to the FM Pro Forum (see tab at top of screen) is more likely to get you a faster response and from more forum participants.
Your script needs to also create a new record in the CustCom join table.
Add this step to the very beginning of your script:
Set Variable [$CustomerID ; value: Customer::CustomerID ]
Add these steps to your script right after creating the new company record:
Set variable [$CompanyID ; value: Company::CompanyID]
Go To layout ["custcom" (custcom)]
Set Field [CustCom::CompanyID ; $CompanyID ]
Set Field [CustCom::CustomerID ; $CustomerID ]
Then when you return to your customer layout, you should see a new, blank record in your portal.