• Richie D
  • SMARTIE
  • 950 Points
  • Member since 2008

  • Chatter
    Feed
  • 33
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 26
    Questions
  • 184
    Replies

Hi All,

 

I have seen packages that have added a 'component' to the sidebar although it does not appear in the homepage components list or have the standard 'custom compnent styling' applied (title bar + html content below). How is this done? 

 

If there is documentation ot there I just need the links - can't seem to find any any where...

 

Thanks!

Rich.

 

 

Hi,

 

I have a problem with the following line in a beta package:-

 

List<CollaborationGroup> groups = [select id, name, description from collaborationGroup where name=:name];

giving the error:

 

System.QueryException: sObject type 'CollaborationGroup' is not supported

 

This works in the development org and other orgs where installed so am at a loss to explain, and therefore fix, this issue. If collaborationGroup wasn't available then I'd have thought the package wouldn't have installed??

 

Thanks for any help on this one.

 

Regards,

Rich.

So I've got a trigger that changes the contact owner to the account owner anytime a new contact is created.  I am trying to test it but am getting only 80%. I can't figure out how to get it to tell that the change actually happened.  I tried adding a system assert message but can't figure out the verbage that it is looking for.  If you could take a look and help me out that would be great.  The two lines that aren't being covered in my trigger are:

mapAccountToOwner.put(a.Id, a.OwnerId);

and

c.OwnerID = mapAccountToOwner.get(c.AccountId);

and here's the test class I have so far:

@IsTest
private class AccountContactOwner
{
    private static TestMethod void testTrigger(){
        
        //Step 1 : Data Insertion
        Account a=new Account(Name='Test Account');
           insert a;
           Contact c = new Contact(FirstName='John',LastName='Doe');
        insert c;
        
        
        test.startTest();
        
        
        //Perform the dml action on which trigger gets fired , like insert, update ,delete , undelete, in your case you have to update account record that you created in above  
        //create test user
            Profile p = [SELECT Id FROM Profile WHERE Name='Standard User'];
      User u1 = new User(Alias = 'standa', Email='saplingstandarduser@testorg.com',
      EmailEncodingKey='UTF-8', LastName='Testing', LanguageLocaleKey='en_US',
      LocaleSidKey='en_US', ProfileId = p.Id,
      TimeZoneSidKey='America/Los_Angeles', UserName='saplingstandarduser@testorg.com');


      System.runAs(u1) {
      // The following code runs as user 'u'  
       // create test contact
        Contact c1 = new Contact(FirstName='Jane',LastName='Doe');
        insert c1;
        
        //assert your results using system.assert and system.asserEquals
        
        system.assert(c.OwnerID = a.OwnerID);
        
        
        
        test.stopTest();
    }
}
}

Hi,

 

I'm trying to set a "default" value to a lookup field called Carrier on Opportunity Product.

My Opportunity Product also have a text field called Default Carrier.

Every product have a default carrier, so i  want to set a default value for my lookup field.( the salesman can choose an other Carrier if they want).

 

I know that we can't use the workflow to populate the lookup field so i tried the trigger below:

 

trigger SetCarrier on Account (before insert) {
    for(OpportunityLineItem op : Trigger.new){
       op.Carrier__c = [Select Carrier__c.Id from Carrier__c Where Carrier__c.Name = :op.Default_carrier__c];
    }
}

 i got this error message:

 

Save error: Illegal assignment from LIST<Carrier__c> to Id

 

But in every case i'll not have a list =/.

 

 

Not sure if this is proper etiquette in the forums, but I have a continuation on a previous problem that I think should be a quick fix.  I replied to my past post, but it didnt get bumped to the top, so I'm making a new posting.  Any help in explaining would be great.

 

