• Lolt
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 5
    Replies
I'm working on an override for the Convert button that, under particular circumstances, force a lead to be merged with an existing account rather than creating a new one.  Following is the code fragment.   Resulting URL has no accids argument ???

    var newURL = "{!URLFOR($Action.Lead.Convert, Lead.Id,
        [accids=Account.Id,
         nooppti=0,
         retURL=$Request.retURL], true)}";
    log("newURL: " + newURL);
    window.parent.location.href=newURL;

What am I missing?   Am I using correct argument(s)?

Thanks

  • August 15, 2008
  • Like
  • 0
I have defined a custom object:  Property with a Master-Child relationship to Contact.  Mail Merge results are not as expected:
 
«Contact_FullName» is correct, e.g.  Fred Flintstone is inserted
 

«Property_Name» inserts Account_Name from Contact

 

«Property_Months_Occupied» inserts nothing

 

Object Name = Property

   Property.PropertyName  fieldname = Name

   Property.Months_Occupied fieldname = Months_occupied,  API Name = Months_occupied__c

 

 

  • February 13, 2008
  • Like
  • 0
I have a client with Professional edition so I don't have access to the API.  So, the S-Control I created to do this includes following code:
 
 var newURL = "{!URLFOR($Action.CPS_Client__c.New)}" +
                     "&Name="  + CPSName +
                      "&CF00N70000001xdT6=" + CPSName +
                       "&O0N70000001xOpt=" + FirstName +
                      "&O0N70000001xOpo=" + Lastname;
 window.parent.location.href = newURL;
 
 
The URL created and moved to is:

https://na5.salesforce.com/a06/e?retURL=%2Fservlet%2Fservlet.Integration%3FscontrolCaching%3D1%26lid%3D00b70000000qhlV%26eid%3D0037000000Vi0It%26ic%3D1&Name=Lolt%20Proegler&CF00N70000001xdT6=Lolt%20Proegler&O0N70000001xOpt=Lolt&O0N70000001xOpo=Proegler

While fields "&Name" (standard field) and "&CF00N70000001xdT6" (Detail-Master link) are initialized properly,  the two 'custom fields'  "&O0N70000001xOpt" and "&O0N70000001xOpo" are both required and both are empty.

Are there special rules covering which parameters can be passed via URLFOR? or have I made some other error?

Thanks

 

 


 
  • February 05, 2008
  • Like
  • 0
I have an s-control which creates a custom object when a lead is converted. 
     . . .

     

     var sStreet = new String("{!Lead.Street}");

     . . .

     property.property_street__c = sStreet;

 

This works fine as long as Lead.Street does not have multiple lines.  However, client is in the UK and this item almost always includes multiple lines.   In this case I get

 

unterminated string literal
property.property_street__c = "9802 Case Road\n
 
Do I need to escape the \n or strip it out with regex?  
  • February 04, 2008
  • Like
  • 0
I have a workflow event that generates a simple message.  However, the message never arrives at the client.  Monitoring outgoing messages displays error: "org.xml.sax SAXParseException  Wite spaces are required between publicid and systemid".
 
I assume this is SFDC error?
  • May 23, 2007
  • Like
  • 0
OK. I am an advanced VF Novice. I come up with some neat stuff, but thus far everything I've done, I've been able to do without Apex Code.
 
Until now.
 
I am now having to dive into the murky (to me anyway) waters of Custom Controllers. This in of itself is not so bad, I've written my fair share of Custom Controllers on my Dev Org. However, I now find myself in the uncharted territory of having to deploy Custom Controller to a Production Org. I have tried to stay clear of these parts in the past, but alas my current journey leads straight into the eye of this storm.
 
Thankfully I can call on all of you experienced people for aid. What I need to know is this:
 
I've written a simple Apex Class using Eclipse and now I want to Save it the the Server, how do I get the neccessary test coverage? I have Run Tests, but I keep getting 0% coverage. Here is my Class:
 
Code:
public class inspectionlist {

List<Inspection__c> inspections;
public List<Inspection__c> getInspections(){
 if(inspections == null) inspections = [select name from inspection__c limit 10];
 return inspections;
}
}

 
I get "Line 3, Column 6 not covered" etc. in the Apex Code Test Runner in Eclipse. The only time I can get 100% coverage is when I test an empty class.
 
What am I doing wrong?
 
 
I'm trying to do some updates when a lead is converted.  I have a custom object that is related to a lead, and when the lead is converted, I want my custom object to be related to the new account that is created, or the account to which it is merged.  As I've searched the documentation, all I can find are references explaining how to code the actual conversion, but I just want to do some updates when that happens.  Does anyone have ideas how to do this?  Thanks!
I have an s-control which creates a custom object when a lead is converted. 
     . . .

     

     var sStreet = new String("{!Lead.Street}");

     . . .

     property.property_street__c = sStreet;

 

This works fine as long as Lead.Street does not have multiple lines.  However, client is in the UK and this item almost always includes multiple lines.   In this case I get

 

unterminated string literal
property.property_street__c = "9802 Case Road\n
 
Do I need to escape the \n or strip it out with regex?  
  • February 04, 2008
  • Like
  • 0
Hi,
 
   I am new to salesforce and pretty new to s-control.I want to populate some custom fields based on the values that are present in the Contacts.The code that I have written is as below:
 
<html>
<head>
<title></title>
<script>
var newurl="{!URLFOR($Action.Case.NewCase,null,
                                         [ eid= Contact.Id,
                                          cas15= Contact.Description,
                                           cas4= Account.Name,
                                           cas3= Contact.Name, 
                                          00N700000022TqG=Contact.User_Name__c,
                                           retURL=$Request.retURL ],true)}";
                                           window.parent.location.replace(newurl);
</script>
</head>
 
I am getting an error on the line after cas3 since that is the id of the custom field.Could somebody help me out on this and tell me how to solve the problem.Or is there any other way this can be accomplished.
 
Thanks,
 
Bharathi
 
Hi All,
  I downloaded the Apex Toolkit Plug-in in Eclipse 3.2
But I am unable to see any wizards or options related to Apex

Initially even the Documentation was not visible, Later I found out and fixed a bug in the 'Apex  Toolkit for Eclipse' documentation's maintoc.xml file

Hence now atleast I am able to see the "Apex Toolkit for Eclipse" Documentation in Eclipse Help

But can some one please provide any help as in why the other UI parts  related to Apex are not visible

Example: I am not getting the "Apex" option in the New Project Wizard

Any help in this regard is appreciated
Thanks in advance


Message Edited by Shweta T on 12-06-2007
01:28 AM

Message Edited by Shweta T on 12-06-2007 01:53 AM

Message Edited by Shweta T on 12-06-2007 09:21 PM