• kranjan
  • NEWBIE
  • 210 Points
  • Member since 2012

  • Chatter
    Feed
  • 8
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 66
    Replies

Hi 

 

 Am created a visual force page to genarate records in csv format am using apex page tag like

 

<apex:page standardController="Case" extensions="CasesController" sidebar="false" showheader="false" recordSetVar="cases" cache="true" contentType="text/csv#Export.csv" language="en-US">

 

 

But am getting csv file like :

 

 

<script> if(!window.sfdcPage){window.sfdcPage = new ApexPage();}
UserContext.initialize({"networkId":"" locale:"en_US" labelLastModified:"1367417886000" isDefaultNetwork:true today:"5/24/2013 11:00 AM" timeFormat:"h:mm a" userPreferences:[{"index":112 name:"HideInlineEditSplash" value:false} {"index":114 name:"OverrideTaskSendNotification" value:false} {"index":115 name:"DefaultTaskSendNotification" value:false} {"index":119 name:"HideUserLayoutStdFieldInfo" value:false} {"index":116 name:"HideRPPWarning" value:false} {"index":87 name:"HideInlineSchedulingSplash" value:false} {"index":88 name:"HideCRUCNotification" value:false} {"index":89 name:"HideNewPLESplash" value:false} {"index":90 name:"HideNewPLEWarnIE6" value:false} {"index":122 name:"HideOverrideSharingMessage" value:false} {"index":91 name:"HideProfileILEWarn" value:false} {"index":93 name:"HideProfileElvVideo" value:false} {"index":97 name:"ShowPicklistEditSplash" value:false} {"index":92 name:"HideDataCategorySplash" value:true} {"index":128 name:"ShowDealView" value:false} {"index":129 name:"HideDealViewGuidedTour" value:false} {"index":132 name:"HideKnowledgeFirstTimeSetupMsg" value:false} {"index":104 name:"DefaultOffEntityPermsMsg" value:false} {"index":135 name:"HideNewCsnSplash" value:false} {"index":101 name:"HideBrowserWarning" value:true} {"index":139 name:"HideDashboardBuilderGuidedTour" value:true} {"index":140 name:"HideSchedulingGuidedTour" value:false} {"index":180 name:"HideReportBuilderGuidedTour" value:true} {"index":183 name:"HideAssociationQueueCallout" value:true} {"index":194 name:"HideQTEBanner" value:false} {"index":193 name:"HideChatterOnboardingSplash" value:true} {"index":195 name:"HideSecondChatterOnboardingSplash" value:false} {"index":270 name:"HideIDEGuidedTour" value:true} {"index":282 name:"HideQueryToolGuidedTour" value:false} {"index":196 name:"HideCSIGuidedTour" value:true} {"index":271 name:"HideFewmetGuidedTour" value:false} {"index":272 name:"HideEditorGuidedTour" value:true} {"index":205 name:"HideApexTestGuidedTour" value:false} {"index":206 name:"HideSetupProfileHeaderTour" value:true} {"index":207 name:"HideSetupProfileObjectsAndTabsTour" value:true} {"index":213 name:"DefaultOffArticleTypeEntityPermMsg" value:false} {"index":214 name:"HideSelfInfluenceGetStarted" value:true} {"index":215 name:"HideOtherInfluenceGetStarted" value:true} {"index":216 name:"HideFeedToggleGuidedTour" value:false} {"index":268 name:"ShowChatterTab178GuidedTour" value:false} {"index":275 name:"HidePeopleTabDeprecationMsg" value:false} {"index":276 name:"HideGroupTabDeprecationMsg" value:false} {"index":222 name:"TouchExternalLinkReminderSuppression" value:false} {"index":224 name:"HideUnifiedSearchGuidedTour" value:true} {"index":226 name:"ShowDevContextMenu" value:true} {"index":227 name:"HideWhatRecommenderForActivityQueues" value:false} {"index":228 name:"HideLiveAgentFirstTimeSetupMsg" value:false} {"index":232 name:"HideGroupAllowsGuestsMsgOnMemberWidget" value:true} {"index":233 name:"HideGroupAllowsGuestsMsg" value:true} {"index":234 name:"HideWhatAreGuestsMsg" value:true} {"index":235 name:"HideNowAllowGuestsMsg" value:true} {"index":236 name:"HideSocialAccountsAndContactsGuidedTour" value:true} {"index":237 name:"HideAnalyticsHomeGuidedTour" value:true} {"index":238 name:"ShowQuickCreateGuidedTour" value:false} {"index":245 name:"HideFilePageGuidedTour" value:true} {"index":250 name:"HideForecastingGuidedTour" value:false} {"index":242 name:"TouchHideOptoutHover" value:false} {"index":251 name:"HideBucketFieldGuide" value:false} {"index":263 name:"HideSmartSearchCallOut" value:true} {"index":265 name:"HideSocialProfilesKloutSplashScreen" value:true} {"index":273 name:"ShowForecastingQuotaAttainment" value:false} {"index":280 name:"HideForecastingQuotaColumn" value:false} {"index":301 name:"HideManyWhoGuidedTour" value:false} {"index":284 name:"HideExternalSharingModelGuidedTour" value:false} {"index":298 name:"HideFileSyncBannerMsg" value:false} {"index":299 name:"HideTestConsoleGuidedTour" value:false} {"index":300 name:"HideNetworkSetupOverlayGettingStarted" value:false} {"index":302 name:"HideManyWhoInlineEditTip" value:false} {"index":303 name:"HideSetupV2WelcomeMessage" value:false}] orgPreferences:[{"index":257 name:"TabOrganizer" value:true}] startOfWeek:"1" isAccessibleMode:false ampm:["AM" PM] renderMode:"RETRO" userId:"005900000015jO6" dateTimeFormat:"M/d/yyyy h:mm a" dateFormat:"M/d/yyyy" uiSkin:"Theme3" language:"en_US" siteUrlPrefix:""});
</script><div class="apexp"><div class="individualPalette"><div class="caseBlock"><div id="j_id0:j_id1" class="bPageBlock brandSecondaryBrd apexDefaultPageBlock secondaryPalette"><div class="pbBody"><table class="list " id="j_id0:j_id1:j_id2" border="0" cellpadding="0" cellspacing="0"><colgroup span="3"></colgroup><thead class="rich-table-thead"><tr class="headerRow "><th class="headerRow " scope="col" colspan="1" id="j_id0:j_id1:j_id2:j_id3header"><div id="j_id0:j_id1:j_id2:j_id3header:sortDiv">Case Number</div></th><th class="headerRow " scope="col" colspan="1" id="j_id0:j_id1:j_id2:j_id4header"><div id="j_id0:j_id1:j_id2:j_id4header:sortDiv">Subject</div></th><th class="headerRow " scope="col" colspan="1" id="j_id0:j_id1:j_id2:j_id5header"><div id="j_id0:j_id1:j_id2:j_id5header:sortDiv">Priority</div></th></tr></thead><tbody id="j_id0:j_id1:j_id2:tb"><tr class="dataRow even first " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:0:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:0:j_id6">00001046</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:0:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:0:j_id7">gmail</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:0:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:0:j_id8">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:1:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:1:j_id9">00001050</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:1:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:1:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:1:j_id10">High</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:2:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:2:j_id11">00001055</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:2:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:2:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:2:j_id12">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:3:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:3:j_id13">00001035</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:3:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:3:j_id14">Valuable case</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:3:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:3:j_id15">High</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:4:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:4:j_id16">00001041</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:4:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:4:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:4:j_id17">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:5:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:5:j_id18">00001029</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:5:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:5:j_id19">Hi</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:5:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:5:j_id20">High</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:6:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:6:j_id21">00001053</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:6:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:6:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:6:j_id22">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:7:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:7:j_id23">00001039</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:7:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:7:j_id24">transform</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:7:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:7:j_id25">High</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:8:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:8:j_id26">00001015</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:8:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:8:j_id27">Frequent mechanical breakdown</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:8:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:8:j_id28">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:9:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:9:j_id29">00001024</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:9:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:9:j_id30">Design issue with mechanical rotor</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:9:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:9:j_id31">Medium</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:10:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:10:j_id32">00001030</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:10:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:10:j_id33">salesteam</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:10:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:10:j_id34">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:11:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:11:j_id35">00001045</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:11:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:11:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:11:j_id36">High</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:12:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:12:j_id37">00001054</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:12:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:12:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:12:j_id38">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:13:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:13:j_id39">00001049</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:13:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:13:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:13:j_id40">High</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:14:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:14:j_id41">00001033</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:14:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:14:j_id42">Newcase</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:14:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:14:j_id43">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:15:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:15:j_id44">00001036</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:15:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:15:j_id45">sales force case</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:15:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:15:j_id46">High</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:16:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:16:j_id47">00001051</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:16:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:16:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:16:j_id48">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:17:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:17:j_id49">00001031</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:17:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:17:j_id50">New case</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:17:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:17:j_id51">Low</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:18:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:18:j_id52">00001032</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:18:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:18:j_id53">(#76287352) Gmail Forwarding Confirmation - Receive Mail from suresh.advanz@gmail.com</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:18:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:18:j_id54">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:19:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:19:j_id55">00001043</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:19:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:19:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:19:j_id56">High</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:20:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:20:j_id57">00001052</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:20:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:20:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:20:j_id58">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:21:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:21:j_id59">00001016</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:21:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:21:j_id60">installation</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:21:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:21:j_id61">Medium</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:22:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:22:j_id62">00001056</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:22:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:22:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:22:j_id63">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:23:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:23:j_id64">00001047</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:23:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:23:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:23:j_id65">High</span></td></tr><tr class="dataRow even last " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:24:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:24:j_id66">00001044</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:24:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:24:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:24:j_id67">High</span></td></tr></tbody></table></div><div class="pbFooter secondaryPalette"><div class="bg"></div></div></div></div></div></div>

 

 

 

 

 

 

Anybody can help?

 

 

Thanks

 

When the status of a case is changed, I need to update this in a third party application. Seems like CaseStatus doesnt allow triggers. How can I achieve this ? On each status change in the Case, I need to send the actual Status of the case along with CaseID to an external application. Is this possible ? Any help regarding this would be appreciated. Thank you.

  • May 23, 2013
  • Like
  • 0

Apologies I know this has been covered several times in the forum but I have been trying out the code/suggestions for the other posts but can't seem to apply it to my situation.  I am trying render a pdf attachement to an email to show a list on one page and an image on the next.  Both pages have a background image from Static resources on them.  I have managed to get the PDF to split into 2 pages but the list and image appear together on both pages.  Any suggestions on how I can alter my following code to fix this?  Many Thanks.

 

 

<messaging:attachment renderAs="pdf" filename="Venue Specifications">
<html><head>
<style type="text/css" media="print">

@page{
    @bottom-left {                  
    content: element(footer);      
    }   
    size: A4 portrait;
    margin-top:0cm;
    margin-left:0cm;
    margin-right:0cm;
    margin-bottom:0cm;  
}

p
{
color:#666666;
font-family:"Arial Unicode MS";
font-size:10pt;
}

h3
{
color:#E52013;
font-family:"Arial Unicode MS";
font-size:11pt;
font-style:bold;
}

footer
{
color:#A9A9A9;
font-family:"Arial Unicode MS";
font-size:7.5pt;
}
</style>

</head>


<img src="{!URLFOR($Resource.Document_New)}" style="position: fixed; left: 0cm; top:0cm;  z-index:-1" width="21cm" height="29.7"/>

<table style="position: fixed; left: 2.54cm; top:4.25cm; width:16.02cm; height:21.2cm;" border="0.1">
<tr><td>
<b><h3>VENUE SPECIFICATIONS:</h3></b>
<ol>
<li><p>Numbered list.</p></li>
<li>....</li>
</ol>
<p>If you have any difficulties in meeting these requirements please contact us as soon as possible. </p>
</td></tr></table>

<footer>
<table width="15.92cm" valign="top" style="position: fixed; left: 2.54cm; top: 27.1cm;" >
  <colgroup>
    <col span="4" width="3.98cm" />
  </colgroup>
<tr valign="top">
<td>Office Address<br/>Street<br/></td>
<td></td>
<td></td>
</tr>
</table>
</footer>

<div style="page-break-before:always">
<img src="{!URLFOR($Resource.Document_New)}" style="position: fixed; left: 0cm; top:0cm;  z-index:-1" width="21cm" height="29.7"/>

<apex:image style="position: fixed; left: 4cm; top:8cm;"  url="https://cs7.salesforce.com/servlet/servlet.ImageServer?id=........"/>
</div>
</html>
</messaging:attachment>


  • August 10, 2012
  • Like
  • 0

Am really stuck here!

I have 2 custom objects Candidates__c and Applicant__c.

Candidate__c is the Parent Object and Applicant__c is the child object.

Now i have a custom button on Applicant__c standard page that is executing a javascript&colon;

What i want is to write a query to get Email from Candidate__c Object.

I have tried to write some query and this is what i have:

 

{!REQUIRESCRIPT("/soap/ajax/15.0/connection.js")}

var result = sforce.connection.query("Select Main_Email__c From Candidate__c where Name={!Applicant__c.Candidate_Name__c}");

In this Query i can't get the unique record for that Applicant becouse am using Name in where clouse;

How do i use id in where clouse or how do i get Email for that Applicant.

Please Help!

  • August 10, 2012
  • Like
  • 0

Hai All,

 

When i was entered the data and saving to Lead,Through VisualForce Page..

It Raising Error...

 

AutomateLeadConversion: execution of AfterUpdate caused by: System.DmlException: ConvertLead failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Converted objects can only be owned by users. If the lead is not owned by a user, you must specify a user for the Owner field.: [] Trigger.AutomateLeadConversion: line 12, column 1

 

My Trigger :

 

trigger AutomateLeadConversion on Lead (After Update) {
system.debug('Enter to convert Lead');
Lead myLead = trigger.new[0];

if( mylead.Incomplete_Application__c == false && myLead.isconverted==false && myLead.SSN_Not_Eligible__c == false && myLead.No_Govt_Proof_Form__c ==false && myLead.No_Program_List__c == false){
//myLead.LeadSource == 'fax'
system.debug('Enter to convert Lead condition');
database.LeadConvert lc = new database.LeadConvert();
lc.setLeadID(myLead.ID);
lc.convertedstatus = 'Closed - Converted';
lc.setDoNotCreateOpportunity(true);
Database.LeadConvertResult lcr = Database.convertLead(lc); ---->Line 12
System.assert(lcr.isSuccess());

}

}

 

 

 Please suggest me What to do for this....

Thanks,

I want to create a list of sObjects that were modified 7 days ago.

 

I am using code similar to this, but when I get to the SOQL query it appears that something is not quite working.

 

Date myDate = date.today()-7;
List<Recruitment_Cycle__c> RCs = [Select ID, Name, LastModifiedDate from Recruitment_Cycle__c where LastModifiedDate =: myDate ]; 

In this case I am getting 0 rows, however there are a number of records that I would expect to meet the criteria when looking at the data. I suspect something is wrong with my comparison etc...

 

When I check the debug for myDate it is assigning what looks like the proper date.

HI   i wrote trigger  ,   and i neeed to test  coverage fothat trigger

,i wrote test class for that , but i am not gettin any covarge, any can help;

 

trigger updateAsurvey on Send_Email__c (Before update) {
list<Anxiety_Survey_del__c> aslist=new list<Anxiety_Survey_del__c>();
list<Send_Email__c> slist=new list<Send_Email__c>();
list<Send_Email__c> dellist=new list<Send_Email__c>();
for(Send_Email__c se:trigger.new){
If(se.change__c!=null&&se.Date_to_send__c!=null){
If(se.Anxiety_Survey__c!=null)
If(se.Anxiety_Survey__r.Survey_Created__c==false)
{
    for(Send_Email__c sek:[select id from Send_Email__c where Anxiety_Survey__c=:se.Anxiety_Survey__c and id!=:se.id])
    dellist.add(sek);
    Anxiety_Survey_del__c ask=new Anxiety_Survey_del__c(id=se.Anxiety_Survey__c);
    ask.Send_Daily_email__c=se.Date_to_send__c.adddays(1);
    aslist.add(ask);
    Send_Email__c sec=new Send_Email__c();
    sec.Date_to_send__c=se.Date_to_send__c.adddays(1);
    sec.Anxiety_Survey__c=se.Anxiety_Survey__c;
    slist.add(sec);    
}
}
}
if(slist.size()>0)
insert slist;
if(aslist.size()>0)
update aslist;
if(dellist.size()>0)
delete dellist;

}

 

 

 

@isTest
private class TestupdateAsurvey
{
 private Static  TestMethod  void Testupdate1()
{
 Patient__c  p =new Patient__c(E_LastName__c='xxxx',E_Electronic_Chart_ID__c='aaaaaa');
 insert p;
 Patient__c  p1 =new Patient__c(E_LastName__c='yyyyy',E_Electronic_Chart_ID__c='zzzzz');
 insert p1;
 Anxiety_Survey_del__c  a=new Anxiety_Survey_del__c(Name='aaaaa',Patient__c =p.id,Survey_Created__c=false);
 insert a;
 Anxiety_Survey_del__c  a1=new Anxiety_Survey_del__c(Name='bbbb',Patient__c = p.id,Survey_Created__c=false);
 insert a1;
 Send_Email__c  s=new Send_Email__c(Anxiety_Survey__c=a.id,change__c='zzzz',Date_to_send__c=system.today().adddays(3));
 insert s;
 Send_Email__c  s1=new Send_Email__c(Anxiety_Survey__c=a.id,change__c='eeee',Date_to_send__c=system.today().adddays(4));
 insert s1;
 //a1.Patient__c=p1.id ;
 //update a1;
 s1.Anxiety_Survey__c=a1.id;
 delete s1;
 
}
}

Hello,

 

I have a VF page on a custom object "Test_Object__c"  (child of Account) with a custom controller.  At the moment, when the user enters their data in the VF page and saves it, they are returned to the Account page where they originated.  I would, however, like them to be re-directed to the detail page of the record they just saved.  I know this is probably a fairly simple thing to do, but everything I've tried just keeps returning me to the Accoun.  Below is my controller.  I would appreciate any insight.  Thanks,

 

 

public class TestController3{

public List<Test_Object__c> test {get; set;}
    private final Account acct;
    public TestController3(ApexPages.StandardController myController) {
        acct=(Account)myController.getrecord();
                  
        test= new List<Test_Object__c>();
        Test_Object__c test2 = new Test_Object__c();
               test2.Company_Name_Test__c = acct.id;
        test.add(test2);}


    public PageReference save() {
        insert test;
        PageReference acctPage = new ApexPages.StandardController(acct).view();
        acctPage.setRedirect(true);
        return acctPage; }

}

  • August 08, 2012
  • Like
  • 0
We are using scratch orgs for our development and are facing very peculiar issue. Even when Knowledge feature is already ENABLED in the orgs, when we are pushing the code to our org or even when we are running simple query on SObject Knowledge__kav object.

Query below is giving this error
SELECT Id, Title FROM Knowledge__kav

Error: sObject type 'Knowledge__kav' is not supported

Pushing code with a Tab attached to standard Knowledge__kav object to scratch org is giving error:
no CustomObject named Knowledge__kav found

Any help is highly appreciated.
Hi,

We have a SF package related to chatter and communities. This package requires communities to be enabled in an org to install. However in one of our client's org, the Package Installation is failing with error for Missing Organization Feature: Customer Success Portal. We do not have any dependency on this feature as such, however the package is also showing a dependency on this feature under the package details in the development org. We are able to successfully install the package on our test orgs even when Customer Portal is not enabled showing that there should not be any dependency on this feature. We also have went ahead and created a Trial org (to check) which does not have the customer portal feature and we just enabled Partner community in the org. And we were able to successfully deploy the complete code and config to the new trial EE org (with customer portal feature totally not existing. showing up in that org). So our dependency is communities and not the customer portal which is verified with the complete code being deployed to the Trial org without any issues. However the package seems to be showing a wrong dependency. It should be showing the dependency as Communities and NOT customer portal. We contacted SF support but they said this is developer issue. We are failing to understand how to resolve this dependency when its SF who is showing this as a dependency. 

​Can anyone please help how to resolve this? Any help is highly appreciated.

Regards
Kamal
Hi,

We have a Contentpack Content record which is created using an existing content. Suprisingly the new contentversion record for the contentpack  has no PathOnClient, no ContentURL and No VersionData. But it has content attached in the database which can be seen and can be downloaded from its content detail page. We need to clone this content Pack record from the org to a community. How can this be done as when one tries to create a ContentVersion record with no PathOnClient, no ContentURL and No VersionData, salesforce does not allows you to do that.

Any help is highly appreciated

Thanks
Kamal Ranjan

Hi,

 

I want to do a multi-part post from Apex to salesforce itself for an image. And salesforce expects binary data for the image. However we need to prefix the header with boundary as part of multipart convention and append footer so that receiving end (salesforce in this case) can parse the same and process the data(Image in this case). The issue is image is a blob and headers and footers are string. And we cannot directly concatenate these 3 parts in Apex to send to SF.

 

One possible way suggested by people who had similar issues was use base64encoded to convert blob to string and concatenate the header and footer. This is good and works but only 33% of times. Reason is base64 encdoing appends "=" or "==" sign to padd at the end if the source blob data bytes are not exact multiple of 3 (This is how base64encoding works). So these padded characters creates issues if they are appended while encoding. There is no fruitful way i am able to figure out to resolve this final issue and I get 400 bad request by SF. There was a way suggested by @Enreeco in his blog but that resolves the error from 400 to a successful 201 return value. But the background issue is that the way the "=" characters were removed actually corrupted the blob data, so receiving end receives a valid request but NOT a valid content and thus image is not really uploaded and assigned to the profile.

 

To avoid the above concatenation problem, I also tried to set Content-Transfer-Encoding as "base64" and sending only the image as base64encoded and header/ footers as normal string, however that request is also generating 500 server error.

Has anyone faced any similar issues or has any pointers for any workaround either for concatenating the header, footer string to blob body or else for resolving the padded "=" characters and not corrupting the data. Or has anybody successfully tried using base64 as Content-Transfer-Encoding method to send multi-part post? Any help is highly appreciated.

 

Thanks in advance

 

Kamal

Hi,

 

I have created a new sandbox from a enterprise org and I am trying to schedule a job using the following code in the sandbox.

 

String actJobId = System.schedule('ActScheduler', system.now().addSeconds(30).format('ss mm HH dd MM ? yyyy'), new ActivitiesJob2Scheduler());

 

But it throws the following exception though there is no job for this which is showing under scheduled jobs. 

 

System.AsyncException: The Apex job named "ActScheduler" is already scheduled for execution.

Does anyone has any idea why this is happening like this and why it is not able to schedule the job.

 

Regards

Kamal Ranjan

Hi

 

We would like to connect a salesforce user to another salesforce user in another org without any user intervention from a service.

 

We have tried SAML Bearer Flow (using Remote Access Application) to connect to salesforce to retreive Access Token for one of our product. We are referring to the follwoing article.

 

http://help.salesforce.com/help/doc/en/remoteaccess_oauth_SAML_bearer_flow.htm

 

As referred by the SF article for this flow, it uses a previous user authorization to connect and retreive Token. In case the user (for whom Token is requested) has not already authorized the App, SF takes you to the Authorization page first and app will get the access token once app is authorized. This is working fine too. However it has this painful step of users authorizing the app before we can use this flow for the product. It would be good and simplified if this step can be done once for an org and the article does mentions that either User or Admin can authorize the app. However I am not able to find how an Admin can authorize the remote access application.

 

Does anyone knows and can guide how can an Admin authorize an App or is thre any other way we can achieve our requirement. Any thoughts will be really appreciated.

 

Thanks in advance.

 

Regards

Hi,

 

There is this new feature of Feed poll in chatter now. I need to access where the FeedItem choices for the poll post stored and also where are the votes (if anyone casts the same) are stored. Can anyone help me out as i could not figure out in the chatter Data model for this.

 

Thanks in advance.

 

Regards

 

Hi,

 

I am facing an issue where we have a product in which there are 3 batch jobs which run on an interval of 1 min, 30 min and 1 min respectively as they need to sync up the data almost real time. However I am facing a peculiar issue where the batch jobs do not run at their scheduled run time and even are stuck for more than 2 hours in a sandbox org. I understand that batch jobs, future methods are asynchronous routines and run as per the availability of resources. However I have never seen such behavior before where jobs are stuck for hours. Also the same types of jobs working in same model for the same product are working perfectly fine in another sandbox org.

 

Does anyone has any idea and let know why is this happening and is there anything that can be done to resolve the same.

 

Regards

Kamal Ranjan

Hi,

We have a SF package related to chatter and communities. This package requires communities to be enabled in an org to install. However in one of our client's org, the Package Installation is failing with error for Missing Organization Feature: Customer Success Portal. We do not have any dependency on this feature as such, however the package is also showing a dependency on this feature under the package details in the development org. We are able to successfully install the package on our test orgs even when Customer Portal is not enabled showing that there should not be any dependency on this feature. We also have went ahead and created a Trial org (to check) which does not have the customer portal feature and we just enabled Partner community in the org. And we were able to successfully deploy the complete code and config to the new trial EE org (with customer portal feature totally not existing. showing up in that org). So our dependency is communities and not the customer portal which is verified with the complete code being deployed to the Trial org without any issues. However the package seems to be showing a wrong dependency. It should be showing the dependency as Communities and NOT customer portal. We contacted SF support but they said this is developer issue. We are failing to understand how to resolve this dependency when its SF who is showing this as a dependency. 

​Can anyone please help how to resolve this? Any help is highly appreciated.

Regards
Kamal
Hi,

We have a SF package related to chatter and communities. This package requires communities to be enabled in an org to install. However in one of our client's org, the Package Installation is failing with error for Missing Organization Feature: Customer Success Portal. We do not have any dependency on this feature as such, however the package is also showing a dependency on this feature under the package details in the development org. We are able to successfully install the package on our test orgs even when Customer Portal is not enabled showing that there should not be any dependency on this feature. We also have went ahead and created a Trial org (to check) which does not have the customer portal feature and we just enabled Partner community in the org. And we were able to successfully deploy the complete code and config to the new trial EE org (with customer portal feature totally not existing. showing up in that org). So our dependency is communities and not the customer portal which is verified with the complete code being deployed to the Trial org without any issues. However the package seems to be showing a wrong dependency. It should be showing the dependency as Communities and NOT customer portal. We contacted SF support but they said this is developer issue. We are failing to understand how to resolve this dependency when its SF who is showing this as a dependency. 

​Can anyone please help how to resolve this? Any help is highly appreciated.

Regards
Kamal

Hi,

 

I am new to Salesforce, I have a query,  Please look into following scenario:

I made a VF page containing 'n' number of listboxes.

Each list box shows all the field names from a CSV file, and the first field name remains the default selected value for each list box (ie. All the list boxes are having same default value)

 

Number of list boxes are equal to number of fields in CSV file.

 

I want each list box to have a different field name as default selected value

 

Can anyone please help ?

 

 

 

 

  • May 24, 2013
  • Like
  • 0

Hi Guys,

 

i using a image which is coming from the .css file. If i am logged into salesforce, than i am able to see the image. But i am exposing vf page using sites in that scenario it is not visible.
 The belwo is the .css code how it is refrencing

 

#templatemo_header #site_logo1 {
    float: left;
    width: 340px;
    height: 100px;
    background:url(https://ap1.salesforce.com/resource/1369383790000/biz_left_button) no-repeat;
}

 

I tried the below option also, but it didn;t worked.

background: url("{!$Resource.biz_left_button}") no-repeat;

 

Any suggestions please.

 

Thanks,

Bujji

  • May 24, 2013
  • Like
  • 0

HI all, 

 

can any body help me in the following code.

 

I am new to apex code..

 

trigger EventComplete_Opportunity on Event (after insert,after update) {

Map <Id, String> OppStatus = new Map <Id, String>();
Map <Id, String> OppStatusS = new Map <Id, String>();
List <Opportunity> OppToUpdate = new List <Opportunity>();
List <Opportunity> OppToUpdateS = new List <Opportunity>();
set<ID> OPPTaskIDS = new set<ID>();
String Last_Activity;
Date Last_Activity_Date;
String Next_Step;
Date Next_Step_Date;
DateTime ComEndDtae=datetime.now() ;

for(Event e : trigger.new) {
if(e.whoId != null) {
String x = e.whoId;
// 006 is a Opportunity
if (x.substring(0,3) == '006' ){
OppStatus.put(e.whoId,e.Subject);
Last_Activity = e.Subject;
Last_Activity_Date = date.today();
}
}

for(Opportunity o : [Select id, Last_Activity__c, Last_Activity_Date__c from Opportunity where id in :OppStatus.keyset()]) {
o.Last_Activity__c = Last_Activity;
o.Last_Activity_Date__c = Last_Activity_Date;
OppToUpdate.add(o);
}

if(OppToUpdate.size() > 0)
update OppToUpdate;
OppToUpdate.clear();


if(e.whatid<>null){
OPPTaskIDS.add(e.whoId);
}


if(OPPTaskIDS.size()>0){

for(Opportunity o: [Select o.Id, o.Next_Step__c, o.Next_Step_Due_Date__c,
(Select Id, Subject,ActivityDate From Events ORDER BY StartDateTime ASC)
From Opportunity o where Id in :OPPTaskIDS]){

o.Next_Step__c = o.Events[0].Subject;
o.Next_Step_Due_Date__c = o.Events[0].ActivityDate;
OppToUpdateS.add(o);
}
}

if(OppToUpdateS.size() > 0)
update OppToUpdateS;
OppToUpdateS.clear();

}
}

 

 

But after completion of Events based on date..still it is showing as Next Activity and Next activity Due date..

 

Please help me out from this...

 

Thanks in Advance!!!

Hello Everyone,

 

When i click on the "Save" button, i want to insert the pdf file that is generated by visualforce into the attachments related list.

 

I have implemented the code for this. But i am able to insert the attachment but when i try to open the pdf file, i am getting "Failed to Load PDF Document" error.

 

Here is the code:

 

Trigger:

----------

trigger InsertAttachment on Account (after insert) {
for(Account acc:Trigger.New)
{
MergePDF_Controller ac=new MergePDF_Controller();
ac.Save(trigger.new[0]);
}

}

 

Class:

 

public with sharing class MergePDF_Controller {
public pagereference save(Account AccId){

PageReference pdf = new PageReference('/apex/MergePDF?id='+Accid);
Attachment attach = new Attachment();

Blob body;

try {

body = pdf.getContent();

} catch (VisualforceException e) {
body = Blob.valueOf('Some Text');

}

attach.Body = body;
attach.Name = Account.name+'.pdf';
attach.IsPrivate = false;
attach.ParentId = AccId.id;
insert attach;
return new PageReference('/' +AccId.id);


}
}

 

 

Any suggestions will be helpful.

 

Thanks,

Anil

Hi 

 

 Am created a visual force page to genarate records in csv format am using apex page tag like

 

<apex:page standardController="Case" extensions="CasesController" sidebar="false" showheader="false" recordSetVar="cases" cache="true" contentType="text/csv#Export.csv" language="en-US">

 

 

But am getting csv file like :

 

 

<script> if(!window.sfdcPage){window.sfdcPage = new ApexPage();}
UserContext.initialize({"networkId":"" locale:"en_US" labelLastModified:"1367417886000" isDefaultNetwork:true today:"5/24/2013 11:00 AM" timeFormat:"h:mm a" userPreferences:[{"index":112 name:"HideInlineEditSplash" value:false} {"index":114 name:"OverrideTaskSendNotification" value:false} {"index":115 name:"DefaultTaskSendNotification" value:false} {"index":119 name:"HideUserLayoutStdFieldInfo" value:false} {"index":116 name:"HideRPPWarning" value:false} {"index":87 name:"HideInlineSchedulingSplash" value:false} {"index":88 name:"HideCRUCNotification" value:false} {"index":89 name:"HideNewPLESplash" value:false} {"index":90 name:"HideNewPLEWarnIE6" value:false} {"index":122 name:"HideOverrideSharingMessage" value:false} {"index":91 name:"HideProfileILEWarn" value:false} {"index":93 name:"HideProfileElvVideo" value:false} {"index":97 name:"ShowPicklistEditSplash" value:false} {"index":92 name:"HideDataCategorySplash" value:true} {"index":128 name:"ShowDealView" value:false} {"index":129 name:"HideDealViewGuidedTour" value:false} {"index":132 name:"HideKnowledgeFirstTimeSetupMsg" value:false} {"index":104 name:"DefaultOffEntityPermsMsg" value:false} {"index":135 name:"HideNewCsnSplash" value:false} {"index":101 name:"HideBrowserWarning" value:true} {"index":139 name:"HideDashboardBuilderGuidedTour" value:true} {"index":140 name:"HideSchedulingGuidedTour" value:false} {"index":180 name:"HideReportBuilderGuidedTour" value:true} {"index":183 name:"HideAssociationQueueCallout" value:true} {"index":194 name:"HideQTEBanner" value:false} {"index":193 name:"HideChatterOnboardingSplash" value:true} {"index":195 name:"HideSecondChatterOnboardingSplash" value:false} {"index":270 name:"HideIDEGuidedTour" value:true} {"index":282 name:"HideQueryToolGuidedTour" value:false} {"index":196 name:"HideCSIGuidedTour" value:true} {"index":271 name:"HideFewmetGuidedTour" value:false} {"index":272 name:"HideEditorGuidedTour" value:true} {"index":205 name:"HideApexTestGuidedTour" value:false} {"index":206 name:"HideSetupProfileHeaderTour" value:true} {"index":207 name:"HideSetupProfileObjectsAndTabsTour" value:true} {"index":213 name:"DefaultOffArticleTypeEntityPermMsg" value:false} {"index":214 name:"HideSelfInfluenceGetStarted" value:true} {"index":215 name:"HideOtherInfluenceGetStarted" value:true} {"index":216 name:"HideFeedToggleGuidedTour" value:false} {"index":268 name:"ShowChatterTab178GuidedTour" value:false} {"index":275 name:"HidePeopleTabDeprecationMsg" value:false} {"index":276 name:"HideGroupTabDeprecationMsg" value:false} {"index":222 name:"TouchExternalLinkReminderSuppression" value:false} {"index":224 name:"HideUnifiedSearchGuidedTour" value:true} {"index":226 name:"ShowDevContextMenu" value:true} {"index":227 name:"HideWhatRecommenderForActivityQueues" value:false} {"index":228 name:"HideLiveAgentFirstTimeSetupMsg" value:false} {"index":232 name:"HideGroupAllowsGuestsMsgOnMemberWidget" value:true} {"index":233 name:"HideGroupAllowsGuestsMsg" value:true} {"index":234 name:"HideWhatAreGuestsMsg" value:true} {"index":235 name:"HideNowAllowGuestsMsg" value:true} {"index":236 name:"HideSocialAccountsAndContactsGuidedTour" value:true} {"index":237 name:"HideAnalyticsHomeGuidedTour" value:true} {"index":238 name:"ShowQuickCreateGuidedTour" value:false} {"index":245 name:"HideFilePageGuidedTour" value:true} {"index":250 name:"HideForecastingGuidedTour" value:false} {"index":242 name:"TouchHideOptoutHover" value:false} {"index":251 name:"HideBucketFieldGuide" value:false} {"index":263 name:"HideSmartSearchCallOut" value:true} {"index":265 name:"HideSocialProfilesKloutSplashScreen" value:true} {"index":273 name:"ShowForecastingQuotaAttainment" value:false} {"index":280 name:"HideForecastingQuotaColumn" value:false} {"index":301 name:"HideManyWhoGuidedTour" value:false} {"index":284 name:"HideExternalSharingModelGuidedTour" value:false} {"index":298 name:"HideFileSyncBannerMsg" value:false} {"index":299 name:"HideTestConsoleGuidedTour" value:false} {"index":300 name:"HideNetworkSetupOverlayGettingStarted" value:false} {"index":302 name:"HideManyWhoInlineEditTip" value:false} {"index":303 name:"HideSetupV2WelcomeMessage" value:false}] orgPreferences:[{"index":257 name:"TabOrganizer" value:true}] startOfWeek:"1" isAccessibleMode:false ampm:["AM" PM] renderMode:"RETRO" userId:"005900000015jO6" dateTimeFormat:"M/d/yyyy h:mm a" dateFormat:"M/d/yyyy" uiSkin:"Theme3" language:"en_US" siteUrlPrefix:""});
</script><div class="apexp"><div class="individualPalette"><div class="caseBlock"><div id="j_id0:j_id1" class="bPageBlock brandSecondaryBrd apexDefaultPageBlock secondaryPalette"><div class="pbBody"><table class="list " id="j_id0:j_id1:j_id2" border="0" cellpadding="0" cellspacing="0"><colgroup span="3"></colgroup><thead class="rich-table-thead"><tr class="headerRow "><th class="headerRow " scope="col" colspan="1" id="j_id0:j_id1:j_id2:j_id3header"><div id="j_id0:j_id1:j_id2:j_id3header:sortDiv">Case Number</div></th><th class="headerRow " scope="col" colspan="1" id="j_id0:j_id1:j_id2:j_id4header"><div id="j_id0:j_id1:j_id2:j_id4header:sortDiv">Subject</div></th><th class="headerRow " scope="col" colspan="1" id="j_id0:j_id1:j_id2:j_id5header"><div id="j_id0:j_id1:j_id2:j_id5header:sortDiv">Priority</div></th></tr></thead><tbody id="j_id0:j_id1:j_id2:tb"><tr class="dataRow even first " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:0:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:0:j_id6">00001046</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:0:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:0:j_id7">gmail</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:0:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:0:j_id8">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:1:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:1:j_id9">00001050</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:1:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:1:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:1:j_id10">High</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:2:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:2:j_id11">00001055</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:2:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:2:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:2:j_id12">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:3:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:3:j_id13">00001035</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:3:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:3:j_id14">Valuable case</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:3:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:3:j_id15">High</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:4:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:4:j_id16">00001041</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:4:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:4:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:4:j_id17">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:5:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:5:j_id18">00001029</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:5:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:5:j_id19">Hi</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:5:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:5:j_id20">High</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:6:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:6:j_id21">00001053</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:6:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:6:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:6:j_id22">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:7:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:7:j_id23">00001039</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:7:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:7:j_id24">transform</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:7:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:7:j_id25">High</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:8:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:8:j_id26">00001015</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:8:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:8:j_id27">Frequent mechanical breakdown</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:8:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:8:j_id28">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:9:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:9:j_id29">00001024</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:9:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:9:j_id30">Design issue with mechanical rotor</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:9:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:9:j_id31">Medium</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:10:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:10:j_id32">00001030</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:10:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:10:j_id33">salesteam</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:10:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:10:j_id34">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:11:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:11:j_id35">00001045</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:11:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:11:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:11:j_id36">High</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:12:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:12:j_id37">00001054</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:12:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:12:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:12:j_id38">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:13:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:13:j_id39">00001049</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:13:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:13:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:13:j_id40">High</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:14:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:14:j_id41">00001033</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:14:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:14:j_id42">Newcase</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:14:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:14:j_id43">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:15:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:15:j_id44">00001036</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:15:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:15:j_id45">sales force case</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:15:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:15:j_id46">High</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:16:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:16:j_id47">00001051</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:16:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:16:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:16:j_id48">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:17:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:17:j_id49">00001031</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:17:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:17:j_id50">New case</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:17:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:17:j_id51">Low</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:18:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:18:j_id52">00001032</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:18:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:18:j_id53">(#76287352) Gmail Forwarding Confirmation - Receive Mail from suresh.advanz@gmail.com</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:18:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:18:j_id54">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:19:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:19:j_id55">00001043</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:19:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:19:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:19:j_id56">High</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:20:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:20:j_id57">00001052</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:20:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:20:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:20:j_id58">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:21:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:21:j_id59">00001016</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:21:j_id4" colspan="1"><span id="j_id0:j_id1:j_id2:21:j_id60">installation</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:21:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:21:j_id61">Medium</span></td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:22:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:22:j_id62">00001056</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:22:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:22:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:22:j_id63">High</span></td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:23:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:23:j_id64">00001047</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:23:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:23:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:23:j_id65">High</span></td></tr><tr class="dataRow even last " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell " id="j_id0:j_id1:j_id2:24:j_id3" colspan="1"><span id="j_id0:j_id1:j_id2:24:j_id66">00001044</span></td><td class="dataCell " id="j_id0:j_id1:j_id2:24:j_id4" colspan="1"></td><td class="dataCell " id="j_id0:j_id1:j_id2:24:j_id5" colspan="1"><span id="j_id0:j_id1:j_id2:24:j_id67">High</span></td></tr></tbody></table></div><div class="pbFooter secondaryPalette"><div class="bg"></div></div></div></div></div></div>

 

 

 

 

 

 

Anybody can help?

 

 

Thanks

 

Need code review on this trigger that I'm writing. I have a custom object called site_usage__c and whenever the subdomain_c field is updated, I'll need to propagate that change to the name field in account and contact objects and to the opportunity_name__c field in the opportunity object.  Is there anything wrong with my code?  Thanks!

 

// Trigger on Site_Usage__c object.

// If the subdomain field is updated on Site_Usage__c 

// then update account, lead, contact, opportunity

// to same name.

 

trigger SiteNameUpdate on Site_Usage__c (after update) {

        // Turn DB off.

        CRMfusionDBR101.DB_Globals.triggersDisabled = true;

                System.debug('########## Entering  SiteNameUpdate');    

    List<Site_Usage__c> siteList = new List<Site_Usage__c>();

    Map<double, string> subdomain = new Map<double, string>();

    

    for ( Site_Usage__c site:Trigger.new) {

        Site_Usage__c oldSite = Trigger.oldMap.get(site.ID);

        

        // subdomain was updated

        // Collect all site_id's

        if (site.Subdomain__c != oldSite.Subdomain__c) {

                subdomain.put(site.site_id__c, site.Subdomain__c);

        }

    }

    

    if ( subdomain.size() > 0 ) {

 

        // Get a list of all leads, accounts, contacts and opp's

        // that have the same site_id's

        List<Account> accList = [select ID, name, siteid__c from Account where siteid__c IN :subdomain.keySet()];

        List<Contact> contactList = [select ID, name, site_id__c from Contact where site_id__c IN :subdomain.keySet()];

        List<Opportunity> oppList = [select ID, opportunity_name__c, site_id__c from Opportunity where site_id__c IN :subdomain.keySet()];

        

        // Update the account name with the same ubdomain as the site_usage 

        for (Account acc:accList) {

            if ( subdomain.containsKey(acc.siteid__c) ) {

 

//??

                acc.Subdomain__c = subdomain.get(acc.siteid__c); 

            }

        }

        

        // Update all site names of contact with the same site name as the site_usage subdomain

        for (Contact acc:contactList) {

            if ( subdomain.containsKey(acc.site_id__c) ) {

//?

                acc.Subdomain__c = subdomain.get(acc.site_id__c); 

            }

        }

        

        // Update all matching account names in Opportunity with the same site name as the site_usage subdomain

        for (Opportunity acc:oppList) {

            if ( subdomain.containsKey(acc.site_id__c) ) {

//?

                acc.Subdomain__c = subdomain.get(acc.site_id__c); 

            }

        }

        

        update accList;

        update contactList;

        update oppList;

    } // end of "if flag"

                    System.debug('########## Exiting  SiteNameUpdate');

                            // Turn DB back on.

        CRMfusionDBR101.DB_Globals.triggersDisabled = false;        

}

Does anyone know how to create a checkbox and also text box on the fly in VF on click on button?

 

example page has

 

1 checkbox

checkbox

checkbox

checkbox

 

Button here (when someone clicks button, new checkbox is created)

Button here (this will create textbox)

 

Also these values will be stored under account object so I wonder how it will map to field for on the fly checkbox?

 

Thanks

 

 

 

Can Anybody please explain me how to decide the Object that the trigger should be on, i.e Master or the Detail 

 

What is the logic for that ?

 

Thanks,

Hi All,

 I am facing a problem in assigning the total to wrapperclass property.

 

I have a pageblocktable with displays a pist of product with price. The quantity is entered. The total amount is calculated by calling a method in controller. But I am not bale to assign the total to that perticular row so that I am not able to display proper total on the pageblocktable.

 

please tell how to associate the total to wrapper class ..

 

Apex:

 

public class pricefromproduct

{

// where name like '%searchkey%'    select Id from product2 where name like '%searchkey%'

public pricefromproduct()

{

 

}

public integer total{get;set;}

public string searchkey {get;set;}

public list<pricewrapper> prwrp {get;set;} {prwrp = new list<pricewrapper>();}

// public list<productlist> prod{get;set;} {prod = new list<productlist>();}

public pagereference priceproduct()

{

 list<product2> prod = [select id from product2 where name like :'%'+searchkey+'%'];

 system.debug('prod size' + prod.size());

// prolist = [select id,name from product__c where name like : '%'+searchkey+'%'];

 

list<pricebookentry> pricebk = [Select Id, Name, ProductCode, Pricebook2Id, UnitPrice From PricebookEntry where Product2Id in :prod and usestandardprice = false and isactive = true];

  /*  best way to remove duplicates from list

  list<string> pr = new list<string>{'james','smith','james'};

  set<string> myset = new Set<string>();

List<string> result = new List<string>();

myset.addAll(pr);

result.addAll(myset);

system.debug(' pr size before filter ' + pr.size() + '   after ' + result.size());

*/

system.debug('pricebook size' + pricebk.size());

for (pricebookentry pb : pricebk)

{

pricewrapper p = new pricewrapper();

p.prc = pb;

p.prodprice = integer.valueof(pb.unitprice);

p.prodname = pb.name;

 

prwrp.add(p);

}

return null;

}

 

public integer f{get;set;}

public integer q{get;set;}

public pagereference totalcount()

{

f = integer.valueof(Apexpages.currentPage().getParameters().get('f'));

q = integer.valueof(Apexpages.currentPage().getParameters().get('q'));

total = f * q;

system.debug(' total ' + total);

 

 

return null;

}

 

 

 

public class pricewrapper

{

public pricebookentry prc{get;set;}

public integer prodprice{get;set;}

public string prodname{get;set;}

public boolean issel {get;set;}

public integer quantity{get;set;}

public integer totalamount{get;}

     

  public pricewrapper()

{

 

}

}

 

}