• Algypug
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 3
    Replies

My problem: Image is not being displayed in the VisualForce component. I have created a VF Component to send emails. In the body of the email, my company logo should be displayed. This logo is stored in Static Resources. I have saved 5 copies of this logo and all in different formats. The format of the image is .jpeg, .jpg, .gif, .png and also in zipped format.

 

This image is getting displayed in VF Page but not in VF Component.

 

I feel like the image is not being parsed when I use the image in a visualforce component to send an email with the image in it

 

Given below is the code for getting the image displayed:

 

<div align = "right">

<apex:image url="{!$Resource.imagename"}/>

</div>

 

I have used <img > tag and other <apex:image> tag format and image formats like: .jpeg, .jpg, .gif and .png

But nothing worked.

 

Can anyone help?

I am reposting an earlier message that didn't get answered.  Please help!

 

I am trying to put a custom field in the subject line of a Visualforce email template.

 

http://boards.developerforce.com/t5/Visualforce-Development/Procedure-to-change-Subject-field-in-visualforce-email-template/td-p/448793

Hi..,

 

 

 

I have a problem in writing test class.

Actually i wrote a trigger , to calculate roll up summary in lookup relationships.I achieved that one.

BOM__c is parent object and QuoteLineItem is child object.

 

While writing test class , we need to create quote line item record for testing.

Quotelineitem is linked with PriceBOOkEntry object and Product Object.

So its giving errors while  testing like some values are missing.

I am posting my trigger and test class.

Can we create pricebookentry and product records manually....?

Can anyone help me plz.....?

 

Trigger :

-------------------------------------------

 

trigger RollUpTotalBasicPriceOnBOM on QuoteLineItem (after delete, after insert, after update) {

       Set<id> bomids = new Set<id>();
       decimal total;
     List<BOM__c> BOMtoUpdate = new List<BOM__c>();
       List<QuoteLineItem> quoteitem = new List<QuoteLineItem>();
      if(!trigger.isDelete){
        for (QuoteLineItem item : Trigger.new)
                  bomIds.add(item.BOM__c);
     }
    if (Trigger.isDelete) {
               for (QuoteLineItem item : Trigger.old)
                    bomids.add(item.BOM__c);
      }
     
      for(AggregateResult aggr : [select BOM__c bomId,sum(Basic_Price__c) bomTotal from QuoteLineItem where BOM__c in:bomids group by BOM__C ]){
        BOMToUpdate.add(new BOM__c(id = String.valueOf(aggr.get('bomId')),Total_Basic_Price__c = Integer.valueOf(aggr.get('bomTotal'))) );
      }
      update BOMToUpdate;
      System.debug('BOMToUpdate:'+BOMToUpdate);
}   

 

Test class ;-

 


@isTest
private class Test_RollUpTotalBasicPriceOnBOM {

