• kranjan
  • NEWBIE
  • 210 Points
  • Member since 2012

  • Chatter
    Feed
  • 8
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 66
    Replies
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 ?

 

 

 

 

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

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()

{

 

}

}

 

}