{"id":3112,"date":"2012-09-25T00:18:55","date_gmt":"2012-09-24T18:48:55","guid":{"rendered":"http:\/\/JitendraZaa.com\/blog\/?p=3112"},"modified":"2017-05-23T16:48:30","modified_gmt":"2017-05-23T16:48:30","slug":"salesforce-interview-question-part-13","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/salesforce-interview-question-part-13\/","title":{"rendered":"Salesforce Interview Question \u2013 Part 13"},"content":{"rendered":"<div class=\"intrinsic-container\"><iframe loading=\"lazy\" src=\"https:\/\/jitendrazaa.com\/blog\/SFDCInterviewList.php?num=13\" width=\"300\" height=\"150\" allowfullscreen=\"allowfullscreen\"> <\/iframe><\/div>\n<hr \/>\n<p style=\"text-align: justify;\"><strong>121 : Consider we have overall 90% code coverage however there is one class which have 0% code coverage. Can we still able to deploy that class on production?<\/strong><br \/>\n<strong> Ans :<\/strong> Yes. Minimum 1% required for every trigger and there is no such restriction for Apex class.<\/p>\n<hr \/>\n<p style=\"text-align: justify;\"><strong>122 : How to get selected records ID from List View using Javascript \/ Ajax Toolkit, when custom button is added on List View page?<\/strong><br \/>\n<strong> Ans :<\/strong> Create a new Button on Lead of type List Button. Add the button on Lead List View Layout and write below Javascript code:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n{!RequireScript(&quot;\/js\/functions.js&quot;)}\r\n\r\nvar recordsSelected = {!GetRecordIds($ObjectType.Lead)}\r\nfor(var i=0; i &lt; recordsSelected .length ; i++) {\r\n     alert('Selected ID '+recordsSelected&#x5B;i]);\r\n}\r\n<\/pre>\n<hr \/>\n<p style=\"text-align: justify;\"><strong>123 : In Ajax toolkit for custom Javascript button, you have to explicitly login to API because global Session variable is not available. In that case it is security vulnerable because anybody logged in can see the javascript code and your username and password. So is there any way to avoid this?<\/strong><br \/>\n<strong> Ans:<\/strong> We can create a visualforce page with output type as JavaScript. Global session variable is available in VF page. Initialize the global javascript variable in that VF page. include VF page as a javascript file and we are done!<\/p>\n<hr \/>\n<p style=\"text-align: justify;\"><strong>124 : In Custom Component How we can return value to Custom Controller or Controller Extension?<\/strong><br \/>\n<strong> Ans:<\/strong> In Apex, Objects are passed by reference (<a title=\"Pass by value and pass by reference in Salesforce\" href=\"https:\/\/jitendrazaa.com\/blog\/java\/pass-by-value-and-pass-by-reference\/\">read this article to understand Pass by Value and Pass by reference in Salesforce<\/a> and also <a title=\"Salesforce blog pass by value and pass by reference\" href=\"http:\/\/blogs.developerforce.com\/developer-relations\/2012\/05\/passing-parameters-by-reference-and-by-value-in-apex.html\" rel=\"nofollow\">read this Salesforce blog article<\/a>). So supply an argument of wrapper class (object) type to custom component. If its value is changed in Custom component we will get updated value in controller also.<!--more--><\/p>\n<hr \/>\n<p style=\"text-align: justify;\"><strong>125 : Lets consider you had created outbound changeset previously. After that, some class is modified which is part of that old changeset.\u00a0Can you reuse same changeset to deployed changed component ?<\/strong><br \/>\n<strong> Ans :<\/strong> Once changeset is created it cannot be modified. After creation of changset, if we modify any component it will not reflected and\u00a0we need to clone the changeset to reflect changes. More information <a href=\"https:\/\/help.salesforce.com\/articleView?id=changesets_best_practices.htm&amp;type=0&amp;language=en_US\">available here<\/a>.<\/p>\n<hr \/>\n<p style=\"text-align: justify;\"><strong>126 : We have a &#8220;Time Based Workflow&#8221; and there is Action scheduled to be executed. If we Deactivate the workflow, Scheduled actions will be removed from queue or not?<\/strong><br \/>\n<strong> Ans :<\/strong> Even after deactivation of workflow, its action will be active in queue.<\/p>\n<hr \/>\n<p style=\"text-align: justify;\"><strong>127 : We have &#8220;Time Based Workflow&#8221; and there is action scheduled to be executed. Can we delete that workflow?<\/strong><br \/>\n<strong> Ans :<\/strong> If a workflow have any pending time dependent action, then we cannot delete the workflow.<\/p>\n<hr \/>\n<p style=\"text-align: justify;\"><strong>128 : How to clear the Time based workflow action queue ?<\/strong><br \/>\n<strong> Ans :<\/strong> Two ways to achieve this : 1. Make criteria false for all those records. 2. Navigate to &#8220;Set up | Monitoring | Time Based Workflow&#8221;, search for scheduled actions and remove from queue.<\/p>\n<hr \/>\n<p style=\"text-align: justify;\"><strong>129 : In trigger, lets say we have system.debug() statement after adderror() method. Will system.debug() be statement executed in Trigger after adderror() method?<\/strong><br \/>\n<strong> Ans:<\/strong> adderror() method is not error statement rather its normal execution flow and all the statements written after adderror() will be executed normally.<\/p>\n<hr \/>\n<div class=\"intrinsic-container\"><iframe loading=\"lazy\" src=\"https:\/\/jitendrazaa.com\/blog\/SFDCInterviewList.php?num=13\" width=\"300\" height=\"150\" allowfullscreen=\"allowfullscreen\"> <\/iframe><\/div>\n","protected":false},"excerpt":{"rendered":"<p>121 : Consider we have overall 90% code coverage however there is one class which have 0% code coverage. Can we still able to deploy that class on production? Ans : Yes. Minimum 1% required for every trigger and there is no such restriction for Apex class. 122 : How to get selected records ID [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"jz_research_post":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[9],"tags":[337,124,331,336],"class_list":["post-3112","post","type-post","status-publish","format-standard","hentry","category-salesforce","tag-apex","tag-interview-questions","tag-salesforce","tag-visualforce"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":3299,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/create-simple-mass-delete-button-for-listview-using-javascript\/","url_meta":{"origin":3112,"position":0},"title":"Create Simple Mass Delete Button for ListView using Salesforce Ajax Toolkit","author":"Jitendra","date":"May 6, 2013","format":false,"excerpt":"In Many situation, I needed a Mass Delete Kind of button. Where, i can select records in ListView and simply click \"Delete\" button. In this example, we will create a simple List View button and add on \"Search Layout\" of that object. So, create a new Custom Button with following\u2026","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Salesforce Mass Delete Button - List View","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2013\/05\/Salesforce-Mass-Delete-Button-List-View.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2013\/05\/Salesforce-Mass-Delete-Button-List-View.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2013\/05\/Salesforce-Mass-Delete-Button-List-View.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":4174,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/salesforce-interview-questions-part-22\/","url_meta":{"origin":3112,"position":1},"title":"Salesforce Interview Questions &#8211; Part 22","author":"Jitendra","date":"December 1, 2015","format":false,"excerpt":"Consider it Facts or FAQ or interview questions but its small and important notes about Salesforce. More than 200 interview questions for Salesforce developer, Admin and consultants","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"220+ Salesforce Interview Questions","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/220plus-Interview-Questions-1024x303.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/220plus-Interview-Questions-1024x303.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/220plus-Interview-Questions-1024x303.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":4394,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/create-and-update-records-using-javascript-button-in-salesforce-ajax-toolkit\/","url_meta":{"origin":3112,"position":2},"title":"Create and update records using Javascript button in Salesforce- Ajax Toolkit","author":"Jitendra","date":"April 21, 2015","format":false,"excerpt":"On this blog we have already seen \"how to use Ajax Toolkit to mass update records\" without writing any Apex code. In this article as well, we will use Ajax Toolkit to add custom button in Account page layout and update record. There are endless possibilities and use-cases where this\u2026","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Update Record using Javascript","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/04\/Update-Record-using-Javascript.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/04\/Update-Record-using-Javascript.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/04\/Update-Record-using-Javascript.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/04\/Update-Record-using-Javascript.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":3411,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/apex-interview-question-salesforce-part-16\/","url_meta":{"origin":3112,"position":3},"title":"Apex Interview Question \u2013 Salesforce &#8211; Part 16","author":"Jitendra","date":"July 28, 2013","format":false,"excerpt":"151. Give Sample Code Snippet of Apex that that will show that how Parent and Child record can be inserted in Single Statement ? Ans : It can be done with help of External Id. [java] Date dt = Date.today().addDays(7); Opportunity newOpportunity = new Opportunity(Name = 'shivasoft', StageName = 'Prospecting',\u2026","rel":"","context":"In &quot;Apex&quot;","block_context":{"text":"Apex","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/apex\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3355,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/jquery-based-raffle-in-salesforce\/","url_meta":{"origin":3112,"position":4},"title":"JQuery Based Raffle in Salesforce","author":"Jitendra","date":"June 29, 2013","format":false,"excerpt":"Recently i run into very interesting scenario where i had to randomly take name of few contacts. There are many ways to do it but I thought why not to implement this functionality in Salesforce with help of some Javascript? So i came up with this - JQuery based Raffle\u2026","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"JQuery Based Raffle in Salesforce","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2013\/06\/JQuery-Based-Raffle-in-Salesforce.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2013\/06\/JQuery-Based-Raffle-in-Salesforce.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2013\/06\/JQuery-Based-Raffle-in-Salesforce.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":4788,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/create-radar-chart-lightning-component\/","url_meta":{"origin":3112,"position":5},"title":"Salesforce Lightning Component &#8211; Radar Chart","author":"Jitendra","date":"August 29, 2015","format":false,"excerpt":"How to create Radar chart using Lightning Component in Salesforce with the help of Chart.js library","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Lightning Component for Radar Chart","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/08\/GIF-Radar-Chart.gif?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/3112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/comments?post=3112"}],"version-history":[{"count":6,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/3112\/revisions"}],"predecessor-version":[{"id":6061,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/3112\/revisions\/6061"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=3112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=3112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=3112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}