Views:

Scenario Overview

In this scenario we have a Sales Order that is being cloned regularly. However there is a field on this form that has Field Level Security enabled: Private Tax Number.

This is preventing users without Field Level access to that field from cloning this order, so we need to modify the Clone() function to use SetIgnoreFields(). Using this function will cause North52 BPA to ignore this field during the cloning process thereby avoiding the Field Level Access difficulty.

N52 Formula Manager Solution

The Formula Manager solution works like this,

    • An N52 Formula of type 'Save - Perform Action' is created on the Order entity
    • The Source Property is set to 'Clone This Order'
    • The formula will clone the Order and its child Products when Clone this Record is set to Yes
    • The SetIgnoreFields() function will ignore 2 fields: CloneThisRecord and PrivateTaxNumber

    Note: We will exclude CloneThisRecord as this value is not required in the new record either.

    N52 Formula Manager Steps

    The following set of steps outline how to create this Formula

    • Create a formula of type 'Save - Perform Action' on the Order entity
    • Copy and paste the formula below into the formula canvas
    • Set the Source Attribute to be 'CloneThisOrder'
    • Save and test!

    The Cloned Record


    Note: When using SetIgnoreFields() you must set either true or false on if you want the Clone() function to prefix the name of the cloned record. You can set it to be either value, but you must set it. SetIgnoreFields() must be the second last parameter in the Clone() function if you are using it.

    When the clone has been completed, the private Tax Number has not been cloned, and the Clone this Order field is set its default value.

    Formula

    if([salesorder.new_clonethisorder] =  1,
    
      Clone('salesorder', 
        [salesorder.salesorderid], 
        'order_details', 
        SetIgnoreFields('new_clonethisorder', 'new_privatetaxnumber'), 
        true
      ),
    
      'NoOp'
    )