function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rick-ProfaceRick-Proface 

Newbie help with S-control and pcklist validation

Looking through the manual I found an example and so I coded up this to tell whether my record is activated or open. This always returns false (0) and I cannot figure out why.  Thanks for any help....

 

<html>

<head>
<title>Lock Child Records</title>
<link rel="stylesheet" href="style.css" type="text/css" />

<script language="javascript"  type="text/javascript">
//determine if the header record is active
function init()
{
       
    if(parseInt({!IF( ISPICKVAL( SPF_Header__c.Status__c , "Activated") ,1,0)}))
   {
      alert("Record is locked from adding any more products.");
   }   
    else
   {
      alert("Record is not locked from adding any more products.");
   }
}
</script>
</head>
<body onLoad="init()">
</body>
</html>