function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Priya MishraPriya Mishra 

how to insert the record the based on the record type.

Hello All,

I need to insert the record in the custom object based on the record type selected in the vf page. please help me with sample code.

thanks in advance.
srinivas raj 1srinivas raj 1
Just remove the If . It is not required. As you are not setting value to po.recordtypeid so it is blank also you are comparing blank with string having value.

Also add the debugs before if to check values of string.
ghdsports (http://www.ghdsports.org)