You need to sign in to do that
Don't have an account?
Beth Walter
Visual Force Page Errors
This is all new to me. I don't know why I am getting error messages. Can someone please help fix the issue.
Error: Send_Email line 37, column 17: The element type "apex:page" must be terminated by the matching end-tag "</apex:page>"
Error: The element type "apex:page" must be terminated by the matching end-tag "</apex:page>".
<apex:page>
{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")}
{!REQUIRESCRIPT("/js/functions.js")}
sforce.debug.trace=true;
var records = {!GETRECORDIDS( $ObjectType.Ticket__c )};
if(records[0] == null)
{
alert("Please select at least one record.")
}
else
{
try
{
for(var i=0; i</records.length>; i++)
{
var objTicket = new sforce.SObject("Ticket__c");
objTicket.Id = records[i];
objTicket.Email_Ticket__c=true;
var saveRes=sforce.connection.update([objTicket]);
}
if (saveRes[0].success=='false')
{
alert(saveRes[0].errors.message);
}
}
catch(error)
{
alert("Error while Sending Email:=="+error);
}
}
</apex:page>
Error: Send_Email line 37, column 17: The element type "apex:page" must be terminated by the matching end-tag "</apex:page>"
Error: The element type "apex:page" must be terminated by the matching end-tag "</apex:page>".
<apex:page>
{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")}
{!REQUIRESCRIPT("/js/functions.js")}
sforce.debug.trace=true;
var records = {!GETRECORDIDS( $ObjectType.Ticket__c )};
if(records[0] == null)
{
alert("Please select at least one record.")
}
else
{
try
{
for(var i=0; i</records.length>; i++)
{
var objTicket = new sforce.SObject("Ticket__c");
objTicket.Id = records[i];
objTicket.Email_Ticket__c=true;
var saveRes=sforce.connection.update([objTicket]);
}
if (saveRes[0].success=='false')
{
alert(saveRes[0].errors.message);
}
}
catch(error)
{
alert("Error while Sending Email:=="+error);
}
}
</apex:page>
Sorry for this issue you are facing.
May I suggest you please give a try by using below code and let us know if it works for you. Hope this helps.
Kindly mark this as solved if the reply was helpful.
Thanks,
Nagendra
Error: Send_Email line 14, column 17: The element type "apex:page" must be terminated by the matching end-tag "</apex:page>"
Error: The element type "apex:page" must be terminated by the matching end-tag "</apex:page>".
Add following tag end of the page </apex:page>
After this :
alert(saveRes[0].errors.message);
}
}
</apex:page>
I have one doubt regarding this functionality this page you are calling in any button or completely vf page.
Please let me know your requirement so that we can help you accordingly.
Hope this helps you!
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.
Thanks
Varaprasad
@For Salesforce Project Support: varaprasad4sfdc@gmail.com
Salesforce latest interview questions :
https://www.youtube.com/channel/UCOcam_Hb4KjeBdYJlJWV_ZA?sub_confirmation=1
This is what I have now. I am still getting error messages.
Error: Send_Email line 15, column 16: The element type "apex:page" must be terminated by the matching end-tag "</apex:page>"
Error: The element type "apex:page" must be terminated by the matching end-tag "</apex:page>".
<apex:page>
{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")}
{!REQUIRESCRIPT("/js/function.js")}
sforce.debug.trace=true;
var records = {!GETRECORDIDS($ObjectType.Ticket__c)};
if(records[O]==null)
{
alert("Please select at least one record.");
}
else
{
try
{
for(var i=O;i</records.length>;i++)
{
var objTicket = new sforce.SObject("Ticket__c");
objTicket.Id = records[i];
objTicket.Email_Ticket__c=true;
var saveRes=sforce.connection.update([objTicket]);
}
if(saveRes[O].success=='false')
{
alert(saveRes[O].errors.message);
}
}
</apex:page>