I have a visualforce which is just used to send the Json data when we make a callout to the page with some parameters passed in the URL. Error is showing in the following line. Please help in get through this issue.
<apex:page controller="controllerClass" readOnly="false" contentType="application/json" action="{!StartUpAction}" showHeader="false" sidebar="false" standardStylesheets="false" >
update pm;
In controller method ActionMethod()
I am getting the Parameter from the Url and updating an object and then returning the Json
.
Here is the code of the Page:
<apex:page controller="GridJSONService" ... action="{!StartUpAction}">
<apex:outputText escape="false" value="{!Output}" />
</apex:page>
Here is the code of the Controller :
public with sharing class GridJSONService {
public GridJSONService () { /* constructor */ }
public void StartUpAction()
{
// intermediate logic
Planning_Model__c pm = [Select ID,Comments__c from Planning_Model__c where ID =: u_RowId];
pm.Comments__c = u_Comment;
update pm;
// other logic
}
}