Posts

Showing posts from June 23, 2016

Salesforce Spring 16 Release Exam (Maintenance Exam Q&A) for Developer 401

1 ) What is true about the file sharing “Set by Record?” A) It is used to infer sharing via the record type. B) It is used to infer sharing via the record owner. C) It is used to infer sharing via the parent record. D) It is used to infer sharing via the associated record. 2) Which Quick Actions can contain a “Custom Success Message?” Choose 2 answers A) Send an Email B)Visit a website C)Log a Call D)Update a Record 3) What is true about dataloader? Choose 3 answers A) It can be used with OAuth Authentication B) It can be used with Password Authentication C) It can be used with both Mac and PC . D) It can be used with only a PC. E)It can be used with SAML Authentication. 4) Which standard field can be updated using formal rules in process builder? A) Owner Id B) Deleted C) Created Date D) Id 5) What must be true when accessing a user’s private reports and dashboards? Choose 2 answers A) Having the “Administrator Access to Private Files” permission

Parse XML using APEX

string  xmlstring =  '<?xml version="1.0" encoding="UTF-8"?><OTPResp status="1" ts="2016-06-09T17:24:46" txn="20160609172112021" resCode="ad3198bda02e3742571c855b50c576de2e8c8641" errCode="" errMsg=""></OTPResp>';                                     DOM.Document xmlDOC = new DOM.Document();                    xmlDOC.load(xmlstring);                    DOM.XMLNode rootElement = xmlDOC.getRootElement();                    //outxmlstring=String.valueof(xmlDOC.getRootElement().getChildAttribute());                     outxmlstring=String.valueof(rootElement.getAttributeValue('status',null));                     outxmlstring1 =String.valueof(rootElement.getAttributeValue('resCode',null));                      system.debug('++++outxmlstring '+outxmlstring );   Output:  outxmlstring = 1                outxmlstring1  =  ad3198bda02e3742571c855b50c5

Calculate the Column values at visual force page

Requirement: Calculate total quantity on visualforce page Solution:  <apex:page>   <form>  <apex:variable var="countqu" value="{!0}"/>   <apex:repeat var="count" value="{!lst}" >  <td > <apex:variable var="countqu" value="{!(countqu + round(count.quantity__c,0 ))}"/> <apex:outputtext value="{!round(count.quantity__c,0 )}" /> </td>   </apex:repeat   >   <td>{!countqu} </td> </form> </apex:page> OUT PUT : Quantity  10 20 30 40 ---------- 100 ( calculate on vf Page) --------