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

Over ride "New" Lead button
Hi,
I am trying to set up an S-control to over-ride the "New" Lead button so that it will auto populate the Company field with a predetermined value (in this case with current time/date). This is the latest attempt but I just can not get the value to be inserted. Any help would be much appreciated.
<html>
<head>
<script src="/soap/ajax/9.0/connection.js"></script>
<script language="Javascript">
function replace()
{
parent.document.location.href= "/00Q/e?nooverride=1{!Lead.Compant}={!NOW()}";
}
</script>
</head>
<body onload="replace()">
</body>
</html>
<head>
<script src="/soap/ajax/9.0/connection.js"></script>
<script language="Javascript">
function replace()
{
parent.document.location.href= "/00Q/e?nooverride=1{!Lead.Compant}={!NOW()}";
}
</script>
</head>
<body onload="replace()">
</body>
</html>
Thanks,
DjBell
parent.document.location.href= "/00Q/e?nooverride=1{!Lead.Compant}={!NOW()}";
Thanks,
Hi,
Thanks for taking a look. That was just a type-o when writing my message. I reviewed the code and it is written correctly in my S-control. Just to give you some more information, I have a product support team that will be manually entering Leads but most of the Leads will be people who do not necessarily belong to a company so I want to auto-populate "Company" with the date when the product support rep. clicks the New button. The "Company" field is required in Leads and I want to simplify the process for the intake team. I don't have a lot of programming experience but I imagine this should be possible. I know I'm close but not close enough.
Thanks,
djb
Message Edited by djbELL on 02-25-2008 01:45 PM
Go to:
Setup -> Create -> Workflow and Approvals -> Field Update
Create a new field update, select 'Leads' as the object and 'Company' as the field. In the formula field just write "No Company" (in double quotes) and Save.
Then create a workflow rule by going to
Setup -> Create -> Workflow and Approvals -> Workflow rules
Just give a name to the rule and select 'Lead' object. for the 'criteria are met' option, select Lead: Company, then 'equals' and then leave it blank (to show that when the company name is null). Click 'Save and Next' and then add then 'Add Workflow Action' add the Field Update you created earlier.
I think this setup will work for you.
Thanks Again Saania,
Unfortuantely workflow rules/updates kick in after the required fields are reviewed. When I click save I will get an error saying i need to supply a value befor saving. Hence the need to populate the company field upon clicking the new button and not the save button.
Thanks for the imput though,
djb
window.parent.location.href = "/00Q/e?retURL=%2F00Q%2Fo&lea3={!NOW()}&nooverride=1"
</script>
Hi,
I need something similar, but I would like to populate also future custom fields.
Thus, doing 'view source' is not appropriate for me. I need to get dynamically the fields id-s.
For example, I would send {Lead.company} instead of lea3.
How to perform that?
Thanks