Latest News

the latest news from our team

Integrating eFORMz with Salesforce

In order to integrate eFORMz with Salesforce, you will use the eFORMz API.
Here is a link on how to set-up and use the API:

Creating a Button inside of Salesforce
Here is a video on how to create a button inside of Salesforce:

  1. After logging into your Salesforce account click on Setup.
  2. If you are in classic mode on the left-hand side, you should find a search bar. Search for the type of object you want to add a button to (Such as Account, Order, etc.). If you are in lightning mode click on the button that says, “Object Manager”.
  3. In classic mode, once you find your object click on the submenu that has the word “Button” in it. In lightning, mode click on the object that you want to add a button to, then click on the menu that has “button” in the name of it.

Classic example

  1. Click on the button that says, “New Button or Link”.
  2. Enter the appropriate information, change the behavior to “Execute JavaScript” and content source as “OnClick JavaScript”.
  3. Put the following JavaScript into the text box:

var xmlDoc = jQuery.parseXML("<Beginning><Parent><title>Title Text</title></Parent></Beginning>");
 $xml = $( xmlDoc ),
 $title = $xml.find( "title" );

// Append a new element to the xml after the title node
 $( "<Phone>{!Account.Phone}</Phone>" ).insertAfter( $title );

postParams = {}
 postParams.url = 'http://localhost:8001/servlet/com.minisoft.AppServer.AppServer?APP=com.minisoft.eformz.eFORMzApp&director&Host=localhost&Port=9996&User=minisoft&Password=password&ConfigurationName=accessible.cfg&QueueName=accessible&NameTemplate=Example.xml&ProcessData=true'
 postParams.method = 'POST'
 postParams.requestData = xmlDoc
 postParams.requestHeaders = {}
 postParams.requestHeaders['Content-Type'] = 'text/xml' //or another mime-type
 postParams.requestHeaders['Content-Length'] = postParams.requestData.length //required for POST
 postParams.onSuccess = processSuccess
 postParams.onError = processError

function processSuccess(message)
 { // do something with results¨
 alert(message + 'Successfully sent to eFORMz');

function processError(message)
 { // do something with the error
 alert('An error has occured');

You can add the appropriate fields by copying and pasting the following line and replacing the appropriate information using the Field type and insert field drop-down

$( "<Phone>{!Account.Phone}</Phone>" ).insertAfter( $title );

In this case, we are adding the account phone number to our XML and sending it eFORMz. Keep in mind that this JavaScript is stored on a SalesForce server and the server that eFORMz is running on must be accessible by the internet. Replace the text “localhost” with the appropriate IP address of this server.

You can now save your button.

Now you must add the button to the page. Go to the page layout. Then add the button to the page by going to the buttons box and drag down the button to the custom button box at the top of the page layout and click save.

Now you must add the IP address that you will use to connect to eFORMz to one of your trusted sites. To do this, if you are in lightning mode click on the home button on the upper right corner. In the quick find search bar and type “Remote site settings”. Click on “New Remote Site” and fill in the appropriate information and click save.

Leave a Reply

Your email address will not be published. Required fields are marked *