• sean33043
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 11
    Replies
Hi all.
 
I'm new to salesforce development, and I am trying to implement a custom button into Contact search layout and populate a custom object (including Contact Id). The part of the code where error appears is:
 
try {
 var recordIds = {!GETRECORDIDS($ObjectType.Contact)};
 if (recordIds.length > 0) {
  for (var i=0; i<recordIds.length ; i++) {
 
// This is the line that causes the catch ("ERROR [object Error]")
//
   inscrip = new sforce.SObject("SFDC_Enrollment__c");
//
// 

   inscrip.Class__c=claseValue[1];
   inscrip.Contact__c=recordIds[i];
   inscrip.Status__c= "Inscrito";
   result = sforce.connection.create([inscrip]);
   }
  } else {
  alert("No records selected"); //runs ok if no records were selected
 }
 
} catch (e) {
alert("ERROR "+e);
}
 
I'm not sure if it is because I'm trying to create a custom object (BTW, the script is larget and it goes fine up to these lines). I will appreciate any thoughts or ideas.
 
Thanks in advance.
Bernardo
Hi,
 
How can we display a red bar next to a custom field (picklist and picklist-multiple select) to indicate they are required?
 
I know that for custom text fields, the red bar is displyed when are defined as required, but not for custom picklists. The issue is that users enter all information for fields that has the red bar, but finally when they save it, then the page displays another bunch of error messages for the custom fields that are of type picklist.
 
Any feedback to this is greatly appreciated.
 
Thanks,
Ambili
  • September 13, 2007
  • Like
  • 0
We're attempting to utilize a custom button to set the value of a custom date/time field. The custom field (PM_REVIEW_DATE) is defined as DateTime. All the button attempts to do is set the field to Now() and then update the case and reload the window. When we click the button, we get the following error:

A problem with the OnClick JavaScript for this button or link was encountered:

{faultcode:'soapenv:Client',faultstring:"9/12/2007 12:15 PM' is not a valid value for the type xsd:dateTime',}

The javascript defined with the button is as follows:

{!REQUIRESCRIPT("/soap/ajax/8.0/connection.js")}
var c = new sforce.SObject("Case");
c.id = "{!Case.Id}";
c.PM_Review_Date__c='{!NOW()}';
result = sforce.connection.update([c]);
window.location.reload();



As I understand it, NOW returns a datetime. Why am I getting the above error and how do I correct?

Thanks in advance for the help!

Message Edited by TTT on 09-12-200710:02 AM

  • September 12, 2007
  • Like
  • 0
Is there a way to not display the Name field of a custom object in the create/edit page layout?
 
We want to populate the Name field using a blend of info from other fields, so we can enforce naming convention (such as XYZ-[Account Name]-[date]). Have already created an S-control that does it uppon clicking the Save button. Now the only thing is we have to ask users to ignore the mandatory Name field... which really isn't intuitive since they are used to not leave any mandatory field blank.
 
Any idea ?
Hi,
 
How can we change the window name of a custom tab that invokes an S-control? Although we have the <title> tag as follows, it still displays as "Salesforce - Enterprise Edition - Microsoft Internet Explorer":
 

<html>

<head>

<meta http-equiv="Content-Type" content="text/html">

<title>Alliance Approvals</title>

<script language="JavaScript1.2" src="/soap/ajax/10.0/connection.js"

type="text/javascript"> </script>

Thanks in advance for all your feedbacks,
Ambili
  • September 11, 2007
  • Like
  • 0
Pulling my hair out trying to get the systax/code right to have a formula image have a hyperlink.

Can anybody help me with an example? My formula draws 2 thumbnail images from an external server. Here is the code:

IMAGE("http://0.0.0.0/proofs/thumbnails/" &     Job_Number__c       & ".pdf.jpg.0", "") &" " & IMAGE("http://0.0.0.0/proofs/thumbnails/" &     Job_Number__c    & ".pdf.jpg.1", "No Preview Image Available.")


This puts both thumbnails next to each other with a space between them. I want each of these thumbnails to link to high res images on the same server.

My attempts using HYPERLINK with IMAGE are not working out... I searched this forum but came up empty so far.

Thanks for any insight.

Have a great long weekeend!


  • August 31, 2007
  • Like
  • 0
I have very limited programing skills and would like feedback telling me if what we are trying to do can be done or not.
 
There's a "Negotiated discount rate" field on Accounts. We need to make sure reps aren't giving more discount than what was negotiated, or if they need to, make sure their manager has approved such discount. How can we compare the discount entered by a rep against the discount on the account record ? I thought of an s-control that could go grab the account's discount and then do a simple validation... Can such s-control run as soon as the Account lookup field is populated on an opportunity record, in edit mode ? If not, what would you suggest to be a good user-friendly process to grab the account's discount and compare it against the discount entered on a new opportunity record ?
 
Note that we can't overwrite the create new opportunity button on the account page to pre-fill data on the opportunity record. Users have to create opportunities from various objects depending on the type of opportunity (such as from a Project custom object). Ideally, we'd like a process that would work for any scenario, no matter the starting point of the new opportunity.
 
Many thanks for your help !
 
Hi,
 
I've looked through communities and I think this is maybe a feature which is being developed for the next release, but wondered if anyone knows of a way to do this in the mean time.
 
I have created an s-control to create a custom object, prepopluating it with certain fields from both the contacts and accounts objects.  This is working great.  However, I have now added a custom lookup field to the contacts object.  I want to get details from this lookup object but I can't seem to reference it in any way apart from the name or id.
 
Is this currently possible?  Is there a way to reference the fields of a lookup object?
 
Thanks
 
Sandra
I am setting up our custom help links "help for this Page" for our custom objects. I am creating a s-control that provides context-specific help based who called this scontrol. Any way to find out who called me? Since the help screen opens up in a new window I thought I could use window.opener.url to parse for the calling object, but SF doesn't seem to be using standard ways to open the new help window because window.opener is null. Any ideas?
 
James Wikkerink
Municipal Software
Hi
I wonder if anyone can help me here. I have a custom object with a number of item amounts that I would like to use an S-control to sum up the amount as a Total Amount (Not using the Custom Formula for this case) Does anybody have a coding sample that can be shared with me, to select the item amounts and then push to sum them up?
Any pointer will be highly appreciated
Thanks in advance
SL
  • August 15, 2007
  • Like
  • 0