Thanks
Scott
So the second step is to do this lookup automatically.
Customise the Account entity main form, edit the form properties and add
an onLoad event (don't forget to enable it as well by ticking the box)
with the following single line of code (this might be broken across
lines in the newsgroup depending on your word wrapping, just enter as
one line):
crmForm.all.primarycontactid.additionalparams = 'search=' +
crmForm.all.name.value;
This adds a parameter to the primarycontactid field to pass to the
search box when the lookup is invoked, the parameter being the field
"name" which is the Account Name of the Account you are looking at.
Save and close, publish Account entity.
Now try and use the primary contact lookup from an Account form and you
should only see contacts who you have already identified as working for
that company (ie this is their parent account).
Notice that you can see the account name in the search box at the top
right, this is just a normal search, you have done nothing really odd
here other than saved time and ensured accuracy of entry.
If you are certain the primary contact should be someone not associated
with the account you can still add them (maybe they just don't have
parent account set yet or set incorrectly, or the primary contact works
for a parent / child / sister company but is still the main decision
maker for this subsidiary). Simply clear the search box and look for a
name in the usual way. In other words, the customisation outlined above
changes the default behaviour but does not 'lock you in' or break the
normal built in behaviour.
I hope this helps
Adam Vero
MCT, MBMSS, MCSA
"AdamV" wrote:
> .
>
Michael D. Mayo
"AdamV" wrote:
> .
>
I have also tried your suggestion, and while it works in most cases, if
fails if the Customer Name contains an "&" sign.
There might be other character that makes it fail as well, but this one was
one I saw last week.Maybe there is a way to get around this?
--
Regards
Steen Schl�ter Persson (DK)
"AdamV" <nos...@meteorit.co.uk> wrote in message
news:%23C8oXeS...@TK2MSFTNGP04.phx.gbl...
This works to eliminate the &:
crmForm.all.primarycontactid.additionalparams = 'search=' +
encodeURIComponent(crmForm.all.name.DataValue);
jdubb wrote:
> On Dec 15 2009, 10:02 am, "Steen Schl�ter Persson"