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
icbomber38icbomber38 

Pass through MultiSelect Values using a Custom Button - Clone Account

I've set up a custom button to clone account records (don't ask - it's a long story).  Everything checks out ok but I can't get a multi-select field to pass through to the new record.  I've tried everything.  Here's what I am using.  The bold red line is the one that isn't working.

https://na2.salesforce.com/001/e?
acc2={!Account.Name}&
00N30000000lVLT_selected={!Account.Ranking__c}&
00N30000000lsJD={!Account.Fortune_Rank__c}&
acc12={!Account.Website}&
acc17street={!Account.BillingStreet}&
acc17city={!Account.BillingCity}&
acc17state={!Account.BillingState}&
acc17zip={!Account.BillingPostalCode}&
acc17country={!Account.BillingCountry}&
acc7={!Account.Industry}&
acc15={!Account.NumberOfEmployees}&
00N40000001LlGl={!Account.of_Employees__c}

Thanks.

Lee

Chris_627Chris_627
Try using the following for your custom link:

https://na5.salesforce.com/{!Account.Id}/e?retURL=%2F{!Account.Id}&clone=1

This will invoke the standard Clone function built into Salesforce. Also has the advantage of copying all of the standard and custom fields without needing to reference each field individually, which makes it a lot easier to maintain as you add new fields.
icbomber38icbomber38
Thanks Chris - I may have to give that a shot.

Lee
scottyscotty
I am trying to do something simular which is passing only the multi select values to another object.  Can you hhelp in that reguard?  I have tried as many different way that I could think of.  Here is my existing formula.

https://na3.salesforce.com/00T/e?retURL=%2F{!Telesales_Info_Account__c.Id}&RecordType=012300000000L9I&cancelURL=%2F{!Telesales_Info_Account__c.AccountId__c}&ent=Task&what_id={!Telesales_Info_Account__c.AccountId__c}&tsk5=Last Results&who_id={!Telesales_Info_Account__c.ContactId__c}&RecordType=012300000000L9I&00N30000000jVEC={!Telesales_Info_Account__c.Auction__c}&tsk12=Completed&00N30000000nOk6=Consignment Sale&tsk4={!Today}&00N30000001FCVe={!NOW()}&00N70000001vgjA_selected={!Telesales_Info_Account__c.Bogie__c}

Everythingworks with the exception of

&00N70000001vgjA_selected={!Telesales_Info_Account__c.Bogie__c}
icbomber38icbomber38
Scotty - still a no go for me.  It's got to be doable, just a matter of waiting for someone to let us know.

Sorry.

Lee
scottyscotty
Thanks for the reply
Chris_627Chris_627
Take the "_selected" off the end of your custom field ID and it should work
e@uwae@uwa
You can not parse multi select picklist values in a URL. You have to use an s-control with javascript. Here's an example
<script type="text/javascript" src="/js/functions.js"></script>
<script src="/soap/ajax/10.0/connection.js"></script>

<script>
var FromPickListField ="{!Case.Standards_of_Excellence_Practice_5__c}";
var ToPickListFieldName ="00N00000006ubD4";

var FromPickListField2 = "{!Case.Standards_of_Excellence_Practices__c}";
var ToPickListFieldName2 = "00N00000006ubCp";

var FromPickListField3 = "{!Case.Program_Standards_of_Excellence__c}";
var ToPickListFieldName3 = "00N00000006uZD8";

var pairs = FromPickListField.split(";");
var pairs2 = FromPickListField2.split(";");
var pairs3 = FromPickListField3.split(";");

var Fields = ""

for (var i=0;i<pairs.length ;i++)

{
var ThisValue = escape(pairs[i])

Fields = Fields + ToPickListFieldName+ "=" + ThisValue + "&"
}



var Fields = ""

for (var i=0;i<pairs3.length;i++)

{
var ThisValue = escape(pairs3[i])

Fields = Fields + ToPickListFieldName3+ "=" + ThisValue + "&"
}

var URL = "/{!Case.Special_EventId__c}/e?retURL=%2Fa0F%2Fo&0N00000006ub3O={!Case.Most_Relevenant_Standard_of_Excellence__c}&00N00000006ub2p={!Case.End_Date_4__c}&00N00000006ub2g={!Case.Start_Date_4__c}&00N00000006ub26={!Case.departmentName__c}&00N00000006uaz7={!Case.faculty__c}&00N00000006uazg={!Case.relatedLearnings__c}&00N00000006uarw={!Case.Facilitator_Daily_Rate__c}&00N00000006uago={!Case.Start_Date_2__c}&00N00000006uah3={!Case.End_Date_3__c}&00N00000006uagy={!Case.Start_Date_3__c}&00N00000006uagt={!Case.End_Date_2__c}&00N00000006uaXw={!Case.pdf_approved_c__c}&00N00000006uZDC={!Case.key_words__c}&00N00000006uaUY={!Case.Other_Expenses_Amount__c}&00N00000006u3cj={!Case.event_length_c__c}&00N00000006u3ai={!Case.minimum_attendance_c__c}&00N00000006pLN0={!Case.maximum_attendance_c__c}&00N00000006u3bm={!Case.content_level__c}&00N00000006pLdV={!Case.city__c}&00N00000006pLdM={!Case.state_province__c}&00N00000006pLND={!Case.Description}&00N00000006u3bq={!Case.prerequisites__c}&00N00000006u3bv={!Case.objectives__c}&00N00000006u3c0={!Case.topics__c}&00N00000006u3c5={!Case.audience__c}&00N00000006uZDM={!Case.development_needed_c__c}&00N00000006uZDW={!Case.externally_printed_course__c}&00N00000006uZDg={!Case.Total_of_Facilitators__c}&00N00000006uZDR={!Case.number_of_external__c}&00N00000006uZDN={!Case.number_of_internal_c__c}&00N00000006uZDb={!Case.how_many__c}&00N00000006uZDh={!Case.food_lunch__c}&00N00000006uZDq={!Case.food_reception__c}&00N00000006uZDl={!Case.food_standard_f_b__c}&00N00000006uZD9={!Case.Learning_Method__c}&00N00000006uZD7={!Case.three_sentence_description__c}&00N00000006uZDH={!Case.course_offered__c}&00N00000006ubdv={!Case.start_date_c__c}&00N00000006ube0={!Case.end_date_c__c}&00N00000006uaTu={!Case.Number_of_Consultants__c}&00N00000006uapg={!Case.Program_Title__c}&" + Fields


var Fields = ""

for (var i=0;i<pairs2.length;i++)

{
var ThisValue = escape(pairs2[i])

Fields = Fields + ToPickListFieldName2+ "=" + ThisValue + "&"
}

URL = URL + "&" + Fields
parent.frames.location.replace(URL);
</script>
icbomber38icbomber38
Thanks - sounds like I'll just have to live w/o the function as that is over my head a bit.

I can get by with a little js but looks like a lot of work.

Lee
wickwick
Thanks for the code. Where do I need to put my modified version of this code in order to make this work?
I made a custom button - what should the content source be - Custom S-Control, URL, or On-Click Javascript?
 
JakesterJakester
Our new flexible cloning tool works on the Account object and copies multi-select fields just fine. Read more about it in this post and let me know if you're interested.

Thanks!

-Jake
Sai LavuSai Lavu
Thanks Chris_627 - that was a time saver.