+ Start a Discussion

Customer Portal Profile User - create Accounts?

Can Customer Portal Profile users create accounts - with a custom controller?


They do not have create or edit access to the Accounts object normally, but was wonderingn if I were to create a custom controller - can I bypass this?


The license type is Customer Portal Manager Custom (or Standard).


If the page creates records based on the user input, then yes account can be created by Portal users.


Portal users would have to have access to the class and vf page


In technical terms, the system would create the account....


Do you have any code samples or point to the documentation that show how to do this? I can only find UserInfo methods relating to this, and i'm pretty sure that's not what I want...


Actually, i think I know what you're talking about. On a side-note - would you happen to know how to (or how to search for) inserting a record (Account), grabbing its newly created Id, and passing that value back to a different record(contact) to reference?


I'd basically to create both the account and contact, on the same page. 


Actually, I lied - i'm not sure how to do this.




You create a VF page with a custom controller and give access to the page and controller to the partners


in the controller, you define variables


Then you have inputText boxes on the VF pg to capture the information and set the value of the inputtext boxes to each variable respectivly.


Then you write a method to save


public Ragereference doSave(){


   Account a = New Account(varA = inputA, varB = inputB);

insert a;





Keep in mind that classes and triggers run in system mode so unless you specify "with sharing" you can pretty much write anything with them, but you have to code it first.