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
hanmanthu kottalahanmanthu kottala 

why i am getting String index out range:-1 error ?

why  i am getting String index out range:-1 error ?
Vinit_KumarVinit_Kumar
Can you post your code ??

It's not clear as what you are doing !!
hanmanthu kottalahanmanthu kottala
<apex:page  standardController="account"  showHeader="false">
    <apex:form>
    <apex:pageBlock>
        <apex:pageBlockSection>
            <apex:inputText   value="{!account.Name}"/>
                <apex:inputText  value="{!account.phone}"/>
                    <apex:inputText  value="{!account.billingcity}"/>
        <apex:commandButton value="submit..." action="save....."/>
        </apex:pageBlockSection>
    </apex:pageBlock>
        </apex:form>
</apex:page>

Vinit_KumarVinit_Kumar
Can you elaborate what's the issue you are facing and what are you trying to acheive ??
ShashForceShashForce
This is happening because of the following line:

<apex:commandButton value="submit..." action="save....."/>

"save....." is not valid, please change it to

<apex:commandButton value="submit..." action="save"/>

I tried this and the error vanished.

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank
praveen murugesanpraveen murugesan
Hi hanmanthu,

Please check in a loop if you are iterating any string arrays.

Thanks,

Praveen Murugesan
hanmanthu kottalahanmanthu kottala
thanks vinit

hanmanthu kottalahanmanthu kottala
 I have created my custom object  fullname   and it have three fields  name (default), middlename,lastname . I written visual force  code 

<apex:page standardController="fullname" >
    <apex:form title="apex form">
       <apex:pageBlock>
           <apex:pageBlockSection>
           <apex:inputText  value="{!fullname.name}"/>
                <apex:inputText  value="{!fullname.middlename}"/>
                <apex:inputText  value="{!fullname.lastname}"/>
               <apex:commandButton  value="submit" action="{!save}"/>
           </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>
 

It showing error
    fullname does not exist 
Amit_Amit_
Hi Hanmanthu,

Have you created Custom Object with "fullname"...? if you create any custom object it is reffered by its API name in code like it will be "fullname__c"