• Gregory
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 7
    Replies
We've used for over a year now a button that opened up a file browser to a network drive.   The behavior for the custom button was set to "Display in new Window" and the "Content Source" was set to "URL".  The actual field was set to "P:\DirectoryName".  
 
Now, when we click on that button, we get an error:
 
cannot find 'file:///P://DirectoryName'  Make sure the path or Internet address is correct.
 
Note that the single backslash has been replaced by 2 forward slashes, and salesforce added 2 leading forward slashes.   Has something changed recently in Salesforce related to custom buttons?

I'm trying to put a simple client-side Perl sript into an S-control. I'm trying:

Code:
<html> <body>
<script language="PerlScript">
$window->document->write("Hello Perl world!");
</script>
This is straight HTML.
</body> </html>

The HTML text displays fine, but the Perl script doesn't get executed to execute. I have Perl installed on my local PC and IE renders the same above HTML correclty executing the PERL script. Is it possible to run client-side Perl in Salesforce?   Or is there setting I need in IE that is different between a SalesForce page and rendering a local html page?

Thanks,
Gregory

I'm trying to put a simple client-side Perl sript into an S-control.  I'm trying:
 
Code:
<html>
<body>
<script language="PerlScript">
$window->document->write("Hello Perl world!");
</script>
This is straight HTML.
</body>
</html>

 
The HTML text displays fine, but the Perl script doesn't seem to execute.  Is it possible to run client-side Perl in Salesforce?
 
Thanks,
Gregory
We'd like to be able to clone a record via a URL string and have the form post automatically with the save=1.  However, if you use both clone=1&save=1 in the same URL, the form is posted but the object is not cloned.    Does any one know how to get this working?
 
Thanks,
Gregory
I found an example s-control at http://blogs.salesforce.com/features/files/salesforce_useful_scontrols.pdf.  The example is:
  1. Define a custom list button with the following attributes:
  • Display Type is "List Button"
  • Behavior is "Execute JavaScript"
  • Content Source is "OnClick JavaScript"
  • Use the following sample code:
 idArray = {!GETRECORDIDS($ObjectType.Contact)};
 alert("The Ids you have selected are: "+idArray);
 Note: This example is for contacts. Change the object type for a different type of record.
 
I'm trying to get a list of custom objects selected on a related list.   I'm looking at a 'Requsition' details page, with a related list of 'Candidates'.   I'd like to be able to select a number of the candidate objects on the related list and then click on the s-control to loop through each of the ones selected.
 
The example says to 'Change the object type for a different type of record'.   I've tried my object names of Candidates and Requisition, but always get a syntax error of "Error: Field Candidate does not exist. Check spelling."
 
How can I get the GETRECORDIDS function to work?   Note I'm using Team Edition that doesn't have the AJAX API.
 
Thanks,
Gregory

I’ve read that an s-control can perform operations on each of the objects selected (via the checkboxes) in a related list.   Can someone provide me an example s-control (both s-control settings and script) showing how to do a simple loop executing some action for each of the objects selected?

 

Note that I don't have access to the Salesforce API.  Is that a requirement to walk through each of the objects associated in a related list?

 

Thanks,

Gregory

I have two custom objects, one called Requisition and a second one called Candidate with a lookup relationship between them.   A single Requisition has multiple Candidates, one of which will fill the open Requisition.  I would like to have the user click a single button associated with a Candidate and have the following 4 actions occur:

 

-         Set a status on the Candidate to “Selected”.

-         Set the status of the Requisition to “Filled” and fill in a “Filled By” field with the candidate (Requisition has a lookup relation to Contact).

-         Create a new third object of type Assignment where several of the custom fields will be filled in from Requisition and Candidate custom fields.

-         If possible, for each of the other candidates associated with the Requisition, set their Candidate Status to “Not Filled”.  If this isn’t possible, the user can click on a formula field for each of the other candidates setting their status to “Not Filled.”

 

Note that I don’t have access to the salesforce API so that may limit the solution.

 

Can anyone help me figure out a solution?  Can a single s-control implement the above, or would one need to use multiple s-controls linked together?

 

Thank in advanced for any help you can provide me.

I'm familar with how to use query strings to prepopulate fields of an object on an edit.  I have no problems with prepopulating text, dates, and numbers, however have not been succesful in pre-populating references to contacts or opportunities.
 
When trying to pre-populate a custom object, the edit form renders, the text I pass in via the query string appears in the correct opportunity or contact edit box, however when you click the save button, the data is not saved.   Alternatively if I manually type in the same text in the edit box for a contact or opportunity, the data is correctly saved.     Here is an example of a url that works correctly in pre-populating a number of custom fields:
 
 
Here is a URL that populates the Opportunity field, however when you click save, the opportunity name is not saved:
 
 
What am I doing wrong?    Does salesforce not support the pre-population of field references to contacts or opportunities?
 
Thanks,
Gregory
I'm using Team Edition and would like to use the Office Edition Excel plugin to pull down data from a Salesforce report.  However, the report I want to run uses a filter that I normally provide via a query string as in pv0=AccountName.
 
