• Snowskier
  • NEWBIE
  • 0 Points
  • Member since 2007
  • Vice President of BD
  • Drawloop.com


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies

Mutli Select Picklist Equals XXX and requires Date to be entered in field

 

AND(NOT(ISBLANK( Date_Termination_Notice_Served__c )),
CASE(Type_of_Process_Service__c , "Termination Notice Posted and Mailed"))

 

I am getting this error:

 

 Error: Field Type_of_Process_Service__c is a multi-select picklist field. Multi-select picklist fields are only supported in certain functions

I stink at formulas.  I am looking for a little help.  We have a date field and a picklist field.  What I would love is when a date is entered into the date field, any date, to require the picklist to be saved with a specific choice.  can anyone help?
Our office uses team edition. We are basic users. What we would like to do is have fields that are in an account, be populated and updated in the contacts that are attached to that account. If this is not possible, we would like to be able to view account data while in a contact...can a s control provide this "window" ? How do we do this.
Hi All,
 
I have a custom field in my Contact object page.On associating the contact to an account,my custom field should get populated automatically with a value associated to my account.I am able to populate my custom field,but i have done it through an Scontrol(invoked by a button) which redirects to a new URL and then populate the field.
 
 
But i have found that my requirement is already implemented in the Case object page of SFDC.While creating a new case,the account field is automatically populated when the case is associated to a contact(not in a new page).
Can anyone provide some guidelines on how this is done ?This would help me to solve my issue..
 
Thanks in advance,
VN
  • October 26, 2007
  • Like
  • 0
Here's my full scontrol code to link a file as an attachment without uploading the file onto Salesforce. It saves SF storage space and upload/download time for large files. Most importantly, it relates documents to the appropriate Salesforce object and viewed instantaneously.
 
To use the code, you need to add your own way of parsing the URL for the parentID (eid) parameter, and base64 encoding (we have these in our common library which we bring in using !INCLUDE). Other than that it's good to go and will attach to any parent having attachments. Create a link that calls the scontrol. Here's a sample link we call Link Attachment:
 
Code:
{!URLFOR( $SControl.MUSW__LinkAttachment  , MUSW__Permit__c.Id, [debug= $User.MUSW__Debug__c, 
stepthrough= $User.MUSW__Step_Through__c ])}
 
The Case Detachifier app on the appExchange gave me the idea for the placeholder attachment. It's seemless to the user, except if the file was moved or removed in the user's network (link is effectively broken). Files added under the Notes & Attachments related list have the word (LINK) after the filename to show it is not stored on Salesforce.
 
We still cannot find a way to customize the Notes and Attachment section to add or overwrite their "Attach File" buttons so it remains as a link on the detail page instead of in the related list. Next step for us is having a tighter integration with a file repository/management with choices of folders, etc.
 
James Wikkerink
Municipal Software
 
Code:
<html>
<head>
 <title>Link Attachment</title>
 <link href="/dCSS/Theme2/default/common.css" type="text/css" media="handheld,print,projection,screen,tty,tv" rel="stylesheet">
    <script type="text/javascript" src="/js/functions.js"></script>
    <script src="/soap/ajax/8.0/connection.js"></script>
    {!INCLUDE($SControl.MUSW__lgmCommon)}
    <script id="clientEventHandlersJS" language="javascript">
    <!--  
var b64 = new lgmBase64();

