function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shannon Andreas 21Shannon Andreas 21 

Javascript button not filling in Subject field

Hello Friends!

I created a javascript button that is supposed to create a case and fill in certain fields. All fields fill in EXCEPT for the subject field (see highlighted below).

I checked field level and view accessibility, all seems to be fine. What am I missing? Subject is a standard field does that have anything to do with it?

Thanks!!

Opportunity Custom Button or Link: Request Sell2Lease Offer ~ Salesforce - Unlimited Editionwindow.location ="/500/e"
+ "?retURL=%2F500%2Fo"
+ "&def_account_id={!Account.Id}"
+ "&nooverride=1"
+ "&RecordType=012m00000004mnb"
+ "&ent=Case"
+ "&Subject='Sell2Lease Offer Request'"

+ "&00Nm00000014qnb={!Account.Lease_Customer_or_Prospect__c }"
+ "&00Nm00000014qtZ={!Opportunity.Type}"
+ "&00Nm00000014qtj={!Opportunity.Lease_Type__c}"
+ "&00Nm00000014wre={!Account.Main_Lease_Contact__c}"
Best Answer chosen by Shannon Andreas 21
Emmanuel Cruz BEmmanuel Cruz B
Hi Shannon,

Try overriding Subject with cas14, you will have something like this:

Opportunity Custom Button or Link: Request Sell2Lease Offer ~ Salesforce - Unlimited Editionwindow.location ="/500/e"
+ "?retURL=%2F500%2Fo"
+ "&def_account_id={!Account.Id}"
+ "&nooverride=1"
+ "&RecordType=012m00000004mnb"
+ "&ent=Case"
+ "&cas14='Sell2Lease Offer Request'"

+ "&00Nm00000014qnb={!Account.Lease_Customer_or_Prospect__c }"
+ "&00Nm00000014qtZ={!Opportunity.Type}"
+ "&00Nm00000014qtj={!Opportunity.Lease_Type__c}"
+ "&00Nm00000014wre={!Account.Main_Lease_Contact__c}"

All Answers

Emmanuel Cruz BEmmanuel Cruz B
Hi Shannon,

Try overriding Subject with cas14, you will have something like this:

Opportunity Custom Button or Link: Request Sell2Lease Offer ~ Salesforce - Unlimited Editionwindow.location ="/500/e"
+ "?retURL=%2F500%2Fo"
+ "&def_account_id={!Account.Id}"
+ "&nooverride=1"
+ "&RecordType=012m00000004mnb"
+ "&ent=Case"
+ "&cas14='Sell2Lease Offer Request'"

+ "&00Nm00000014qnb={!Account.Lease_Customer_or_Prospect__c }"
+ "&00Nm00000014qtZ={!Opportunity.Type}"
+ "&00Nm00000014qtj={!Opportunity.Lease_Type__c}"
+ "&00Nm00000014wre={!Account.Main_Lease_Contact__c}"
This was selected as the best answer
Shannon Andreas 21Shannon Andreas 21
You rock Emmanuel Cruz! That was it! I could kick myself sometimes. I forgot about those standard API names...

Thanks!