    static testMethod void myUnitTest() {
        // TO DO: implement unit test
      Account acc = new Account(Name = 'testing',Credit_age__c = 100.00 ,VAT_Number__c = '1243',Credit_Period_Days__c = 20 , Credit_Terms__c = 'Open',ECC_No__c = 'ABC 1234',CurrencyIsoCode = 'INR',State__c = 'Andhra Pradesh',Customer_Category__c = 'Systems Integrator',Source__c = 'Cold Call',Source_Detail__c ='nothing',Type__c = 'Customer',Sector__c ='Iron & Steel',Product_Type__c ='Standard',Competition__c = 'Glastronix',Annualised_Quantity_Per_Month__c = 2000.00,Temperature__c = 'Warm',Address_Line_1__c = 'Hindupur',City__c = 'Bangalore',Pin_Code__c = '515201',Region__c = 'North');
      insert acc;  
      Opportunity  o = new Opportunity( name = 'opportunity',CloseDate = System.today()+10,StageName = 'Approach',ForecastCategoryName = 'Pipeline',AccountId = acc.id);
      insert o;
      Quote q = new Quote(BillingName = 'sample',Validity__c = 'After 20 days',Status = 'Accepted',Quotation_Type__c = 'Per Product',Packing__c = 1000.0,OpportunityId = o.id,Name = 'quote', Freight__c = 'To Pay - Customer to Pay Transporter',Excise_Duty__c = 12.0 , Education_Cess_on_ED__c = 2.0,Discount__c = 10.0,Cess_Sec_Higher_on_ED__c = 1.0 );
      insert q;
      Pricebook2 p = new Pricebook2 (Description = 'Sampleone' , Name  = 'Sample' );
      insert p;
      Product2  pro = new Product2 (Account__c = acc.id , Family = 'Scrap' , Name = 'Steel' , Colour__c = 'RAL 7035 - Light Grey' , Finish__c = 'Structured' , Approx_Weight_Kg__c = 8780);
      insert pro;
      //PricebookEntry price  = new PricebookEntry (UseStandardPrice = false, CurrencyIsoCode = 'INR' , Pricebook2Id = p.id , Product2Id  = pro.id , UnitPrice  = 100 ) ;
      //insert price;
      Employee_Info__c e = new Employee_Info__c(Type__c = 'Staff' , Status__c = 'Trainee' , Name = 'Mahesh' , Date_of_Joining__c = System.today() , Date_of_Birth__c = System.today() - 30 , Fucntional_Area__c = 'Developer' );
      insert e;
      BOM__c b = new BOM__c (BOM_Status__c = 'Pending' , Designer__c = e.id , Product__c = pro.id , Product_Quantity__c = 100);
      insert b;
      QuoteLineItem quote = new QuoteLineItem  (BOM__c = b.id , Rate_Kg__c = 10,Rate_Basis__c = 'Per Kg' , QuoteId = q.id , Quantity = 20 , unitprice = 20);
      insert quote;    
         }
}

 

I currently have a Visualforce email template for sending details relating to a particular account with a custom button.
In the standard email templates, it is possible to include fields in the subject line of the email.  
This allows you to write, for example, New Account: [ACCOUNT NAME] in the subject line of the email.
However, I am not able to find this functionality in the Visualforce email template.
I am sure this must be possible - please help!!!  I am sure this must be extremely simple, but I am not able to find it..

I am able to do this in a VisualForce page, but can't work out the method for doing this in an email template.

 

I want to have alternate rows highlighted in grey / white.  And the last row should have bolded text.

 

It works fine on a regular VF page, but I can't get this functionality in an email template.  Please help!!

 

 

My problem: Image is not being displayed in the VisualForce component. I have created a VF Component to send emails. In the body of the email, my company logo should be displayed. This logo is stored in Static Resources. I have saved 5 copies of this logo and all in different formats. The format of the image is .jpeg, .jpg, .gif, .png and also in zipped format.

 

This image is getting displayed in VF Page but not in VF Component.

 

I feel like the image is not being parsed when I use the image in a visualforce component to send an email with the image in it

 

Given below is the code for getting the image displayed:

 

<div align = "right">

<apex:image url="{!$Resource.imagename"}/>

</div>

 

I have used <img > tag and other <apex:image> tag format and image formats like: .jpeg, .jpg, .gif and .png

But nothing worked.

 

Can anyone help?

Hi..,

 

 

I created one visual force page.

In that visualforce page i inserted one image with the help of <apex:image> tag.

I created image in static resourcses and from where i am extracting image into visualforce Page.

But its not displaying anything.

Can you help me that why i am not getting image..?

Did i need to change any settings in Salesforce setup for displaying images in visualforce pages...?

 

My visualforce page code :

 

<apex:page>
<apex:form >
<div align = "right"> <apex:image url="{!$Resource.CompanyLogo}"/> </div>
</apex:form>
</apex:page>

Hi..,

 

 

 

I want to changeone  field type in production in an object.

But its referred in apex class , which is deployed into production.

And that field is a required field and also this field is referred in Other formula fields.

So How can i deactivate that apex class or delete that one to change field type.....?

Can anyone help me plz.....?