function setup() {

 lgm.href.getParameters();
 
}
function submit2(fullFileName) {
var fileName = "";
var placeholder = "";
var nameSuffix = " (LINK)";
 
 //get just file name
 if (fullFileName.indexOf('/') > -1)
        fileName = fullFileName.substring(fullFileName.lastIndexOf('/')+1,fullFileName.length);
    else
        fileName = fullFileName.substring(fullFileName.lastIndexOf('\\')+1,fullFileName.length);
 
 //make filename URL friendly
 URLfullFileName = "file:\/\/" + fullFileName.replace(/\\/g,"/");
 
 //confirm if want to link to a local file
 if ((fullFileName.indexOf("C:\\") > -1)  || (fullFileName.indexOf("D:\\") > -1)) {
 
  var x = window.confirm("Are you sure you want to link to a local file that no other users can access—"); 
  if (!x)
   return true;
  else
   nameSuffix = " (LOCAL LINK)";
 }
 
 if (URLfullFileName.indexOf("'") > -1 ) {
  alert("File names or paths containing single quotes (') are not allowed. Please rename file name or path.");
 } else {
 
  placeholder = "<html><head><meta http-equiv='refresh' content='1;url=" + URLfullFileName + "'></head>"+
     "<body><br><center>Opening file <a href='" + URLfullFileName + "'>" + URLfullFileName + "</a> <br>" +
     "Click link if file does not automatically open.</center></body></html>";
  
  var attachmentRecord = new sforce.SObject("Attachment"); 
  attachmentRecord["ParentId"] = lgm.href.param["eid"];
  attachmentRecord["Name"] = fileName + nameSuffix;
  attachmentRecord["ContentType"] = "text/html";
  attachmentRecord["IsPrivate"] = false;
  attachmentRecord["Body"] =b64.encode(placeholder);// b64.encode(documentContent)
  
  
  try {
   var error = sforce.connection.create([attachmentRecord]);
   if (error.toString().indexOf("errors") != -1 ) {
    throw ("Document Save Error: " + error.toString());
   }
   
   opener.location.reload();
   if (lgm.debug.flag != true ) { //see debug statements remaining
    window.close();
   }
   
  }
  catch (err) {
   addMessage(err.toString());
   retval = false;
  }
 }
}
function isUrl(s) {
 var regexp = /(ftp|http|https|file):\/\/(\w+:{0,1}\w*@)–(\S+)(:[0-9]+)˜(\/|\/([\w#!:.™+=&%@!\-\/]))?/
 return regexp.test(s);
}

//-->
</script>
</head>

<body onload="setup()">
  <form id = "myform" name = "myform">
   <div class="lookup">
    <div class="bPageTitle">
     <div class="ptBody primaryPalette">
      <div class="content">
       <img src="/s.gif" alt="Lookup"  class="pageTitleIcon">
       <h1>Link Attachment</h1>
      </div>
     </div>
    </div>
    <table cellspacing = 0 cellpadding = 0 border = 0>
     <tr>
      <td width = 5>&nbsp;</td>
      <td width = 100% style = "padding:2px 10px 2px 2px; font-size: 9pt; font-weight: bold; color:#333;">Select the File</td>
      
      <td width = 5>&nbsp;</td>
     </tr>
     <tr>
      <td width = 5>&nbsp;</td>
      <td width = 100% style = "padding:2px 10px 2px 2px; font-size: 9pt; color:#333;">Ensure file path is accessible to entire organization.
      <br>Note: Do not move or rename file after linking
      <td width = 5>&nbsp;</td>
     </tr>
     <tr>
      <td width = 5>&nbsp;</td>
      <td width = 100%>&nbsp;</td>
      <td width = 5>&nbsp;</td>
     </tr>
     <tr>
      <td>&nbsp;</td>
      <td align = left><input  id="file" name="file" size="35" title="Type the path of the file or click the Browse button to find the file." type="file" /></td>
      <td>&nbsp;</td>
     </tr> 
     <tr>
      <td>&nbsp;</td>
      <td align = center>&nbsp;</td>
      <td>&nbsp;</td>
     </tr>
    
     <br>
     <tr>
      <td>&nbsp;</td>
      <td align = center>
       <div class="pBody" align = center>
        <input id = "submit" Name = "submit" class="btn" type=button value="Submit" onClick="submit2(myform.file.value);" disable = "true">
        <input id = "cancel" Name = "Cancel" class="btn" type=button value="Cancel" onClick="window.close();" disable = "true">     
       &nbsp;&nbsp;&nbsp;&nbsp;
       </div> 
       
      </td>
      <td>&nbsp;</td>
     </tr>
    </table>       
   </div>
   <DIV id="divDebug"></DIV> 
  </form> 
 </body>
</html>

 
We create an Event which includes zero or more contacts (names of individuals).
From the view Events screen, we have a custom link to create CallReport (custom object).
Using an S-Control, we pre-populate some of the input fields on the enter CallReport screen with values from the Events field (relatively easy to do).
We also want to save the contacts from the Events page  when we save the CallReport. If there was an input field on the create CallReport screen, we could park the data for the Contacts there. But since there isn't, how do we keep the Contacts data on the create CallReport page so that the SAVE action is aware of it and saves it? Is there a way to do it without overriding the action of the SAVE button?