• Ashish Agrawal 4
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 7
    Replies
Hi developers,
Need help i am stuck with how to get total expenses with aggregateresults as of now i done with the aggregateresults value but not able to store in custom field  i.e total_expenses__c

mycode is:
trigger total_expenses on DailyExpense__c (before insert,after insert)
{
Integer totalexpense;

DailyExpense__c de  = new DailyExpense__c();
list<AggregateResult> ar = new list<AggregateResult>();


if(trigger.Isbefore)
{
   for(DailyExpense__c de1 :trigger.new)
   {
    de1.Total_Monthly_income__c =25000;
   }
}
  ar = [select sum(Amount__c)amt from DailyExpense__C Group by CALENDAR_MONTH(Dates__c)];

for( AggregateResult obj:ar)
{

   totalexpense = Integer.valueOf(obj.get('amt'));
   de.Total_expenses__c = totalexpense;
 
}
  // update de;
}

Regrads,
ashish
How to reduce the gap between two images in page

need to reduced the gap between two images and need to show the images parallely.

Thanks & Regards,
Ashish Agrawal
Hello Developers,

Developement about display conditional images on apex:image(display only one images if condition are true).

i have tried using apex:image components and error comes:

Error: using value attribute in apex: image both condition(true or false) broken images(no  images) are display.

And, using rendered attribute in apex: image no images are display.

so how to overcome this. need to display a images(logo) based on if condition.

<apex:page standardController="Account" >
<apex:form >
<apex:pageBlock title="Conditional image page">
<apex:pageBlockSection title="Image Section">
<apex:image value="{if(account.Rating =='Hot',$Resource.image1,'')}" width="100" height="100"/>

</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>

</apex:page>

Thanks& Regards
Ashish Agrawal
Hi developers,
Need help i am stuck with how to get total expenses with aggregateresults as of now i done with the aggregateresults value but not able to store in custom field  i.e total_expenses__c

mycode is:
trigger total_expenses on DailyExpense__c (before insert,after insert)
{
Integer totalexpense;

DailyExpense__c de  = new DailyExpense__c();
list<AggregateResult> ar = new list<AggregateResult>();


if(trigger.Isbefore)
{
   for(DailyExpense__c de1 :trigger.new)
   {
    de1.Total_Monthly_income__c =25000;
   }
}
  ar = [select sum(Amount__c)amt from DailyExpense__C Group by CALENDAR_MONTH(Dates__c)];

for( AggregateResult obj:ar)
{

   totalexpense = Integer.valueOf(obj.get('amt'));
   de.Total_expenses__c = totalexpense;
 
}
  // update de;
}

Regrads,
ashish
How to reduce the gap between two images in page

need to reduced the gap between two images and need to show the images parallely.

Thanks & Regards,
Ashish Agrawal
Hello Developers,

Developement about display conditional images on apex:image(display only one images if condition are true).

i have tried using apex:image components and error comes:

Error: using value attribute in apex: image both condition(true or false) broken images(no  images) are display.

And, using rendered attribute in apex: image no images are display.

so how to overcome this. need to display a images(logo) based on if condition.

<apex:page standardController="Account" >
<apex:form >
<apex:pageBlock title="Conditional image page">
<apex:pageBlockSection title="Image Section">
<apex:image value="{if(account.Rating =='Hot',$Resource.image1,'')}" width="100" height="100"/>

</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>

</apex:page>

Thanks& Regards
Ashish Agrawal
Hi,

I updated 300k records using dataloader bulk API. It couldn't retreive me success and error files in the csv file. From the Bulk Data Load job monitring section, I came to know that there were 1000 errors. How can I download these 1000 errros in a csv file?



Please help!
  • June 24, 2014
  • Like
  • 0