You need to sign in to do that
Don't have an account?

Visualforce page keeps loadingand freeze
I have a custom object (contact request form ), and when you click the "Search Contact" button, it takes you to a VF page. When I use it as an internal Salesforce user, everything works fine. When I use it as a portal user , it used to work fine, but now the page keep loading and loading. When you click the "x" button on the browser, and click the "Search contact" button again, it works. What is wrong here? Thanks!
I think you are having some infiniteloop issue in the controller.
Please check the controller constructor and action method.
Regards,
BDatla
@BDatla: Thanks for your suggestion. This is the controller:
Can you please share VF page .
Regards,
BDatla
This is the VF page to search contact:
When you type in "First name" and then click on "Search Contact", it keeps on loading and loading
Can you please run the below query as portal user and other user and let me know the count separately?
select Account.Name,Name,FirstName,LastName,Email,title,Id from Contact whereFirstName like :userinput1+'%' and LastName like :userinput2+'%' and Account.Name like :userinput3+'%']
May be it is taking lot of time to process the collection ??
Regads,
BDatla
Thanks,
replace portaluser id in the below query and execute in the developer console execute anonymous let me know the result.
User u = [select Id from user where Id =' please type the ID here']
System.runAs(u) {
List<contact> contactList = [select Account.Name,Name,FirstName,LastName,Email,title,Id from Contact whereFirstName like :userinput1+'%' and LastName like :userinput2+'%' and Account.Name like :userinput3+'%'];
System.debug('contactList size : ' + contactList.size() );
}
check in the debug log the value for contactList size :.
Regards,
BDatla
Line: 2, Column: 0
unexpected token: 'System.runAs'
Thanks,
I added a debug log on the portal user, does this make any sense?
Hi ,
Ok,I thought as you are not a developer you may find bit difficult to find the debug log thats why i said to run the query
Can you please get the debug log after clicking the "Search Contact" button ,as you facing issue after clicking this button.
After that please add the below test class and let me now the result if possible post the debug log for this one too.
@isTest private class testloop{
static testMethod void testloopcount() {
User u = [select Id from user where Id ='005F0000004y25sIAA']
System.runAs(u) {
List<contact> contactList = [select Account.Name,Name,FirstName,LastName,Email,title,Id from Contact whereFirstName like:userinput1+'%' and LastName like :userinput2+'%' and Account.Name like :userinput3+'%'];
System.debug('contactList size : ' + contactList.size() );
}
}
}
Regards,
BDatla