Can anyone help me get Excel to pull this report passing in a value from an Excel cell that contains the AccountName?
 
Thanks,
Gregory
503-297-2165.
We've used for over a year now a button that opened up a file browser to a network drive.   The behavior for the custom button was set to "Display in new Window" and the "Content Source" was set to "URL".  The actual field was set to "P:\DirectoryName".  
 
Now, when we click on that button, we get an error:
 
cannot find 'file:///P://DirectoryName'  Make sure the path or Internet address is correct.
 
Note that the single backslash has been replaced by 2 forward slashes, and salesforce added 2 leading forward slashes.   Has something changed recently in Salesforce related to custom buttons?

I'm trying to put a simple client-side Perl sript into an S-control. I'm trying:

Code:
<html> <body>
<script language="PerlScript">
$window->document->write("Hello Perl world!");
</script>
This is straight HTML.
</body> </html>

The HTML text displays fine, but the Perl script doesn't get executed to execute. I have Perl installed on my local PC and IE renders the same above HTML correclty executing the PERL script. Is it possible to run client-side Perl in Salesforce?   Or is there setting I need in IE that is different between a SalesForce page and rendering a local html page?

Thanks,
Gregory

I found an example s-control at http://blogs.salesforce.com/features/files/salesforce_useful_scontrols.pdf.  The example is:
  1. Define a custom list button with the following attributes:
  • Display Type is "List Button"
  • Behavior is "Execute JavaScript"
  • Content Source is "OnClick JavaScript"
  • Use the following sample code:
 idArray = {!GETRECORDIDS($ObjectType.Contact)};
 alert("The Ids you have selected are: "+idArray);
 Note: This example is for contacts. Change the object type for a different type of record.
 
I'm trying to get a list of custom objects selected on a related list.   I'm looking at a 'Requsition' details page, with a related list of 'Candidates'.   I'd like to be able to select a number of the candidate objects on the related list and then click on the s-control to loop through each of the ones selected.
 
The example says to 'Change the object type for a different type of record'.   I've tried my object names of Candidates and Requisition, but always get a syntax error of "Error: Field Candidate does not exist. Check spelling."
 
How can I get the GETRECORDIDS function to work?   Note I'm using Team Edition that doesn't have the AJAX API.
 
Thanks,
Gregory
I'm familar with how to use query strings to prepopulate fields of an object on an edit.  I have no problems with prepopulating text, dates, and numbers, however have not been succesful in pre-populating references to contacts or opportunities.
 
When trying to pre-populate a custom object, the edit form renders, the text I pass in via the query string appears in the correct opportunity or contact edit box, however when you click the save button, the data is not saved.   Alternatively if I manually type in the same text in the edit box for a contact or opportunity, the data is correctly saved.     Here is an example of a url that works correctly in pre-populating a number of custom fields:
 
 
Here is a URL that populates the Opportunity field, however when you click save, the opportunity name is not saved:
 
 
What am I doing wrong?    Does salesforce not support the pre-population of field references to contacts or opportunities?
 
Thanks,
Gregory

We have to create case templates for the cases. User when trying to create the new cases can select one template and that populates fields accordingly.

To achieve this we have created a list button on cases which calls the scontrol based on JavaScript. We have created two custom objects

1) Templates

2) Template details.

Template contains the names of the templates that are displayed to the user and user can select any one of those.

Template detail contains the field names and the value that needs to be populated.

On the button click, scontrol displays the templates to the user, user selects the template and then scontrol grabs all the fields and values for the selected template.

As of now we are creating a url based on the filed names and the values(example)

/500/e?cas4=GRAJPAL&cas8=High&cas16=Test@Please-Ignore&cas15=Test%203&00N50000001TEpf=test%20for%20test%20field

Fileds are getting populated.

The issue is that our case view keeps on changing frequently and new fields are added on a regular basis. In our scontrol we are hard coding these case ids like cas4, cas8. We got these id's after doing a "View Source".

1.) Is there a way we can grab these ids on the fly based on field name or the column name so that whenever a new field is added we do not have to add that to our scontrol?

2.) Can there be any other approach that we can use to populate the new case? Like when user selects a Template, we have all the filed names and values in array and thru code we can take the user to new case view (till here we are good) -- at this point how can we populate the fields on the new case view thru code without using the URL?Is there any API that we can use to populate fileds on the new screen? As it is a new case so does not have ID for which we can set fields for.

Please advice,

Thanks,

Gaurav

I have a custom button on the Opportunity record that executes the following s-control:


Code:
function redirect()
{
parent.frames.location.replace('/{!Opportunity.Id}/e—clone=1&retURL=%2F{!Opportunity.Id}&opp3={!Opportunity.Name} - Exam Order&00N50000001MsKI=1&cloneli=1&save=1');
}
redirect();



The problem is that this URL with the "&save=1" parameter updates the existing Opportunity instead of creating a new one. Does anyone know what parameter I need to pass in the URL to make it save a new Opportunity record?

Message Edited by AlexCRMmanager on 05-07-2007 12:36 PM