Sunday, January 15, 2012

Validation without Scripting


Scenario1:
You want to check/search in child Bus comp field values for some validation without scripting?.

For Example: 
       When the Specified Account has any child M Activities attached the Customer Activity flag should be true
      Implementation without scripting:
      Create a calculated field: Check Activity
  • Calc Expression: BCHasRows(“Account”, “Action”, “'[Account Id] ="' + [Id] +'"‘ AND  [Type] = “ZM”, ”,“All”)
      Return Y, if any child activity found.
      – Create a User property “On Field Update Set” to set the Activity Flag ; Value : “Check Activity”, “Activity Flag”
 
SyntaxBCHasRows (BO, BC, search_expr, visibility)
         
Where we can use: Calc fields, workflows, Data Validation Manager Rule, FINS Validator
_____________________________________________________________________________
Scenario 2:
If you want to get child Bus Comp Record count without scripting?

For Example: 

The End Date of any Service Request should not be modifiable if any child Activity Status is Active, the customer wants error message.

Implementation without scripting:
  • Create a calculated field: Check End Date
  • Calc Expression : GetNumBCRows (“Service Request”, “Action”, “'[SR Id] ="' + [Id] +'"‘ AND  [Status] = “Active”, ”,“All”)
  • Return child record count
  • Set Validation Property for Service Request  End Date to avoid modification
  • Value: [Check End Date] <1
            Syntax: GetNumBCRows (BO, BC, search_expr, visibility)

Where we can use: Calc fields, workflows, Data Validation Manager Rule, FINS Validator

1 comment:

  1. Hi Minaresh. Thank you for your post.

    I have a concern on the second scenario with the function "GetNumBCRows".

    Using the calculated field. In the search spec expression: “'[SR Id] ="' + [Id] +'".
    [SR Id] will be a field on the Action BC and [Id] will be the ROW_ID of the record where we are step on?

    I appreciate your support. Thank you in advance

    ReplyDelete