Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can add Quik! integration to your SalesForce account by using just the Quik! web services (to generate forms and to display a list of forms to users). The integration will generally take a SalesForce.com developer 5 to 15 days to complete depending on the complexity of your user experience. The implementation uses Apex, Javascript and XML.

...

String requestXML = FormXmlBuilder.buildXml();

  1. Send the SOAP Request to the Quik Forms Engine Web Service.

String xmlResponse=QuikFormHttpUtility.SendSOAPRequest(requestXML);

  1. Decode the response and parse out the HTML form.

String outputHTML=QuikFormController.decodeHtml( QuikFormController.parseResponseXmlForHtml(xmlResponse);

  1. Display the HTML form in a Visual Apex Page

...

The following class is used to create and post an XML SOAP request and to process the response.
public with sharing class QuikFormHttpUtility {
public static String SendSOAPRequest(string strXML )
{
System.debug(strXML);
string xml='';
http soap = new http();
Httprequest soap_request = new Httprequest();
Httpresponse soap_response = new Httpresponse();
//soap_request.setEndpoint('https://websvcs.quikforms.com/quikformsenginews/52025300/QuikFormsEngine.asmx');
soap_request.setEndpoint('https://websvcs.quikforms.com/quikformsenginews/52025300/quikformsengine.asmx');
soap_request.setHeader('SOAPAction','https://websvcs.quikforms.com/quikformsenginews/Execute');

soap_request.setMethod('POST');
soap_request.setHeader('Host', 'websvcs.quikforms.com');
soap_request.setHeader('Content-type', 'text/xml; charset=utf-8');
soap_request.setHeader('Content-Length', '' + strXML.length());
soap_request.setTimeout(30000);
soap_request.setBody(strXML);
try
{
// Send the SOAP request
soap_response = soap.send(soap_request);
// Process the response
System.Debug(soap_response.getBody());
System.Debug(soap_response.getStatusCode());
System.Debug(soap_response.getStatus());
xml=soap_response.getBody();
return xml;
}
catch(System.CalloutException ex)
{
System.Debug('Exception thrown: ' + ex.getMessage());
throw ex;
}
catch (Exception e)
{
System.Debug('Exception thrown: ' + e.getMessage());
throw e;
}
return xml;
}
}

...

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<AuthenticationHeader xmlns="https://websvcs.quikforms.com/quikformsenginews/">
<CustomerID>CUSTOMER_ID</CustomerID>
<UserName>USER_NAME</UserName>
<Password>PASSWORD</Password>
</AuthenticationHeader>
</soap:Header>
<soap:Body>
<Execute xmlns="https://websvcs.quikforms.com/quikformsenginews/">
<CustomJavaFileIncludePath />
<CustomJavaScript />
<FormIDs>1,2,3</FormIDs>
<TestDataMode>false</TestDataMode>
<TestFinalFormsMode>false</TestFinalFormsMode>
<FormExpiryDate />
<HTMLBodyOnloadFunction />
<HTMLFieldFontColor />
<HTMLFooter />
<HTMLFooterStyle />
<HTMLLoadingImage />
<HTMLLogoAltText />
<HTMLLogoPath />
<HTMLMainInstruction />
<HTMLMetaNames />
<HTMLMinorInstruction />
<HTMLReportFormError />
<HTMLRequiredBorderColor />
<HTMLShowButtonClear>true</HTMLShowButtonClear>
<HTMLShowButtonPrint>true</HTMLShowButtonPrint>
<HTMLShowButtonReset>true</HTMLShowButtonReset>
<HTMLShowButtonSave>true</HTMLShowButtonSave>
<HTMLShowButtonSign>true</HTMLShowButtonSign>
<HTMLShowButtonSubmit>true</HTMLShowButtonSubmit>
<HTMLStyles />
<HTMLTitle />
<iScrollFilePath />
<iScrollOff>false</iScrollOff>
<jQueryBlockUIFilePath />
<jQueryFilePath />
<jQueryUIFilePath />
<LoadXML><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ParentField><Field><FieldName>1own.SSN</FieldName><FieldValue>333224444</FieldValue><FieldReadOnly>false</FieldReadOnly><FieldVisibility>1</FieldVisibility><FieldRequired>false</FieldRequired><FieldFormat></FieldFormat><FieldMask>false</FieldMask><FieldCalcOverride>false</FieldCalcOverride><HiddenField>false</HiddenField></Field></ParentField>]]></LoadXML>
<SaveURL />
<SignAllDocsCombined>true</SignAllDocsCombined>
<SignJavascript />
<SignMessage />
<SignShowSignNow>false</SignShowSignNow>
<SignShowVerifyCode>false</SignShowVerifyCode>
<SignShowVerifyIDCheck>false</SignShowVerifyIDCheck>
<SignSubject />
<SignURL>https://websvcs.quikforms.com/Docusign/QuikESignTransportQuikESignTransportVersion/5300/QuikSignTransport.aspx</SignURL>
<SubmitJavascript />
<SubmitURL>https://websvcs.quikforms.com/HTMLFormViewTrans/v5202v5300/FormViewHTML/QFVGetPDF.aspx?Edit=FALSE</SubmitURL>
<HostFormOnQuik>true</HostFormOnQuik>
<PreviewMode>false</PreviewMode>
</Execute>
</soap:Body>
</soap:Envelope>