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
RufussRufuss 

Frustrating URL syntax issue

Hi All,
 
I am fuming over what must be a simple error, and would appreciate any suggestions - trying to pass some parameters via a custom link from opportunity to contract.  The idea is to pre-populate some fields when a new contract is raised.  All works fine until I try to save - then 'Unable to load page' error and all input lost.  Custom link reads as follows;
 
/800/e?retURL=%2F800%2Fo&accid={!Opportunity_Account_ID}&ctrc5={!Opportunity_CloseDate}&Description={!Opportunity_Description_Custom}&00N200000012Bxj={!Opportunity_Sales_Representative}&00N200000012BxU={!Opportunity_CloseDate}&ctrc13=45 Days&00N200000012ByT={!Opportunity_Term_of_Lease}&ctrc40={!Opportunity_Term_in_months_part_1}
 
Can anyone possibly shed some light on why this would not work?  Any input most appreciated!
 
Regards,
Rufuss.
SteveBowerSteveBower
Might some of your data have forbidden characters in it?  Ampersands?  Like the description field?

Instead of a custom link, you might try a custom link to an s-control, and an s-control like the one below.

This sample creates a simple Opportunity from a Contact.

Best of luck, Steve.

Code:
<script language="JavaScript"> 
function redirect() { 
 var cfn = “{!Contact_FirstName}”.replace(/&/,”\&”);   // These replace Ampersands in the data with the combination “Backslash Ampersand”.
 var cln = “{!Contact_LastName}”.replace(/&/,”\&”);
 var oppName = cfn + “ “ + cln + “ Donation = {!Today}”;  // And accumulate the Opportunity name here because it’s “cleaner” then putting it all down below.
 
 // And add in the Opportunity Name.
 parent.frames.location.replace("/006/e—retURL=%2F{!Contact_ID}&RecordType=012300000004tzs&conid={!Contact_ID}&accid={!Account_ID}&opp3=”+oppName+”&opp9={!Today}&opp11=Posted") 
} 
redirect(); </script>

 

SteveBowerSteveBower
Oh, wait, forget my remark.  I didn't read your message carefully enough. 

So you're getting to the new Contract screen, and all the data is as you want, but Save doesn't actually create the record?


Hmmmm...

How are you encoding the space in the "45 Days"?

Otherwise, I'm not sure what's going on.

Best of luck, Steve.

RufussRufuss
Hi Steve,

Thanks for your assistance - it turned out to be the space in the drop down that was the problem, and the issue has been resolved - link works fine.

Whilst on the topic of links, if anyone knows how to describe two fields in a custom link that'd be fantastic!  Trying to auto populate the 'Location' field in an event with {street}+"',"+{city} when 'new event' requested at contact level; makes things easier on ones outlook sync device - palm, pocket pc or bb as the contact location would show up on screen.

Regards,
Rufuss