Default values using rules. With a twist
With the 2102 release of SAP Sales Cloud / Service Cloud (aka Cloud for Customer) solution, SAP released a new feature “Default Values using Rules” for general availability.
The release briefing notes are also promising!
“Customers can now use rules to set the default value for any field” and “Applicable only in quick create screens”
(all credits to release briefing notes: SAP Cloud for Customer 2102 Release Briefings )
Awesome! I was excited! No more SDK code required to default some fields based on other fields’ values in Quick Create screens!
Even better “Default Value Rule will override any other logic in place Ex: will override CLR, Extension Scenario, SDK Script Determination, Application logic etc”.
Exactly what I just need right now! What an amazing coincidence!
However, when I created a value rule (now there are two types of rules: property and value rules) and went to assign it to the field I was scratching my head.
But they said ‘quick create screen’, right?…
– Yes, I’m right in quick create screen…
‘use rules’, they said?..
– Yes, I have one beaut…
‘Any field’, they said?..
– Aye! Any!
I found a bug, I thought! And hurried to report an incident. I really wanted to use this feature. I was having the exact use case for it. So let’s get it fixed and get it done!
…The incident came back saying: currently this is the system expected behaviour. It’s not any field. Here you go with the list of restrictions:
Cannot be applied to Object Value Selector Fields (Ex: Account Object Field) and Multi Value Fields.
And to make things clear what ‘any field’ from release briefing notes actually means a new KBA was issued after my incident: 3026159 – Default Value Using Rules Current Limitations
Almost forgot, in the incident, there was a usual suggestion to go and log feature request at Influence SAP. Yeah nah for sure!
Just a bit of disclaimer: I’m describing my own experience at the time of writing this blog post. If you want to repeat these steps, you’re more than welcome. But you’re on your own, no strings attached.
🛑 Here used to be some technical steps. But after a very good discussion with the SAP Product Management team, they’ve been decided to be removed.
The approach used to be described in this blog will not work anymore. SAP is working really hard to remove OVS limitations. I’m personally looking forward to it. This blog will be updated once the OVS limitation is removed. At the moment, the rest of the blog can be treated as a ‘sneak peek’ preview and as a showcase of the Default Value feature in general.
My (imaginary) scenario is simple: in the quick create screen of the ticket, I need to populate Service Category (OVS field) based on the customer selected.
1. Start the adaptation mode and create a value rule. We’ll need it.
2. Assign the rule to the Set Default Value property.
3. Apply your adaptation changes by ending the adaptation.