Browse Month: December 2017

List Email Reports: Adding columns and filters in Pardot

Path: Reports| Marketing Assets | Emails | List Emails

Unlike all the reports that are available in pardot, in list email  report we can add /remove/rearrange the columns in the table along with adding additional filters.

The standard fields that we can see includes fields such as name, sent date and count, bounces, delivery rate, total and unique clicks, unique CTR, campaign, tags. The other fields that pardot provides are: spam complaints, hard bounces, soft bounces, queued , opt outs, delivered, unique opens, open rate, total clicks etc.

To add additional columns click on funnel icon on the extreme right and click on ‘Columns’.

You can filter these columns by specific criteria too. For that you will have to click on the funnel icon next to the name
of each column and click on ‘Add filter’.

You can reset the table to its default columns and with no filters by clicking on the tools button and selecting ‘Reset table to default’.

As with all the reports you can do a CSV export of only the columns that you can view in the table or a full CSV export to get all the columns.

Butter Knife

Butterknife is a light weight library to inject views into Android components. It uses annotation processing.

The @BindView annotation allow to inject views and performs the cast to the correct type for you. The @@OnClick( annotation allows to add OnClickListener to a view. You can optional define the method parameter of the view in case you want it injected.

Butterknife includes also findById methods which simplify code that still has to find views on a View, Activity, or Dialog. It uses generics to infer the return type and automatically performs the cast.

Convert String to PrivateKey

Below code works to convert string to PrivateKey

public static class DecryptionUtil {
    private static final String ASYMMETRIC_ALGO =

    public static byte[] decryptUsingPrivateKey(PrivateKey privateKey, byte[] data)
            throws IOException, GeneralSecurityException {
        Cipher pkCipher = Cipher.getInstance(ASYMMETRIC_ALGO);
        pkCipher.init(Cipher.DECRYPT_MODE, privateKey);
        return pkCipher.doFinal(data);

    public static byte[] decryptUsingSymmetricKey(byte[] symmetricKey, byte[]
            data) throws InvalidCipherTextException {
        PaddedBufferedBlockCipher cipher = new PaddedBufferedBlockCipher(new
                AESEngine(), new PKCS7Padding());
        cipher.init(false, new KeyParameter(symmetricKey));
        int outputSize = cipher.getOutputSize(data.length);
        byte[] tempOP = new byte[outputSize];
        int processLen = cipher.processBytes(data, 0, data.length, tempOP, 0);
        int outputLen = cipher.doFinal(tempOP, processLen);
        byte[] result = new byte[processLen + outputLen];
        System.arraycopy(tempOP, 0, result, 0, result.length);
        return result;

public static PrivateKey getPrivateKey(String privateString) {

    PrivateKey privateKey = null;

    try {
       // String privateString = getString(key, context);
            byte[] binCpk = Base64.decode(privateString,Base64.DEFAULT);
            KeyFactory keyFactory = KeyFactory.getInstance("RSA","BC");
            PKCS8EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(binCpk);
            privateKey = keyFactory.generatePrivate(privateKeySpec);

    catch(Exception e){
        String r="";
    return privateKey;

How to Become a Great UI, UX Designer in 5 Easy Steps.

1. Know the basic abilities & responsibilities of UX/UI designers

Almost everyone can become a UX/UI designer by self-taught or training course. However, when it comes to how to become an excellent UX/UI designer, it requires not only basic design capabilities but also some necessary abilities, including the ability of logical thinking, data analysis, empathy, communication, observation and agile execution, etc. To get to know the designer’s responsibilities and skills is the first and foremost thing to some degree.

2. Capture the eyes and heart of your users

Be a UX or UI designer, the final deliverable needs to capture the user’s heart. If a user doesn’t have the desire to use the product, there is no user experience at all, not to mention the user engagement and conversion. For UI designer, it needs to focus on the beauty of the design work; while for UX designer, it needs to care about the user’s demands and product functionalities. Just like an old saying goes that “Practice makes perfect”, to become an excellent UX designer or UI designer requires continuous efforts.

3. Be concerned about the UX/UI design trends

Many job seekers who want to step into the UX/UI design industry will be asked about “how do they think about the current UX/UI design trend” and some other similar questions during the interview. To keep updated with the newest UX/UI design trends can make your design work outstanding and meanwhile let you become a UX design expert.

4. Be proficient in certain design tool

Not a few beginners have their own ideas, innovations, and indulgences, while they tend to ignore the proficiency of design software tool. Undoubtedly, the design tool can be a great helper for designers, and it’s required to make simple icons/pictures in the interview to test the basic design skills of candidates. Below are some tools recommended for those want to become a UI design expert:

  •  Adobe Photoshop:-  A raster graphics editing tool
  •  Adobe Illustrator:-  An vector drawing tool


Sending a VF Page as Attachment in Mail through Apex Class

Following code can be used for sending a vf page as an attachment with an email:

public class Gene_PDF{ 
public PageReference sendPdf(){                
     PageReference pdf = Page.mail_pdf;//mail_pdf is the name of vf page
     // goToNextPage('email');
     Blob body;                
        body = pdf.getContent();
     }catch(VisualforceException e){
            body=Blob.valueOf('Some text');
      Messaging.EmailFileAttachment attach = new Messaging.EmailFileAttachment();
      attach.Body = body;
      Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
      mail.setToAddresses(new String[] { email });
      mail.setSubject('PDF Email Demo');
      mail.setHtmlBody('Here is the email you requested! Check the attachment!');
      mail.setFileAttachments(new Messaging.EmailFileAttachment[] { attach }); 
      // Send the email    
      Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
      ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO, 'Email with PDF sent to '+email));
      return null;

Here 1) mail_pdf is the visualforce page that we want to use as attachment and

2) email is a pre-acquired Email-ID from user to which the email will be sent.

Source Group formats for popular Sources in Social Studio

Source Groups

Source Groups, also known as source filters in Radian6 Analysis Dashboard, enable tracking and managing of social listening sources that are important to your company.

Source Groups are used in Social Studio to define a set of sources that you would like your topic profile to look at. The sources can be social assets, such as a Twitter handle or a Facebook page, or can be websites, such as blogs or forums. Source Groups are used for broad listening and the following:

  • Pulling in all content from relevant sites, regardless of the keywords the posts contain.
    Common use case: Companies wanting to pull in all content from their owned channels.
  • Pulling in keyword matched content from a specific set of sources.
    Common use case: Use for influencers where you can identify a list of people you deem to be influential, add them to a source group, and then match their posts against the keywords that are relevant to your brand.
  • Excluding all content from particular sites.
    Common use case: Exclude spam or unwanted content.

You can add multiple sources to a source group.

If the entered name is invalid, the entry field is outlined in red and a red triangle appears. Enter a valid source.

Source groups can be Public or Private but cannot be shared to another workspace.

For Following sources/handles you can add source groups:

  • Twitter
  • Facebook
  • YouTube
  • Forums
  • Blogs, News, and Aggregators
  • Pinterest
  • Sina Weibo
  • Tencent Weibo

Note: Instagram and LinkedIn cannot be added as Source Groups.


URL Format to be used:

  •<username>.rss  OR


If Twitter account URL:,

The Source Filter URL would be:


URL Format to be used:

  • Preferred Format:<PageName>/<PageID>
  • Alternate Format 1:<PageName>-<PageID>
  • Alternate Format 2:<PageID>


For the Marketing Cloud Facebook Page,

Page URL:
Page Name: Marketing Cloud
Page ID: 40373497138

  • Acceptable format 1:
  • Acceptable format 2:
  • Acceptable format 3:

Find your Profile ID or Page ID using the Explorer Graph or To find the ID using the Explorer Graph:

1. Click Get Access Token.
2. Leave all boxes unchecked and click Get Access Token.
3. Under “Graph API,” select GET.
4. Enter [pagename]?fields=id,name

Note: Use the page name or Facebook username as it appears at the end of the Facebook URL. For example: enter marketingcloud?fields=id,name

5. Click Submit.

The Page ID is listed in the response. For [pagename]?fields=id,name the ID is 40373497138 as indicated in the response:
{ “id”: “40373497138”, “name”: “Salesforce Marketing Cloud”}

For any owned Pages, you can also find the ID in the Page Settings:

1. Open your Facebook page.
2. Click the About tab.
3. Scroll down to the bottom of the Page Info section.
4. Next to Facebook Page ID, you can find your page ID.


URL Format to be used:

where ‘authorid’ is the ID (long character string) of the YouTube profile.


YouTube Page URL:

The Source Filter URL would be:

To find your YouTube Author ID, see here.


URL Format to be used:

URL format varies by site.

Blogs, News, and Aggregators

URL Format to be used:

The feed URL. Depends on the site, but typically contains “RSS” or “atom” or “feed(s)”


URL Format to be used:<PinterestID>/feed.rss where <PinterestID> is the individual’s Pinterest ID

Sina Weibo

URL Format to be used: where ‘2570336162’ is the author’s unique id available from

Tencent Weibo

URL Format to be used: where ‘frankfenn’ is the author’s unique id available from


Social Studio – Brief Introduction

What is Social Studio?

  • Social Studio helps marketers build 1:1 relationships that grow value for both the brand and the consumer.
  • Social Studio is a product under the Salesforce Marketing Cloud that deals with offering effective social media marketing solutions.
  • In particular, it helps businesses tap into the power of social media in its marketing, customer service, and sales organizations.
  • Social Studio is a one stop solution allowing you to manage, schedule, create and monitor posts organized by brand, region or multiple teams and individuals in a unified interface.
  • A single interface offers a fully customizable team-based collaboration platform that analyzes channel and content performance.
  • Analyze current trends and recommend new content ideas.
  • The platform is available on any device, so customers can run social marketing from their phone, tablet, or desktop

Why Use Social Studio?

With Social Studio you can:

  • Use Workspaces to create and configure workspaces to quickly organize teams by region (across the world, country or down the street), brand or business function to promote collaboration for campaigns, content creation, and publishing.
  • Use Collaborative Calendars to create and design content (with full preview) plus manage your content calendar (both future and past content) with fully featured planning and scheduling tools designed for teams.
  • Use Content Publishing to craft and schedule perfect social content tailored to specific social networks using our intelligent social network-centric platform beyond just a text entry box.
  • Promote your Facebook content by buying Facebook ads right from Social Studio and integrating with Ad campaigns.

Social Studio Components

Social Studio is made up of the following components: Publish, Engage, and Analyze.

  • Publish – Enables you to create and publish content, at scale, across channels, and in near real time.
  • Engage – Engage allows Community Managers to moderate and join conversations started with the content created using Publish.
  • Analyze – Allows discussion monitoring from owned social accounts and broader social news. Create custom dashboards to monitor multiple social accounts and Topic Profiles. Dashboards can be printed as a PDF for hardcopy records and sharing.

Analyze in Social Studio

Use Analyze in Social Studio to monitor the discussions of owned social accounts as well as broader conversations. You can understand what is being said, the overall tone of social discussions and how well certain topics and trends are performing.

Dashboards provide a summarized overview of social accounts and topics profiles, while workbenches provide a deeper more customizable view social account and topic profile data.

With Analyze you can create dashboards and workbenches to help visualize your data.
analyze db


  • Use dashboards to provide an at-a-glance performance summary over a specified time period. You can specify the time period using 1 day, 7 days, 14 days, 30 days, 60 days, 90 days or a custom range from 3 to 93 days.
  • You can create dashboards for up 50 Facebook, Twitter, LinkedIn, Google+, YouTube, or Instagram accounts. These accounts can appear on the same or on separate dashboards
  • You can change the date ranges for social accounts or topic profiles dashboards. Also, you can print the dashboard as a PDF for hard-copy records or share through email.


  • Use Workbenches to create custom datasets based on topic profiles and social accounts over a specified time period. The time period can be 1 day, 7 days, 14 days, 30 days or a custom range from 3 to 93 days.
  • You can use datasets to dive deeper into the data returned by the topic profile. The datasets can be configured to focus on one piece of data or used to compare multiple attributes from the same data set.

Einstein Vision

  • Einstein Vision is a new component of Social Studio Analyze. It works on workbench datasets for topic provides and provides a collection of pre-built image classifiers for Social Marketers.

Implement a drawing app in Swift

Implement smooth drawing in iOS using swift.

A drawing app allows the user to draw on the screen with their finger. There are many companies  ask customers to sign on apple device when making purchases. 


1> create a custom class line for initializing values of start and end point of line

import UIKit

class Line{

  var start : CGPoint

  var end : CGPoint

  init(start _start : CGPoint , end _end : CGPoint) {

    start = _start

    end = _end



2> We will create a custom drawview UIView class.  for drawing line from start and end point using draw function,   So that it can act like a canvas for our drawing app.  

import UIKit

class DrawView: UIView {

  var lines : [Line] = []

  var lastPoint : CGPoint!

  required init(coder aDecoder : NSCoder) {

    super.init(coder: aDecoder)!


  override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {

    lastPoint = touches.first?.location(in: self)


  override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {

    let newPoint = touches.first?.location(in: self)

    lines.append(Line(start: lastPoint, end: newPoint!))

    lastPoint = newPoint




  override func draw(_ rect: CGRect) {

    var context = UIGraphicsGetCurrentContext()


    for line in lines


      let aPath = UIBezierPath()

      aPath.lineWidth = 5.0

      aPath.lineJoinStyle = .round

      aPath.move(to: CGPoint(x:line.start.x,y:line.start.y))

      aPath.addLine(to: CGPoint(x:line.end.x,y:line.end.y))


      aPath.lineCapStyle = .round





3> write controller class in which we are using the draw view class for drawing line

import UIKit

class ViewController: UIViewController {

  @IBOutlet var drawView : AnyObject!

  override func viewDidLoad() {


    // Do any additional setup after loading the view, typically from a nib.


  override func didReceiveMemoryWarning() {


    // Dispose of any resources that can be recreated.


@IBAction func clearbutton()


  let theDrawView : DrawView = drawView as! DrawView

  theDrawView.lines = []




Happy Drawing

Using @future method in salesforce

Using @future method in salesforce and its limitations

Salesforce provides different ways to run your code asynchronously like Batch apex, @future method. In this post we will see how to use @future method, its advantages, limitations and the precautions that we need to follow while using it.
We can use the @future methods in cases where methods are long running. In such cases we can prevent governers limits by making it as asynchronous transaction. @ future methods also help in preventing mixed dml errors by isolating multiple dmls.
In order to mark a method as future we have to simply mark it with the ‘@future’ keyword as shown in below snippet.
Public static void futureMethod(){
//Your Code Here

Points to remember while creating @future methods:

1. future methods must always be static methods.
2. @future methods cannot return anything and its return type should always be void.
3. The input parameters to such methods can only be primitive types, arrays of primitive type or collections of primitive types.
4. Input parameters cannot be sobjects or collection of sobjects.
@future methods can also be used to make callouts to external services. To use this we must mark callout=true specifically. If it is not specified then the default value is taken as false.
public static void myfuturecalloutmethid(){
//code to call external services

Why are sObjects not allowed as parameters in case of @future methods?

It is because the sobjects may change by the time the method is executed, in such cases the @future method may overwrite the already saved values of the sObject record.
What is the workaround for above sobject case?
We can pass the object Id as parameter and then query the record within the @future method and then work on the latest data.
Limitations of @future method:
1. You cant call a future method from another future method.
2. You can call up to 50 @future methods per transaction.
3. You can call up to 250000 future methods per 24 hours. This is in conjunction with all types of asynchronous methods like batch apex.
4. @future methods are not executed during salesforce downtime and any already running jobs during the start of downtime are halted and restarted after the downtime.
Please go through Future Methods with Higher Limits (Pilot)
Precautions that we need to follow while using future methods:
1. Make sure you dont put too much in a future method as this will increase the execution time and may lead to delaying of other requests after the organisation limit of 2000 unprocessed future jobs is hit.
2. Opt for batch apex when you are processing large no of records.
3. Test your future methods with maximum possible data as this will give you an idea of how much the job may take during real time.


ERP Software Testing

Testing the ERP (e.g SAP) software application is different than testing the other software applications. ERP applications are domain specific and industry-specific. The common modules like Finance, Accounting, Inventory, Fixed Asset, Sales, Purchase, Human Capital, and Payroll are available in all the ERP systems.

Apart from these common modules, few industrial specific modules are available as per the targeted customers. For example, a “manufacturing ERP” may have a “production planning” module, a “pharma ERP” may have a “doctor-patient” module and an “education ERP” may have a “student” module and so on.

So we can take a example of One Module.

Test Scenario: Find below a sample ERP demonstration.

Module Sales & Distribution
Feature Sales Order Process
Objective To check the sales order is booked and invoiced with proper data entered for sales header and sales details.
Steps to Reproduce 1. Sales & Distribution -> Order Management -> Sales Order List -> New Sales Order.
2. Select Order Date, Select Order Type, Select the Expiry Date, Select Customer ID, Select Shipping ID, Select Warehouse ID, Select Shipping Date, Select Payment Due Date, Select Sales Tax ID, Select Salesman ID.
3. Select New Sales Items and Select Item ID, Select Item UOM, Enter Item Qty, Enter Item Price, Select Ledger Account, Select Project ID and Click OK.
4. Click Book Order button in the main screen.
Input Data
Order Date (01/01/2015), Order Type (Sales Order), Expiry Date (31/09/2015), Customer ID (SABIC), Shipping ID (FedEx), Warehouse ID (NaviMumbaiWH), Shipping Date (03/02/2015), Select Payment Due Date (28/02/2015), Sales Tax ID (ST929), Salesman ID (Anand), Item ID (PolyPropylene), Item UOM (Kilograms), Item Qty (1000), Ledger Account (23499949), Project ID (DueTarget2015)
Input Data
Order Date (01/01/2016), Order Type (Purchase Order), Expiry Date (31/09/2012), Customer ID (DEFAULT), Shipping ID (Blank), Warehouse ID (Blank), Shipping Date (03/02/2013), Select Payment Due Date (28/02/2012), Sales Tax ID (Blank), Salesman ID (DEFAULT), Item ID (DEFAULT), Item UOM (Blank), Item Qty (0), Ledger Account (DEFAULT), Project ID (DEFAULT)
Expected Results
1. Order should be booked and invoiced.
2. Picking Packing slip should be generated.
3. Shipping Order should be generated.
4. General Ledger transactions should be posted.
5. Inventory Ledger should be updated.
6. Debit Memo should be generated.
7. Email should be sent to the Customer and Stores.
Expected Results
• Alert box should be coming for each negative data input as per the alert process and the defined text.
• Sales order should be backordered, if the items are out of stock.
• Sales order should be on hold, if the customer credit limit is low.

Need more help?

Hi there, was your problem or query resolved? If not & need more assistance, please do reach out to us at, we'll be more than delighted to help. Nanostuffs has 7+ years of extensive Salesforce & iOS/Android experience.
Holler Box