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
Aaron18Aaron18 

Custom Button or S-Control Needed?

Is there is a way to create a custom button to place next to a field to copy data from one field to another?  For example, we have a case description field.  On the same page we now have a Billing Description field.  Sometimes these need to be different, other times they are the same.  So I was wondering if it is possible to have a button next to the Billing Description that would copy the case description field to the Billing Description field?
NPMNPM
One way would be to have a checkbox field you could check when you want to have the description copied.  The checked checkbox (Checkboxfield name = 1) would be the trigger for a workflow action to do the copy using workflow/field update (Billing Description field url = Case Description field).
Aaron18Aaron18

I beleive you need Enterprise for Workflow I am ruuning professional edition any suggested work arounds?

Thanks,

Aaron

NPMNPM
Sorry about that, we have EE, but another way that should work if PE have the capability of adding them would be to set up a custom detail page button (or link) url like:
 
/{!XXX_Object__c.Id}/e?retURL=%2F{!XXX_Object__c.Id}
&00N50000001xazk={!Test_Object__c.XXXXXXX}
 
The "/{!XXX_Object__c.Id}/e?retURL=%2F{!XXX_Object__c.Id}" gets you to the correct edit page (the /e being key here) and back on save or cancel.
 
The "&00N50000001xazk"  is the url of the field you want to copy to.  You get this value by right clicking on the field name and selecting properties when you are on the page that lists all the fields in the object.  Just copy after the slash.
 
The {!XXX_Object__c.Id} is the Record ID field from the Merge Fields list
 
The "{!Test_Object__c.XXXXXXX}" is the field you want to copy from (also from the Merge Fields list).
 
After creating the button it needs to be added to the page layout.
 
The user would click on the button, the edit page would display with the value in the field, then the user would hit save.
 
 
XmikeXmike
The url works fine for passing data from one field to another, but have found that if the field contains carriage returns, such as the description field from a case, it will not pass and locks the app. How do you get around that?
Matt20vMatt20v

Hi NPM

Was wondering if you could explaine your answer


NPM wrote:
One way would be to have a checkbox field you could check when you want to have the description copied.  The checked checkbox (Checkboxfield name = 1) would be the trigger for a workflow action to do the copy using workflow/field update (Billing Description field url = Case Description field).


I was trying to get this to work for leads where you enter in the address for the lead and in a seperate section somtimes i might need to put in a different address other times it will be the same so i wanted to use what you said but i dont understand how to get the (Billing Description field url = Case Description field). to work,

I created the tick box and set the workflow rule to if the tick box is true run this rule then put a field update

Object = lead , field to update = state

now i need to to copy the data from state to my custome field State_c

Any help would be greatly appreciated
Cheers Matt20v

Message Edited by Matt20v on 10-09-200707:19 PM

NPMNPM

Matt20v

To get the field id of state_c you go to the setup page that lists the custom field. Right click on the field name, select properties, copy the 15 digit id that is in the address.  That is what you would use:

(15 digit id for state_c) = state

Is that what you were asking?

 

Matt20vMatt20v
Sort of but either way you pointed me in the right direction and now its working.
 
THANKS !!!!!!!!!