• Beginner_sforce
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
Hi, I have this really simple code to prevent deletion, but somehow it doesn't work, can someone help me?thx
 
Code:
trigger subBrandDelete on Sub_Brand__c (before delete) 
{
 if (Trigger.isDelete) 
 {
  for (Sub_Brand__c sb : Trigger.old)
  {
         sb.addError('Cannot delete a Sub-Brand with Walls');
  }
 }
   
}

 
Hi, I'm still a rookie,
 
I got this S-control which contains just a hyperlink to another S-control :
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML Strict//EN"><META http-equiv="Content-Type" content="text/html; charset=utf-8"> 
<HTML>
<HEAD>
<style>
body {BACKGROUND-COLOR: #f3f3ec}
a {COLOR: #333;
font-family : Arial;
font-size : 9pt;
text-decoration :underline}
 </style>
<script src="/js/functions.js" type="text/javascript"></script>
</HEAD>
<body>
<a href="{!URLFOR( $SControl.testingDeveloper )} ">[Change Mecho/Lumi]</a>
</body>
</HTML>

 Now, I embedded this code in one of my page layout, the problem is everytime i click on the link, the new window will be displayed inside the Iframe. I tried using  target  = "_blank" but it opens up a new window with the toolbar and i just need a popup, is there anyway to do this?
Hi, I've been wanting to make an s-control with the exact same look and feel as the standard lookup dialog in SF. I've manage to make this however, I can't find a way to pass the value to the custom field once the user clicks on the anchor, this is the anchor.:
 
html.push("<a class=\"dataCell\" onclick=\"top.window.opener.lookupPick('null','CF00N700000028MtX_lkid','CF00N700000028MtX','','"+record_id.substring(0,15)+"','"+record.Name+"','','');setParentField("+record.Name+");window.close();\" href=\"#\">"+record.Name+"</a>");
 
this is the original anchor code:
 
<a class="dataCell" onclick="top.window.opener.lookupPick('null','CF00N700000028MtX_lkid','CF00N700000028MtX','','a0DT0000000UNoE','A-2378','','')" href="#">A-2378</a>
 
I noticed this is written inside a form that I can use, but I'm not sure what to change in the action attribute.
<form id="new" onsubmit="if (window.ffInAlert) { return false; }" name="new" method="get" action="/_ui/common/data/LookupResultsFrame">

 

any help will greatly be appreciated,thanks.


Hi, I've been wanting to make an s-control with the exact same look and feel as the standard lookup dialog in SF. I've manage to make this however, I can't find a way to pass the value to the custom field once the user clicks on the anchor, this is the anchor.:
 
html.push("<a class=\"dataCell\" onclick=\"top.window.opener.lookupPick('null','CF00N700000028MtX_lkid','CF00N700000028MtX','','"+record_id.substring(0,15)+"','"+record.Name+"','','');setParentField("+record.Name+");window.close();\" href=\"#\">"+record.Name+"</a>");
 
this is the original anchor code:
 
<a class="dataCell" onclick="top.window.opener.lookupPick('null','CF00N700000028MtX_lkid','CF00N700000028MtX','','a0DT0000000UNoE','A-2378','','')" href="#">A-2378</a>
 
I noticed this is written inside a form that I can use, but I'm not sure what to change in the action attribute.
<form id="new" onsubmit="if (window.ffInAlert) { return false; }" name="new" method="get" action="/_ui/common/data/LookupResultsFrame">

 

any help will greatly be appreciated,thanks.