+ Start a Discussion
PDXMarinerFanPDXMarinerFan 

Validation Rule Fails When Child Record Is Added.

The following Validation Rule is failing, when the Portal User attempts to add Products, Custom Object Records.  Not when adding Activities.
The Rule appears to be working correctly when editing the Opportunity header(as expected), but fails when the child records are added.  How does the parent record change when a child record is added?  Or is there another issue?
 
Any advice would be greatly appreciated.

AND(
    ISPICKVAL($UserRole.PortalType , "Partner"),
    ISPICKVAL (PRIORVALUE (StageName), "Draft"),
    NOT(ISNEW()),
    NOT(
       OR(
          ISPICKVAL (StageName, "Approved Pending Sale"),
          ISPICKVAL (StageName, "Lost")
      )
    )
)
 
Mark
rockchick322004rockchick322004
The parent record is probably changing because a Roll-Up Summary Field on the parent is recalculating based on the changes to the child.  This is expected behavior.  Ah, but why is the change making the rule fail if the rule is not referencing a Roll-Up Summary Field...hmmm, they are a portal user, the stage name *shouldn't* be changing, and the record is not new.  Not sure.  Do you have any apex triggers running on Opp Product and/or the Custom Object?


Message Edited by mscotton on 07-10-2008 11:15 AM