Posts

Salesforce Create multiple child records based on a number field in the parent using flow

Image
For this example, I'm using salesforce flow to create Ramp plans (child object) based on a number value field in opportunity (parent object) The flow starts from a process builder after an Opportunity closed won In here my number value field is  Contract Term Length (In Months) This is kind of a custom loop which iterate   the   Contract Term Length  Final flow diagram Start by creating an Auto launched flow Let's create the variables we need to store the object data. Note: Please check my previous post to get an idea to create variables you need. First, we need to get the opportunity ID To do that we are adding a Get Records element to the canvas Then store the Opportunity Id on VarT_Opportunity ID In the same panel allocate the value for VarT_ContractTermLength Add a decision element  Configure two outcomes as following Then add an Assignment Element  If the contr

WSO2 Ballerina MySQL sample GET request

Ballerina version 1.0.0 Copy mysql-connector jar to home folder i.e. /Library/Ballerina/ballerina-1.0.0/distributions/jballerina-1.0.0/bre/lib Create local database call  testdb  and it has an  Account  table with columns idAccount, Name, Amount. sql_service.bal import ballerina/io; import ballerina/jsonutils; import ballerinax/java.jdbc; import ballerina/http; jdbc:Client testDB = new({     url: "jdbc:mysql://localhost:3306/testdb",     username: "root",     password: "cioroot",     poolOptions: { maximumPoolSize: 5 },     dbOptions: { useSSL: false } }); type Account record {     string idAccount;     string Name;     string Amount; }; # A service representing a network-accessible API # bound to port `9090`. service getsalesstats on new http:Listener(9090) {     # A resource respresenting an invokable API method     # accessible at `/getsalesstats/getLTVData`.     #     # + caller -

Netsuite Token Based Integration - WSO2 EI

Image
Description  This article will explain, how to integrate Netsuite using WSO2 EI (Version 6.5.0) We are going to use Netsuite token-based authentication which supports OAuth 1.0   Also, from the Netsuite end, we are using Restlet and suite-script to retrieve the data. Restlet will expose as a service to call externally. Follow the initial steps below to create the authentication credentials in Netsuite. The best practice is to create a user role with the required permission to get the data (not using current role). Add the user role to the user you are using to get the data. Then get the token Id and the secret for that user with the created role. Next, create an integration app and get the consumer key and secret. In-order the acquire the data, we are using Netsuite Saved Search  This saved search will contain the data we need to read from Netsuite. Then we need to create the script (Javascript) to get the data from the Saved search we created.