AnsweredAssumed Answered

Script Help

Question asked by Annette on Oct 15, 2012
Latest reply on Oct 15, 2012 by philmodjunk

Title

Script Help

Post

      Hi,

     Sorry if this is simple, I'm learning scripts at the moment. 

     I have layout which contains a portal from EOC's.  On the portal row I have a button which I would like to take me to a different layout which shows the Service Activity for that EOC on a portal.  (The relationship is made by EOCID and I have it ticked to allow new records via this relationship in Service Activity)

     At the moment the script on that button does the following:

         
  •           If [not ( IsEmpty ( EOC::EOCID ) )]
  •      
  •           Go to related record [Show only related records; from table: "Service Activity"; using layout; "Service Activity" (Service Activity)
  •      
  •           Show / Hide Status Area [Lock; Hide]
  •      
  •           Pause / Resume Script [ Indefinitely]
  •      
  •           Show / Hide Status Are [Show]
  •      
  •           Go To Layout [original layout]
  •      
  •           End if

     That's works fine, IF there is already a Service Activity there.  But, what I would like to do if there hasn't been a service activity created yet for this EOC to allow me to create a new record request. 

     It just seems whatever way I'm doing this I'm doing it wrong.  Either it adds a new record to the wrong area (client) or doesn't work at all.  I'm not sure if I've done the layout info wrong either, ie the Service Activity layout shows records from the Service Activity table

Outcomes