How to chunk csv file content into smaller using MuleSoft?

Listener Configuration:



File Read  Configuration:



Transform Message  Configuration:



For Each  Configuration:



Transform Message inside For Each  Configuration:



Logger  Configuration:



Output:

  1. INFO  2019-02-17 10:26:50,999 [[MuleRuntime].cpuLight.08: [test].testFlow.CPU_LITE @77f9697c] [event: 0-72a0a750-32c8-11e9-b865-025041000001] org.mule.runtime.core.internal.processor.LoggerMessageProcessor: {  
  2.   "message": {  
  3.     "Size": 5,  
  4.     "Payload is": [  
  5.       {  
  6.         "A""Example 1",  
  7.         "B""Sample 1"  
  8.       },  
  9.       {  
  10.         "A""Example 2",  
  11.         "B""Sample 2"  
  12.       },  
  13.       {  
  14.         "A""Example 3",  
  15.         "B""Sample 3"  
  16.       },  
  17.       {  
  18.         "A""Example 4",  
  19.         "B""Sample 4"  
  20.       },  
  21.       {  
  22.         "A""Example 5",  
  23.         "B""Sample 5"  
  24.       }  
  25.     ]  
  26.   }  
  27. }  
  28. INFO  2019-02-17 10:26:51,014 [[MuleRuntime].cpuLight.06: [test].testFlow.CPU_LITE @77f9697c] [event: 0-72a0a750-32c8-11e9-b865-025041000001] org.mule.runtime.core.internal.processor.LoggerMessageProcessor: {  
  29.   "message": {  
  30.     "Size": 5,  
  31.     "Payload is": [  
  32.       {  
  33.         "A""Example 6",  
  34.         "B""Sample 6"  
  35.       },  
  36.       {  
  37.         "A""Example 7",  
  38.         "B""Sample 7"  
  39.       },  
  40.       {  
  41.         "A""Example 8",  
  42.         "B""Sample 8"  
  43.       },  
  44.       {  
  45.         "A""Example 9",  
  46.         "B""Sample 9"  
  47.       },  
  48.       {  
  49.         "A""Example 10",  
  50.         "B""Sample 10"  
  51.       }  
  52.     ]  
  53.   }  
  54. }  
  55. INFO  2019-02-17 10:26:51,029 [[MuleRuntime].cpuLight.06: [test].testFlow.CPU_LITE @77f9697c] [event: 0-72a0a750-32c8-11e9-b865-025041000001] org.mule.runtime.core.internal.processor.LoggerMessageProcessor: {  
  56.   "message": {  
  57.     "Size": 5,  
  58.     "Payload is": [  
  59.       {  
  60.         "A""Example 11",  
  61.         "B""Sample 11"  
  62.       },  
  63.       {  
  64.         "A""Example 12",  
  65.         "B""Sample 12"  
  66.       },  
  67.       {  
  68.         "A""Example 13",  
  69.         "B""Sample 13"  
  70.       },  
  71.       {  
  72.         "A""Example 14",  
  73.         "B""Sample 14"  
  74.       },  
  75.       {  
  76.         "A""Example 15",  
  77.         "B""Sample 15"  
  78.       }  
  79.     ]  
  80.   }  
  81. }  
  82. INFO  2019-02-17 10:26:51,039 [[MuleRuntime].cpuLight.06: [test].testFlow.CPU_LITE @77f9697c] [event: 0-72a0a750-32c8-11e9-b865-025041000001] org.mule.runtime.core.internal.processor.LoggerMessageProcessor: {  
  83.   "message": {  
  84.     "Size": 3,  
  85.     "Payload is": [  
  86.       {  
  87.         "A""Example 16",  
  88.         "B""Sample 16"  
  89.       },  
  90.       {  
  91.         "A""Example 17",  
  92.         "B""Sample 17"  
  93.       },  
  94.       {  
  95.         "A""Example 18",  
  96.         "B""Sample 18"  
  97.       }  
  98.     ]  
  99.   }  
  100. }  

How to create Salesforce project in VS Code?

1. Press Ctrl + Shift + p.

2. Search for sfdx.

3. Select SFDC: Create Project to create a Force.com project.


4. Enter a Project name.


5. Select the folder where you want to store the project.

6. Authorize the org.


Click Create Project button.

How to install and set up VS Code for Salesforce?

1. Go to https://code.visualstudio.com. Download the VS Code. Install it. After the installation, open the VS Code.


2. Select Extensions.


3. Search "Salesforce Extensions for VS Code".

4. Install Salesforce Extensions for VS Code.


5. Click Reload to restart the VS Code.


6. Go to https://developer.salesforce.com/tools/sfdxcli.

7. Download Salesforce CLI and install it.

To Create a project, check https://www.infallibletechie.com/2018/09/how-to-create-salesforce-project-in-vs.html

View All Activities erroring out in Salesforce

If View All activities errors out as below

You can't view this page, either because you don't have permission or because the page isn't supported on mobile devices.


1. Go to the page layout.

2. Click Edit button and add Activity History related list.


Marketing User API Name in Salesforce

UserPermissionsMarketingUser

Sample SOQL:

SELECT Id, Name FROM User WHERE IsActive = true AND UserPermissionsMarketingUser = true  


How to count no of users having Allow Forecasting enabled in Salesforce?

ForecastEnabled is used in the User object to enable Allow Forecasting check box.

SOQL:

SELECT COUNT ( Id ) FROM User WHERE IsActive = true AND ForecastEnabled = true  


How to deploy Opportunity Stage picklist using Apache ANT Tool?

package.xml:

  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <Package xmlns="http://soap.sforce.com/2006/04/metadata">  
  3.   
  4.     <types>  
  5.         <members>OpportunityStage</members>  
  6.         <name>StandardValueSet</name>  
  7.     </types>  
  8.       
  9.     <version>43.0</version>  
  10.       
  11. </Package>  

How to deploy lead mapping using Apache ANT tool in Salesforce?

To deploy lead mapping using Apache ANT tool in Salesforce, use LeadConvertSetttings in the package.xml file.

package.xml:

  1. <types>  
  2.     <members>*</members>  
  3.     <name>LeadConvertSettings</name>  
  4. </types>