I am trying to do the same as here (http://boards.developerforce.com/t5/Apex-Code-Development/Stuck-writing-a-basic-trigger-to-update-ownership-of-a-record/m-p/493187), except to have any tasks (autocreated via workflow on a new case) also reassigned.  I am getting a "Save error: Invalid foreign key relationship: Task.WhatId" error on line 9.  Is this because of a similar problem that sfdcfox described in #2 above, whereas the value doesn't exist yet in a trigger?  If so, how do I get the value populated so that I can reference against it?  Or does the "WhatId" field work differently than a regular reference field?

 

Thanks so much!!  And also, for next time, should this be a new thread or is there a way to bump an existing thread to the top of the forum?  Do I need to uncheck the "Solution" that I had marked?

 

public with sharing class TaskClass {

	public static void updateTaskOwner (List<Task> tasks) {
	
    	  // map of opportunities
 			map<id,opportunity> opps = new map<id,opportunity>();
  			// obtain opportunity ids
  			for(Task t:tasks) {
    			opps.put(t.WhatId.opportunity__c,null);
  			}
  			// don't include null id
  			opps.remove(null);
  			// query all opps and place in map
  			opps.putAll([select id,impuser__c from opportunity where id in :opps.keyset()]);
  			// assign owner for each non-null value
  			for(Task t:tasks) {
    			if(opps.containskey(t.WhatId.opportunity__c) && opps.get(t.WhatId.opportunity__c).impuser__c != null) {
      				t.ownerid = opps.get(t.WhatId.opportunity__c).impuser__c;
    			}
  			}
	}
}

 

I have looked at most examples that fall into the Insufficient Privileges category and I have found none that is identical to my situation.

 

What I did is overide the standard contact page (View) with my custom visualforce page.  I can allow who see's this page and this is not my problem.

 

Is their a way that I can load the normal Contact View  to uses who do not have permission ?  Instead I always get the error.

 

Insufficient Privileges
You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.

I have a custom object with a trigger that was created before my time - I am just learning triggers.  I have pasted my code below.  My Users are getting the error when saving "Error:Apex trigger chassis_notification caused an unexpected exception, contact your administrator: chassis_notification: execution of BeforeUpdate caused by: System.EmailException: SendEmail failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Missing target address (target, to, cc, bcc): []: Trigger.chassis_notification: line 149, column 1"

 

 

trigger chassis_notification on Warranty__c (before update) 
{
  for(Warranty__c w : Trigger.new) 
  {
     // If this is a Chassis, send email to notify accounting
     if(w.Chassis_Unit__c == True && 
        w.Warranty_Status__c == 'Approved' && 
        w.ChassisNotificationSent__c != True &&
        w.Replace_with_vRecovery__c == False
        )
     {
        Account company = [select Id, Name from Account where Id = :w.Account_Name__c];
        Contact contact = [select Id, Name from Contact where Id = :w.Contact_Name__c];
        User caseOwner = [select Id, Email from User where Id = :w.OwnerId];
        Asset asset = [select Id, name from Asset where Id = :w.Asset_Tag__c];
        Case myCase = [select Id, CaseNumber from Case where Id = :w.Associated_Case__c];
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        String[] toAddresses;
        mail.setReplyTo('support@unitrends.com');
        mail.setSenderDisplayName('Unitrends Support');
        if(w.Is_GE__c == True)
        {
            toAddresses = new String[] {'dcrosby@unitrends.com', 
                                        'briant@unitrends.com',
                                        'luke@unitrends.com',
                                        'twallick@unitrends.com', 
                                        'dsapp@unitrends.com',
                                        'geisenhower@unitrends.com', 
                                         caseOwner.Email, 
                                        'dmccraw@unitrends.com',
                                        'jrast@unitrends.com',
                                        'accounting@unitrends.com'
                                        };
            mail.setSubject('GE Customer: A New Warranty Request has been Approved & Includes a Chassis or Unit Replacement');
            mail.setPlainTextBody
                        ('This customer warranty to be fulfilled by RAVE.' + '\n\n\n' +
                         'The following Warranty Request has been approved and may require' + '\n' +
                         'your attention as it includes a chassis or unit replacement:'+ '\n\n' +
                         'Company:\t\t\t' + company.Name + '\n' +
                         'Contact\t\t\t' + contact.Name + '\n' +                         
                         'Asset Tag:\t\t\t' + asset.Name + '\n' +
                         'Associated Case:\t\t' + myCase.CaseNumber + '\n' +
                         'Warranty Shipment Number:\t' + w.Name + '\n\n' +
                         'Click on the link to access the Warranty:\n' + 'https://na2.salesforce.com/' + w.Id
                        );
        }
        else if(w.Platinum_Support__c == True)
        {
            if(w.Manufacturer__c == 'Rave') {
                toAddresses = new String[] {'dcrosby@unitrends.com', 
                                            'briant@unitrends.com',
                                            'luke@unitrends.com',
                                            'unitrendsccd@chipcocomputer.com', 
                                            'twallick@unitrends.com', 
                                            'dsapp@unitrends.com',
                                            'geisenhower@unitrends.com', 
                                             caseOwner.Email, 
                                            'dmccraw@unitrends.com',
                                            'jrast@unitrends.com',
                                            'accounting@unitrends.com'
                                            };
            }
            else if(w.Manufacturer__c == 'CHIPCO') {
                toAddresses = new String[] {'dcrosby@unitrends.com', 
                                            'briant@unitrends.com',
                                            'luke@unitrends.com',
                                            'unitrendsccd@chipcocomputer.com', 
                                            'twallick@unitrends.com', 
                                            'dsapp@unitrends.com',
                                            'geisenhower@unitrends.com', 
                                             caseOwner.Email, 
                                            'dmccraw@unitrends.com',
                                            'jrast@unitrends.com',
                                            'accounting@unitrends.com'
                                            };
            }
            else if(w.Manufacturer__c == 'MBX') {
                toAddresses = new String[] {'dcrosby@unitrends.com', 
                                            'briant@unitrends.com',
                                            'luke@unitrends.com',
                                            'support@mbx.com', 
                                            'twallick@unitrends.com', 
                                            'dsapp@unitrends.com',
                                            'geisenhower@unitrends.com', 
                                             caseOwner.Email, 
                                            'dmccraw@unitrends.com',
                                            'jrast@unitrends.com',
                                            'accounting@unitrends.com'
                                            };
        
            }
            mail.setSubject('Platinum Customer: A New Warranty Request has been Approved & Includes a Chassis or Unit Replacement');
            mail.setPlainTextBody
                        ('This customer has platinum support and requires next day shipping!!!' + '\n\n\n' +
                         'The following Warranty Request has been approved and may require' + '\n' +
                         'your attention as it includes a chassis or unit replacement:'+ '\n\n' +
                         'Company:\t\t\t' + company.Name + '\n' +
                         'Contact\t\t\t' + contact.Name + '\n' +                         
                         'Asset Tag:\t\t\t' + asset.Name + '\n' +
                         'Associated Case:\t\t' + myCase.CaseNumber + '\n' +
                         'Warranty Shipment Number:\t' + w.Name + '\n\n' +
                         'Click on the link to access the Warranty:\n' + 'https://na2.salesforce.com/' + w.Id
                        );
        }
        else
        {
            if(w.Manufacturer__c == 'CHIPCO') {
                toAddresses = new String[] {'dcrosby@unitrends.com', 
                                            'briant@unitrends.com',
                                            'luke@unitrends.com',
                                            'unitrendsccd@chipcocomputer.com', 
                                            'twallick@unitrends.com', 
                                            'dsapp@unitrends.com',
                                            'geisenhower@unitrends.com', 
                                             caseOwner.Email, 
                                            'dmccraw@unitrends.com',
                                            'jrast@unitrends.com',
                                            'accounting@unitrends.com'
                                            };
            }
            else if(w.Manufacturer__c == 'MBX') {
                toAddresses = new String[] {'dcrosby@unitrends.com', 
                                            'briant@unitrends.com',
                                            'luke@unitrends.com',
                                            'support@mbx.com', 
                                            'twallick@unitrends.com', 
                                            'dsapp@unitrends.com',
                                            'geisenhower@unitrends.com', 
                                             caseOwner.Email, 
                                            'dmccraw@unitrends.com',
                                            'jrast@unitrends.com',
                                            'accounting@unitrends.com'
                                            };
        
            }
            mail.setSubject('A New Warranty Request has been Approved & Includes a Chassis or Unit Replacement');
            mail.setPlainTextBody
                        ('The following Warranty Request has been approved and may require' + '\n' +
                         'your attention as it includes a chassis or unit replacement:'+ '\n\n' +
                         'Company:\t\t\t' + company.Name + '\n' +
                         'Contact\t\t\t' + contact.Name + '\n' +                         
                         'Asset Tag:\t\t\t' + asset.Name + '\n' +
                         'Associated Case:\t\t' + myCase.CaseNumber + '\n' +
                         'Warranty Shipment Number:\t' + w.Name + '\n\n' +
                         'Click on the link to access the Warranty:\n' + 'https://na2.salesforce.com/' + w.Id
                        );
        }
        mail.setToAddresses(toAddresses);
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
        w.ChassisNotificationSent__c = True;
     }
  }
}

 

 

 

Hi guys.

 

I have batch calss name:Del_leads

and a Schedule Class bulkdelleads.

 

When i am writing test method for batch class it is not covering the execute method i am calling this execute from schedule class.Can any body help to figure out the problem.

 

Batch Class:-

=====================

global class Del_leads implements Database.Batchable<sobject>
{

public String query;
public date d=System.today();
public integer i=7;
Public Date z=d-i;
Public String s;
public integer j;
Public string k='Name'+','+'Company'+','+'phone'+','+'Email';

global Database.QueryLocator start(Database.BatchableContext BC){
system.debug(query);
return Database.getQueryLocator(query);

}

global void execute(Database.BatchableContext BC,List<Lead> Lds){
for( j=0;j<lds.size();j++){
if(j==0){
s +=k+'\n'+ lds[j].Name+','+lds[j].Company+','+lds[j].phone+','+lds[j].Email;
} else{
s +=+'\n'+ lds[j].Name+','+lds[j].Company+','+lds[j].phone+','+lds[j].Email;
}
}

Blob b=Blob.valueOf(s);
Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();
efa.setFileName('attachment.csv');
efa.setBody(b);

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
mail.setToAddresses(new String[] {'franktoanil@gmail.com'});
mail.setSenderDisplayName('Batch Processing');
mail.setSubject('Batch Process Completed');
mail.setPlainTextBody('Please find the attachment of deleted records');
mail.setFileAttachments(new Messaging.EmailFileAttachment[] {efa});
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
delete Lds;
}

global void finish(Database.BatchableContext BC){
System.debug(LoggingLevel.WARN,'Deleting Leads Finished');
}

=====================================================
/*-----------------Test Method-----------------Only 47 % test coverage*/

=====================================================
public static testMethod void Del_leads (){
List <Lead> lds = new List<Lead>();
for(integer i = 0; i<200; i++){
Lead l = new Lead(LastName='Anil',Company='ef');
lds.add(l);
}
insert lds;

test.startTest();
Del_leads dl = new Del_Leads();
dl.query='select id,Name,Company,Phone,Email from lead where createddate<=:z and date_opened__c=null ';
ID batchprocessid = Database.executeBatch(dl);
test.stoptest();
System.AssertEquals(
database.countquery('SELECT COUNT()'+' FROM Lead '),200);
}
}

============================

Schedule Class

============================

global class bulkdelleads Implements Schedulable{
public static String CRON_EXP = '0 0 0 3 9 ? 2022';
global void Execute(SchedulableContext SC){

Del_leads ld=new Del_leads();
ld.query='select id,Name,Company,Phone,Email from lead where createddate<=:z and date_opened__c=null ';
database.executebatch(ld);

}

==================================

/*----------Test Method------------------ 100% test Coverage-*/

==================================
static testmethod void bulkdelleads () {
Test.startTest();

Lead l = new Lead ();
l.LastName = 'Raghu ';
l.company='eg';
insert l;

// Schedule the test job

String jobId = System.schedule('bulkdelleads ',bulkdelleads.CRON_EXP,new bulkdelleads ());
// Get the information from the CronTrigger API object

CronTrigger ct = [SELECT Id, CronExpression, TimesTriggered,
NextFireTime
FROM CronTrigger WHERE id = :jobId];

// Verify the expressions are the same

System.assertEquals(bulkdelleads.CRON_EXP,ct.CronExpression);

// Verify the job has not run

System.assertEquals(0, ct.TimesTriggered);

// Verify the next time the job will run

System.assertEquals('2022-09-03 00:00:00',
String.valueOf(ct.NextFireTime));

Test.stopTest(); 

}

}

 

Thanks

Anil.B

 

I've got a trigger on account object that populates a field that counts and sums up the number of related accounts to the account being updated/inserted/deleted.  Pretty straightforward.

 

This trigger works but I need to know whether it would be considered bulkified.  If it's not, any suggestions on what ought to be changed to bulkify it would be much appreciated.

 

Here it is:

 

trigger Account on Account (before insert, after insert, before update, after update) { 



// ---------------------------------------------------------------
 // Active Managed & Unmanaged Paying Customers processing
 // ------------------------------------------------------------------

    if ((Trigger.isInsert || Trigger.isUpdate || Trigger.isDelete) && Trigger.isAfter) {    

         set<Id> AccountIds = new set<Id>();
 
             if(trigger.isInsert || trigger.isUpdate){
                 for(Account p : trigger.new){
                     AccountIds.add(p.Referring_Partner__c);
                 }
              }
 
             if(trigger.isDelete){
                for(Account  p : trigger.old){
                    AccountIds.add(p.Referring_Partner__c);
                 }
              }
 
          map<Id,Double> AccountMap1 = new map <Id,Double>();
 
              for(AggregateResult q : [select Referring_Partner__c,sum(Referring_Partner_Count__c)
                  from Account 
                  where Active_Products__c != null AND Managed_by_Partner__c !=null AND Referring_Partner__c IN :AccountIds 
                  group by Referring_Partner__c]){
                  
                  AccountMap1.put((Id)q.get('Referring_Partner__c'),(Double)q.get('expr0'));
               }
  
           map<Id,Double> AccountMap2 = new map <Id,Double>();
 
               for(AggregateResult q : [select Referring_Partner__c,sum(Referring_Partner_Count__c)
                   from Account where Active_Products__c != null AND Managed_by_Partner__c = false AND Referring_Partner__c IN :AccountIds 
                   group by Referring_Partner__c]){
          
                   AccountMap2.put((Id)q.get('Referring_Partner__c'),(Double)q.get('expr0'));
               }
 
           List <Account> AccountsToUpdate = new List<Account>();
 
               for(Account a : [Select Id, Active_Paying_M__c from Account where Id IN :AccountIds]){
   
                   Double Sum1 = AccountMap1.get(a.Id);
                   a.Active_Paying_M__c = Sum1 ;
                   Double Sum2 = AccountMap2.get(a.Id);
                   a.Active_Paying_U__c = Sum2;    
    
                   AccountsToUpdate.add(a);
                }
 
           
           update AccountsToUpdate ;
  
    }

}

 

Hi,

 

We have an application we have built on our platform for managing our training business.  We use one object to produce a certificate for delegates after the course.  The certificate displays a signature and sometimes a logo dependant on the course.  We store these images in "Documents" which we make externally avaiblable and use the <apex:image> componenet to display.  This was working fine up until today.  Today for some reason none of the images will display in the pdfs.  I cannot see any changes to the code or the links we have been using - was there any changes made to the Salesforce platform last night which could effect this?  Has anyone else seen this issue?

 

The line of code we use is:

 

<apex:image height="1.3cm" url="https://eu1.salesforce.com/servlet/servlet.ImageServer?id=015D0000001Fs3o&oid=00D200000000Evl" />

 

https://eu1.salesforce.com/servlet/servlet.ImageServer?id=015D0000001Fs3o&oid=00D200000000Evl

 

I would approach support but I've be told in the past that with our service level they do not support VF.

 

Many Thanks.

Julie

 

Hi all 

 

i am getting the above strange error ("System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out") on one custom button click in salesforce.what i did is just fetch the value  and then pass paramters to url in http get as shown below:

 

   public PageReference Clone() 
  {
    Test_Flight_Request__c clFR = new Test_Flight_Request__c(); 
    Test_Flight_Request__c oldFR = [SELECT From__c, To__c,Outbound_del__c,Pax_del__c,Region_del__c,    
        Inbound_del__c,Outbound_Flexibility__c,Inbound_Flexibility__c,Opportunity__c,
        Budget__c,Flight_Request_Type__c,Publish_Fare__c,Searcher__c,Notes__c,Email_To__c,Email_Content__c,
        Subject__c,Status__c,Miles__c,Internal_Flight__c,Approx_Tax__c,Searcher_Notes__c,Field1__c
       FROM Test_Flight_Request__c WHERE Id = :fr.Id];

    clFR.From__c = oldFR.From__c;
    clFR.To__c = oldFR.To__c;
    clFR.Outbound_del__c = oldFR.Outbound_del__c;
    clFR.Pax_del__c = oldFR.Pax_del__c;
    clFR.Region_del__c = oldFR.Region_del__c;
    clFR.Inbound_del__c = oldFR.Inbound_del__c;
    clFR.Outbound_Flexibility__c = oldFR.Outbound_Flexibility__c;
    clFR.Inbound_Flexibility__c = oldFR.Inbound_Flexibility__c;
    clFR.Opportunity__c = oldFR.Opportunity__c;
    clFR.Budget__c = oldFR.Budget__c;
    clFR.Publish_Fare__c = oldFR.Publish_Fare__c;
    clFR.Flight_Request_Type__c = oldFR.Flight_Request_Type__c;
    clFR.Notes__c = oldFR.Notes__c;
    
    clFR.Searcher__c = oldFR.Searcher__c;
    
    clFR.Email_To__c = oldFR.Email_To__c;      
    clFR.Email_Content__c = oldFR.Email_Content__c;
    clFR.Subject__c = oldFR.Subject__c;
    
    clFR.Status__c = oldFR.Status__c;
    clFR.Miles__c = oldFR.Miles__c;
    clFR.Internal_Flight__c = oldFR.Internal_Flight__c;
    clFR.Approx_Tax__c = oldFR.Approx_Tax__c;
    clFR.Searcher_Notes__c = oldFR.Searcher_Notes__c;
    clFR.Field1__c = oldFR.Field1__c;
    insert clFR;
    System.debug('Old FRId:'+oldFR.Id);
       System.debug('New FRId:'+clFR.Id);
       
    Http http = new Http();
       HttpRequest httpreq = new HttpRequest();
       httpreq.setEndpoint('http://abcs.com');
   
      httpreq.setMethod('GET');
      httpreq.setTimeout(60000);
      String responseBody='';
      if (!Test.isRunningTest())
      { 
      HttpResponse  httpres =  http.send(httpreq);
    
      }
      else
      {
       responseBody = '200,4,48.5,-123.67';
      }
      
        PageReference pr = new PageReference('/'+  Id);
        pr.setRedirect(true);
        return pr;
  }
  
 
Pleas help me.
 

Hi,

 

       

          I am trying to import data through CSV from visualforce page. Its working well. But when CSV file contains Iine breaks in one Field then  i can't able to handle it. Getting error as System.ListException: List index out of bounds: 6 

 

 

 

Even Iam getting Problem with comma in any of the field

 

 

Please can one help me on this

 

 

Thanks

Hi All,

 

I have written a bulkified trigger and a test class for the same with 100% test coverage in sandbox. When I try to move it to Production, I get this error.

 

TestBC_AverageAmountNew.ideaBatchTest()Class291Failure Message: "System.LimitException: Too many SOQL queries: 101", Failure Stack Trace: "Trigger.BookingQuota: line 29, column 1"

 

The above class "TestBC_AverageAmountNew" has been written for a batch class. I am unable to move trigger from sandbox to production.

 

How can I rectify the problem? Please help.


 

Thanks,

Alok

I need some direction.  I currently have two lists - one called upgrades and the other called serial number / upgrades.  What I want my code to do is compare the values in the upgrades list with the values in the serial number / upgrades list.  If a value on the upgrades list is found on the serial number / upgrades list then don't do anything.   However, if a value on the upgrades list is NOT found on the serial number / upgrades list, then add that value to the serial number / upgrades list.  Both lists are variable in size, meaning that they could have 1 value or as many as 40 values.  How can I achieve this, with apex code preferably inside of a trigger? 

 

UPGRADES                                                          SN/UPGRADES

UG-001   <-----compare This     To all of these ---->   UG-004

                                                                                   UG-001 This value found, don't add it again.

UG-002 <-- This value            is not found here -->     ----       So add it to SN/UPGRADE list. 

UG-003 <-- This value            is not found here -->     ----        So add it to SN/UPGRADE list.

 

 

Any help would be appreciated.

 

 

accountname = [select id,name,[select id, firstname from contact] from account];

I used <apex:image url="{!$Resource.XYZ,'somePic.png'}" rendered="{!showImage}"/>

showImage is to show image if that retruns true.

 

and there are couple of places on the page.. I used <apex:image....

 

It was working earlier but started throwing exception i.e. "PDF generation failed. Check the page markup is valid."

 

After hits and trails, I found that

When I remove all apex:image, it renders PDF and does not throw any exception.

 

What could be the cause, and How can I show the required images, I also tried with simple HTML Img tag, it did not work.

 

Please suggest asap.

 

Thanks,

Saurav

 

 

Hi,

 

Anybody else having problems with images in summer '12?

Our sandbox has been updated and pdf generation now gives an error 'PDF generation failed. Check the page markup is valid.'

 

Test example below gives same issue. Any ideas?

 

<apex:page renderas="pdf">
  <h1>Congratulations</h1>
  This is your new Page
  <img src="http://www.developerforce.com/assets/images/discussions/banner.gif"></img>
</apex:page>

 A case has been logged -but just wondering if there is a quick fix.

 

Thanks!

Rich.

 

 

 

It won't even work for the canned quote2PDF example in the cookbook...

 

I get this error message on an otherwise blank failure page: "PDF generation failed. Check the page markup is valid. "

 

Anyone else seeing this?