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
santosh kottesantosh kotte 

Visualforce page

when visualforce page is loading i want to intrest a record everytime automatically is it possible,if possible How?
please any one can  give answer 
Best Answer chosen by santosh kotte
Himanshu ParasharHimanshu Parashar
Hi Santosh,

We can't perform DML operation inside controller but you can use standard action attribute while page load to achieve that.
 
<apex:page controller="CController" action="{!insertaction}">
   
</apex:page>

Let me know if you need more details.

Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant

P.S.  If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
 

All Answers

Himanshu ParasharHimanshu Parashar
Hi Santosh,

We can't perform DML operation inside controller but you can use standard action attribute while page load to achieve that.
 
<apex:page controller="CController" action="{!insertaction}">
   
</apex:page>

Let me know if you need more details.

Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant

P.S.  If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
 
This was selected as the best answer
santosh kottesantosh kotte
Thanks
can you give more details so that i can understand please

Thanks
santosh