CRM and CX Blog Posts by Members
Find insights on SAP customer relationship management and customer experience products in blog posts from community members. Post your own perspective today!
cancel
Showing results for 
Search instead for 
Did you mean: 
suneelkumar111
Newcomer
0 Kudos
1,385

Hi Everyone,

This blog post mainly focuses on the Default field update in the field level using adaptation Rules in SAP C4C.

To create a rule, do the following:

Login into C4C and enter adaptation mode.

suneelkumar111_50-1714645904594.png 

Here we are using Phone call business object for ruling concept - By clicking on back arrow till last you can reach the implementation option.

suneelkumar111_51-1714645904604.png

Select the implementation drill down to rules and validations.

suneelkumar111_52-1714645904612.png

Click on Add button and select the Rule.

suneelkumar111_53-1714645904619.png  

You can view the rule writing screen.

suneelkumar111_54-1714645904627.png 

  1. On the Left side you can find all the fields that are available in the current business object.
  2. At the Center you can write your logic code.
  3. On the Right side you can find the operation, colors and functions that can use in your logic.
  4. Here, we have 2 – types of rules:
  1. Property
  2. Value

suneelkumar111_55-1714645904632.png

Default value rule creation steps:

When we are working with default values, there are a few things needs to follow:

  1. This rule only works on the Quick create screen (QC – Screen) for any BO.
  2. Here, we are trying to create the value type rule. Value type rule only supported to Quick create screens.
  3. Provide the rule name without maintaining any Spaces or Gaps.
  4. Provide the use of this rule in the rule description. So that, it can easily understand the uses of this rule.
  5. Return value must be enclosed with single quotes. If you are not expecting the return value from a different field.
  6. In such type of cases, you can select the field in the rule without maintaining the single quotes.
  7. In this case, we are not expecting the return value from the different field. So, you can ignore the ‘F’ step and continue.

suneelkumar111_56-1714645904639.png 

Syntax: IF(logical_expression, value_if_true, value_if_false) 

Syntax explanation:

IF () -> In the IF () logic expression if the outcome is true return the first value. Else, return the other value.

IF(Root.Type_31408d0a2c830b4a4f085c684fa90526== 101, '2', ' ')

Here we are trying to default the Direction field as “Inbound.”

  • Root.Type_31408d0a2c830b4a4f085c684fa90526== 101 –> Indicates the “Type”.
  • 2 –> Indicates type of value (like., 1. Outbound, 2. Inbound)
  • If the value is true, it will return the true value otherwise false.

 

Thank You!!

 

 

 

 

 

Labels in this area
Top kudoed authors