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

Business and Personal Accounts look up
I am trying to add a look up to accounts in a visualforce page, however this look up only display business accounts, and I need to display both (Business and personal Accounts).
PAGE:
<apex:page controller="MyController" sidebar="false" showHeader="false">
<apex:form >
<apex:inputField value="{!referrer.Parentid}" />
</apex:form>
</apex:page>
CONTROLLER:
public with sharing class MyController {
public Account referrer{get;set;}
public MyController() {
referrer = new Account();
}
}
On this post (https://success.salesforce.com/answers?id=90630000000hq1AAAQ)
they mention that changing the param in the url of &cnpa=0 to &cnpa=1, so I guess there must be a set up somewhere in salesforce to change this value?
PAGE:
<apex:page controller="MyController" sidebar="false" showHeader="false">
<apex:form >
<apex:inputField value="{!referrer.Parentid}" />
</apex:form>
</apex:page>
CONTROLLER:
public with sharing class MyController {
public Account referrer{get;set;}
public MyController() {
referrer = new Account();
}
}
On this post (https://success.salesforce.com/answers?id=90630000000hq1AAAQ)
they mention that changing the param in the url of &cnpa=0 to &cnpa=1, so I guess there must be a set up somewhere in salesforce to change this value?
yeah the problem of that is that we have more than 50k records, so that wouldnt work. I was able to amke it work adding a javascript and modifying this way the url of the pop up window.
from
https://fabian-jdlsoft.cs6.force.com/maincom/_ui/common/data/LookupPage?lkfm=j_id0%3Aj_id55&lknm=j_id0%3Aj_id55%3Aj_id57%3Aj_id74%3Aj_id75%3Aj_id77&cnpa=0&lktp=001&lksrch=
to
https://fabian-jdlsoft.cs6.force.com/maincom/_ui/common/data/LookupPage?lkfm=j_id0%3Aj_id55&lknm=j_id0%3Aj_id55%3Aj_id57%3Aj_id74%3Aj_id75%3Aj_id77&cnpa=1&lktp=001&lksrch=
so cnpa=0 to cnpa=1
my javascript is:
However i am not very happy of using this solution as if something change on salesforce the new url might not work
I am quite surprice that there is no param somewere were we can set up this value to be 1
All Answers
https://help.salesforce.com/HTViewHelpDoc?id=account_person_behavior.htm&language=en_US
You could certainly create your own custom lookup that supported them though, but I don't know if that's an option for you!
yeah the problem of that is that we have more than 50k records, so that wouldnt work. I was able to amke it work adding a javascript and modifying this way the url of the pop up window.
from
https://fabian-jdlsoft.cs6.force.com/maincom/_ui/common/data/LookupPage?lkfm=j_id0%3Aj_id55&lknm=j_id0%3Aj_id55%3Aj_id57%3Aj_id74%3Aj_id75%3Aj_id77&cnpa=0&lktp=001&lksrch=
to
https://fabian-jdlsoft.cs6.force.com/maincom/_ui/common/data/LookupPage?lkfm=j_id0%3Aj_id55&lknm=j_id0%3Aj_id55%3Aj_id57%3Aj_id74%3Aj_id75%3Aj_id77&cnpa=1&lktp=001&lksrch=
so cnpa=0 to cnpa=1
my javascript is:
However i am not very happy of using this solution as if something change on salesforce the new url might not work
I am quite surprice that there is no param somewere were we can set up this value to be 1