Groovy 1- Where can we use Groovy
Groovy 1 – Where Can we use Groovy Groovy Scripting in Oracle Fusion Sales and Service Groovy scripting in Oracle Fusion Sales and Service is
Groovy 1 – Where Can we use Groovy Groovy Scripting in Oracle Fusion Sales and Service Groovy scripting in Oracle Fusion Sales and Service is
Groovy 2 – Hello World As any tutorial in programming, we will first create a Hello World script. Just to get a sneak peek on
Groovy 3 – Variables Variables are placeholders. What do I mean by this? If you remember in math if you do something like x =
Groovy 4 – Data Types Groovy Supports all of the JAVA primitive and other complex data types and actually does some improvement on them. Primitive
Groovy 5 – Get Values From Fields Field Value Assignment Methods Values from fields are pulled into variables or even other fields by 2 possible
Groovy 6 – Math Operators Normal Arithmetic Operators Operator Purpose + Addition – Subtraction * Multiplication / Division % Remainder or Modulus ** Power Examples
Groovy 7 – Relational Operators and Logical operators Relational Operators Operator Purpose == Equal != Not equal < Less than <= Less than or equal
Groovy 8 – Precedence Precedence is showing the order in which operators are evaluated while the code runs. The table below lists all Groovy operators
Groovy 9- When will our code run? As we discussed in a previous post, we can make code in different areas of the Application Composer.
Groovy 10 – Comments and Key Words Comments Comments are part of the code we write that will be ignored by the Groovy console. They
Groovy 11 – if then else / switch Adding Logic To the Scripts if-else Sometimes we want to control the flow of the code. This
Groovy 12 – Loops Types of Loops There are 3 types of loops: while loop do-while loop for loop while Loop while (condition) { //
Groovy 13 – Array An array is a variable that can store multiple values of the same type. In traditional Java, arrays cannot store different
Groovy 14 – Map A map is a collection of key-value pairs, similar to a dictionary. In a dictionary, you have words (keys) and their
Groovy 15 – STRING A String is a text. Any text is a String. String is not just a simple data type; it is actually
Groovy 16- Formula Fields (Create field, Add Script To field, Add Field To Page Layout) Formula Fields are used for running code at run-time. However,
Groovy 17 – Multidimensional Array Usually, Multidimensional Arrays are used to create a table. In Oracle Sales Cloud, there is not much need for them,
Groovy 18 – Removing Duplicates from Array Sometimes you may have an array with duplicate items and need to remove the duplicates to get only
Groovy 19 – Revers Strings Here’s a quick script to reverse a String value from a Text field called Text1_c and display it in a
Groovy 20 – Using FOR Loop to Generate Even Numbers Series API Name of the Text field is Text1_c. The series will be generated in
Groovy 21 – How To format a Number into #,###.## String var_value1 = NUMERIC_VALUE String var_value if (var_value1.contains(“.”)) var_value = String.valueOf(var_value1) else var_value = String.valueOf(var_value1)
Groovy -22 – Access Objects newView; Collections; Related Objects This Objects can be top level Objects, parents, as they are also called or Child Objects.
Groovy -23 – Return Current Date and Time Based on the Timezone Of The User Sales Cloud provides Groovy methods to return the date and
Groovy 24 – Multi Line Custom Validation Rule Message and Other Formation Of the Validation Error Message Using HTML Everyone knows the classic line of
Groovy 25 – Trigger Performance and Avoiding Threshold Errors Best performance when using scripting is obtained with the usage of “Before” triggers, such as: Before
Groovy 26 – How to get Currency Symbols To return the currency symbols for any Currency, we can create a global function that will take
Groovy 27 – Create Copy Button For Custom Object Create a Copy Button for a Custom Object This button will copy the entire record, including
Groovy 28 – Add Same Sales Team on Contact as the One of the primary Account Before Update Trigger Example In this post, I will
Groovy 29 – Generic Script To Return the Manager of a Resource Return Manager of Any Resource The script below can be used to return
Groovy 30 – Add Opportunity Account Contacts as Opportunity Contacts Add Opportunity Contacts This script will help you add all the opportunity account contacts to
Groovy 31 – Create a 1:M relationship via Groovy script Object Relationship Creation Object A is related in a 1:M relationship with Object B. To
Groovy 32 – Fetch the Dimension Members for the Customer Auxiliary 1 Dimension, for the territories the Account Record Owner is in Groovy Script to
Groovy 33- In a Formula Field Arrange Selected Items of a Multiselect List one Under another Arrange Multi Select Fixed Choice List Items We have
Groovy 34- Algorithm to extract the smallest integer from an Array Find the Smallest Integer in an Array Given the following array: int[] myArray =
Groovy 35- How To Check if a String is a Palindrome From Wiki: A palindrome is a word, phrase, number, or other sequence of characters
Groovy 36 – How To Use REST API Inside Sales Cloud on Release 12 – Examples Using REST API in Groovy Learn how to use
Groovy 37 – Few Recommendations when scripting Groovy Script Tips 1 – Avoid using Webservices inside Sales Cloud in your Groovy. Try to always find
Groovy 38 – Create M:M Relationship in Groovy Custom Object Script I have created a custom object called Campaign_c and then created a M:M relationship
Groovy 39 – How to Add 2 numbers as Hours and Minutes Add Hours Function Function Name: addHours Returns: String Parameters: hoursArray – List def
Groovy 40 – Create a Copy Button for Account Object Create a Copy Button for Account Object Create a custom text field on the Account
Groovy 41 – Create a Field that will keep track of how many updates happen on an Opportunity Revenue Line Opportunity Revenue Revision Create a
Groovy 42 – Extract Time Information from a Date-Time Field Date-Time Extraction in Groovy To extract information from a Date-Time field, we can use the
Groovy 43 – Calling a SOAP WS that needs header authentication from groovy Call SOAP WS from Groovy Let’s say we need to call a