You need to sign in to do that
Don't have an account?
Rafael Franco Moreno 24
error vf
I have this error when save text:
Insert failed. First exception on row 0 with id 0035f000008gFMYAA2; first error: INVALID_FIELD_FOR_INSERT_UPDATE, cannot specify Id in an insert call: [Id]
Error is in expression '{!save}' in component <apex:commandButton> in page mensaje: Class.mensajeController.save: line 25, column 1
An unexpected error has occurred. Your development organization has been notified.
<apex:page controller="mensajeController" >
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="Process Selected" action="{!processSelected}" rerender="test"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!contacts}" var="c" >
<apex:column >
<apex:inputCheckbox value="{!c.selected}"/>
</apex:column>
<apex:column value="{!c.con.Name}" />
<apex:column value="{!c.con.Email}" />
<apex:column value="{!c.con.Phone}" />
</apex:pageBlockTable>
</apex:pageBlock>
<apex:pageBlock >
<!--<p>Current description: {!mensajeContenido}</p>-->
<p>Current description: {!oMessageDescription}</p>
<p>Change description to:</p>
<!--<apex:inputTextarea id="newDesc" value="{!mensajeContenido}"/><p/>-->
<apex:inputTextarea id="newDesc" value="{!oMessageDescription}"/><p/>
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlock>
<apex:pageBlock id="test">
Total No of Selected Records :<apex:outputText value="{!value }"/>
<apex:pageBlockTable value="{!SelectedContacts}" var="c" >
<apex:column value="{!c.Name}" />
<apex:column value="{!c.Email}" />
<apex:column value="{!c.Phone}" />
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
I’m saving a text in a vf
but don’t save that text
I have to do this:
enter a description of the message and finally be able to save
when saving what the controller must do is create a message object, with the description that we have entered, for each of the selected accounts
Insert failed. First exception on row 0 with id 0035f000008gFMYAA2; first error: INVALID_FIELD_FOR_INSERT_UPDATE, cannot specify Id in an insert call: [Id]
Error is in expression '{!save}' in component <apex:commandButton> in page mensaje: Class.mensajeController.save: line 25, column 1
An unexpected error has occurred. Your development organization has been notified.
<apex:page controller="mensajeController" >
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="Process Selected" action="{!processSelected}" rerender="test"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!contacts}" var="c" >
<apex:column >
<apex:inputCheckbox value="{!c.selected}"/>
</apex:column>
<apex:column value="{!c.con.Name}" />
<apex:column value="{!c.con.Email}" />
<apex:column value="{!c.con.Phone}" />
</apex:pageBlockTable>
</apex:pageBlock>
<apex:pageBlock >
<!--<p>Current description: {!mensajeContenido}</p>-->
<p>Current description: {!oMessageDescription}</p>
<p>Change description to:</p>
<!--<apex:inputTextarea id="newDesc" value="{!mensajeContenido}"/><p/>-->
<apex:inputTextarea id="newDesc" value="{!oMessageDescription}"/><p/>
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlock>
<apex:pageBlock id="test">
Total No of Selected Records :<apex:outputText value="{!value }"/>
<apex:pageBlockTable value="{!SelectedContacts}" var="c" >
<apex:column value="{!c.Name}" />
<apex:column value="{!c.Email}" />
<apex:column value="{!c.Phone}" />
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
I’m saving a text in a vf
but don’t save that text
I have to do this:
enter a description of the message and finally be able to save
when saving what the controller must do is create a message object, with the description that we have entered, for each of the selected accounts
Please update your Save method like below :
Thanks,
Maharajan.C
All Answers
Please update your Save method like below :
Thanks,
Maharajan.C