Discussion:
Populate Read Only Attribute in CRM4
(too old to reply)
unknown
2010-02-19 14:47:14 UTC
Permalink
Hi,

Using CRM4, I would like to change the way the Lead's fullname attribute is populated.
I would like the fullname to be populated by the companyname attribute I have created on the form.
I have tried (among many other things), putting this is the OnChange of the companyname field:

{var companyname = crmForm.all.companyname.DataValue;

crmForm.all.fullname.DataValue = companyname;
}

Once published, I get an error message when trying to save the form and the Lead fullname is still made up of firstname_lastname.
Any idea on how I could solve this?
Thanks


Submitted via EggHeadCafe - Software Developer Portal of Choice
Sending SMTP email from within BizTalk Orchestration
http://www.eggheadcafe.com/tutorials/aspnet/9dd0f346-baf9-4674-a50f-1716445b26bc/sending-smtp-email-from-w.aspx
AdamV
2010-02-21 17:39:59 UTC
Permalink
Full name is "special" and is calculated whenever a Lead or Contact (or
User) record is updated according to the rules you set in the
customisation, but these don't include options for company name as far
as I know.

Why would you want to put company name in full name anyway?
If you really need company name in a second field, why not just create a
new attribute called "CopyOfCompanyName" and use that on the form
instead? And then use that in any views, searches etc that you need it
for as well?

What is the actual intended goal here?
Post by unknown
Hi,
Using CRM4, I would like to change the way the Lead's fullname attribute is populated.
I would like the fullname to be populated by the companyname attribute I have created on the form.
{var companyname = crmForm.all.companyname.DataValue;
crmForm.all.fullname.DataValue = companyname;
}
Once published, I get an error message when trying to save the form and the Lead fullname is still made up of firstname_lastname.
Any idea on how I could solve this?
Thanks
Submitted via EggHeadCafe - Software Developer Portal of Choice
Sending SMTP email from within BizTalk Orchestration
http://www.eggheadcafe.com/tutorials/aspnet/9dd0f346-baf9-4674-a50f-1716445b26bc/sending-smtp-email-from-w.aspx
Taylor
2010-03-16 21:45:01 UTC
Permalink
We have the same issue and the problem for us is that when you convert the
lead to an opportunity the "Originating Lead" field shows up as blank on the
opportunity because the lead never received a name. So our work around is
to save the copmany name as the contact last name onsave of the lead. That
way it's populated on the opportunity. Not very clean but since CRM is
forcing us to use a person as the name of the lead it's all we could come up
with.
Post by AdamV
Full name is "special" and is calculated whenever a Lead or Contact (or
User) record is updated according to the rules you set in the
customisation, but these don't include options for company name as far
as I know.
Why would you want to put company name in full name anyway?
If you really need company name in a second field, why not just create a
new attribute called "CopyOfCompanyName" and use that on the form
instead? And then use that in any views, searches etc that you need it
for as well?
What is the actual intended goal here?
Post by unknown
Hi,
Using CRM4, I would like to change the way the Lead's fullname attribute is populated.
I would like the fullname to be populated by the companyname attribute I have created on the form.
{var companyname = crmForm.all.companyname.DataValue;
crmForm.all.fullname.DataValue = companyname;
}
Once published, I get an error message when trying to save the form and the Lead fullname is still made up of firstname_lastname.
Any idea on how I could solve this?
Thanks
Submitted via EggHeadCafe - Software Developer Portal of Choice
Sending SMTP email from within BizTalk Orchestration
http://www.eggheadcafe.com/tutorials/aspnet/9dd0f346-baf9-4674-a50f-1716445b26bc/sending-smtp-email-from-w.aspx
.
AdamV
2010-03-18 09:15:55 UTC
Permalink
I would suggest if you go for an approach like this that you modify the
company name in some way when using it as last name.
So for example you check if last name is blank. If it is you update last
name to use company name but with brackets round it eg "(Acme Plc)".
This way when you do any marketing activities you can exclude these from
your marketing lists so you don't end up sending the embarrasing "Dear
Mr Acme Plc" or worse "Mr John Acme Plc" letters or address labels.
Just an idea, hope it helps.

Adam
Post by Taylor
We have the same issue and the problem for us is that when you convert the
lead to an opportunity the "Originating Lead" field shows up as blank on the
opportunity because the lead never received a name. So our work around is
to save the copmany name as the contact last name onsave of the lead. That
way it's populated on the opportunity. Not very clean but since CRM is
forcing us to use a person as the name of the lead it's all we could come up
with.
Post by AdamV
Full name is "special" and is calculated whenever a Lead or Contact (or
User) record is updated according to the rules you set in the
customisation, but these don't include options for company name as far
as I know.
Why would you want to put company name in full name anyway?
If you really need company name in a second field, why not just create a
new attribute called "CopyOfCompanyName" and use that on the form
instead? And then use that in any views, searches etc that you need it
for as well?
What is the actual intended goal here?
Post by unknown
Hi,
Using CRM4, I would like to change the way the Lead's fullname attribute is populated.
I would like the fullname to be populated by the companyname attribute I have created on the form.
{var companyname = crmForm.all.companyname.DataValue;
crmForm.all.fullname.DataValue = companyname;
}
Once published, I get an error message when trying to save the form and the Lead fullname is still made up of firstname_lastname.
Any idea on how I could solve this?
Thanks
Submitted via EggHeadCafe - Software Developer Portal of Choice
Sending SMTP email from within BizTalk Orchestration
http://www.eggheadcafe.com/tutorials/aspnet/9dd0f346-baf9-4674-a50f-1716445b26bc/sending-smtp-email-from-w.aspx
.
Dave
2010-03-19 14:04:28 UTC
Permalink
Post by unknown
Hi,
Using CRM4, I would like to change the way the Lead's fullname attribute is populated.
I would like the fullname to be populated by the companyname attribute I have created on the form.
{var companyname = crmForm.all.companyname.DataValue;
crmForm.all.fullname.DataValue = companyname;
}
Once published, I get an error message when trying to save the form and the Lead fullname is still made up of firstname_lastname.
Any idea on how I could solve this?
Thanks
Submitted via EggHeadCafe - Software Developer Portal of Choice
Sending SMTP email from within BizTalk Orchestrationhttp://www.eggheadcafe.com/tutorials/aspnet/9dd0f346-baf9-4674-a50f-1...
I agree with Adam's first comment (not the second tho, sorry Adam,
doing stuff like that never ends well)... What is the real problem
here, and what are you trying to accomplish? I would create a new
attribute that you can populate with Javascript as you mentioned in
the OP. Then, you can move fullname off of the main form and then use
your custom field wherever you want it to appear (views, etc.)

HTH,
Dave

-------------------------------------------
David L. Carr, President
Visionary Software Consulting, Inc.
Cell: 503-351-4207
Email: ***@earthlink.net
http://www.vscrm.com

Loading...