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
LFaroLFaro 

Copy CONTRACT field to the CASE

Hello -
I need help!

I have 1 field on the contract object and want the value to simply "copy" over to every case associated with that account.

For example.  The account has one contract associated with it. The contract has a field called "service level" .  I want that service level to appear on every case for that one account.

Would I do this with an S-Control?  Any advice would be AWESOME!
 
Lauren
KaushikKaushik
    This is possible through an S-Control,but if you could have the service level field on the account instead of the contract it is much easier(Since you have only one contract per account)
It can be done by changing the URL.
1)Create Service level field in both the account and the case
2)Find out the field Id of the Service level field present on the Case page.The easiest way to figure out the field Id is by clicking on the Service level field (in Setup->Cases->Fields)
example :if the URL of the page is https://na3.salesforce.com/00N50000001TI5B
the Field Id is 00N50000001TI5B
3)The next step is to include the auto-population in the URL of the New button for creating cases on the Account page.Create a new button in the Case as a list button and behavior as Display in existing window without sidebar or header with the following code
{!URLFOR( $Action.Case.NewCase,null,["00N50000001TI5B"= Account.Service_Level__c ,"def_account_id"= Account.Id ])}
Make sure you add this button to the account page in the case related lists and remove the standard New button.

This is an easy way to do it.If you want the service level to be included in the Contract then you need to use some JavaScript.

Hope this will be helpful

Kaushik