I’m not able to find which piece of code maps the logged user to the customer or supplier in the portal.
For eg in Issues - Customer is mapped in the Issues doctype when the website user creates it. I’m trying to replicate the same for a custom doctype, but not able to.
I have mapped the website user as contact to the customer. Still the customer field (field type: link) in the doctype doesnt get populated, and also the user restrictions are not applied.