• Mario Ruiz 646
  • NEWBIE
  • 20 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 5
    Replies
Hello, this error recently popped up on my console, the page was working perfectly but i dont know what is wrong now
<apex:image url="{!$Resource.Face}" height="15px" width="15px"></apex:image>&emsp; Some text<br/>
                        <apex:image url="{!$Resource.Twitter}" height="15px" width="15px"></apex:image>@SomeTextt</td>

The console marks whichever line that has a &emsp;

The image is showing properly if i delete the renderAs attribute.

<apex:page  standardController="Opportunity" extensions="MapsTesController">
<img src="https://chuckanddons.com/media/wysiwyg/kitten_blog.jpg"    ></img>

    <img src="GoogleAPILink" />
</apex:page>

not even the first image is showing if i add renderAs="pdf"

I'm trying to show an image that covers the whole page of a visualforce page.

Tis like a whole page watermark.

I have only achieved to sow an image that respects some borders, not the whole page

<apex:page standardController="Opportunity" renderAs="advanced_pdf" applyBodyTag="false" standardStylesheets="false"  showHeader="false"  applyHtmlTag="false">
	<head>
        <style  type="text/css">
           
            
            .mark {
               	background: url({!$Resource.MarcaFL}) no-repeat;
               border: 2px solid black
           		font-family: "Arial Unicode MS", Tahoma,sans-serif;
            	font-size: 9pt;
            	width=50%;
            	height=50%;
            	position:relative;
            	background-size:contain;
            }
			div{
            	
           		font-family: "Arial Unicode MS", Tahoma,sans-serif;
            	font-size: 9pt;
            	width=100%;
            	position:relative;
            	text-align:left;
            }
            .right{
            	float:right;
            	
            	width: 50%;
            	border=1;
            }
            .left{
            	float:left;
            	
            	width: 50%;
            }
            .Left3{
            	
            }
            .Mid{
            
            
            }
            .Right3{
            
            }
            p{
            	font-size:20px;
            	color:#365f91;
            }
             .Equipo{
            	font-family: "Arial Unicode MS",Tahoma,sans-serif;
            	color:rgb(196,89,17);
            	font-size: 9pt;
            }
            .tabla{
            	font-family: "Arial Unicode MS",Tahoma,sans-serif;
            	font-size: 9pt;
            	color:rgb(0,0,0);
            }
            span{color:rgb(31,77,120);}
            b{font-weight:bold;}
            strong { font-weight: bold; }
           
            .T {font: bold 20px; color:black; }
        </style>
    </head>
	<body padding="20">
        <div >
           
            <img src="{!$Resource.MarcaFL}" style="position:absolute; width:100%; height:75%; opacity:.2;"/>
       	<div>
            <center>
        	<h1 style=" font: bold 2.5em 'Gotham Book', Arial, sans-serif;">
                
            
                                            Some stuff...
                 
                </h1>
        </center>
            </div>
</body>
</apex: page>

The image is showing properly if i delete the renderAs attribute.

<apex:page  standardController="Opportunity" extensions="MapsTesController">
<img src="https://chuckanddons.com/media/wysiwyg/kitten_blog.jpg"    ></img>

    <img src="GoogleAPILink" />
</apex:page>

not even the first image is showing if i add renderAs="pdf"

I'm trying to show an image that covers the whole page of a visualforce page.

Tis like a whole page watermark.

I have only achieved to sow an image that respects some borders, not the whole page

<apex:page standardController="Opportunity" renderAs="advanced_pdf" applyBodyTag="false" standardStylesheets="false"  showHeader="false"  applyHtmlTag="false">
	<head>
        <style  type="text/css">
           
            
            .mark {
               	background: url({!$Resource.MarcaFL}) no-repeat;
               border: 2px solid black
           		font-family: "Arial Unicode MS", Tahoma,sans-serif;
            	font-size: 9pt;
            	width=50%;
            	height=50%;
            	position:relative;
            	background-size:contain;
            }
			div{
            	
           		font-family: "Arial Unicode MS", Tahoma,sans-serif;
            	font-size: 9pt;
            	width=100%;
            	position:relative;
            	text-align:left;
            }
            .right{
            	float:right;
            	
            	width: 50%;
            	border=1;
            }
            .left{
            	float:left;
            	
            	width: 50%;
            }
            .Left3{
            	
            }
            .Mid{
            
            
            }
            .Right3{
            
            }
            p{
            	font-size:20px;
            	color:#365f91;
            }
             .Equipo{
            	font-family: "Arial Unicode MS",Tahoma,sans-serif;
            	color:rgb(196,89,17);
            	font-size: 9pt;
            }
            .tabla{
            	font-family: "Arial Unicode MS",Tahoma,sans-serif;
            	font-size: 9pt;
            	color:rgb(0,0,0);
            }
            span{color:rgb(31,77,120);}
            b{font-weight:bold;}
            strong { font-weight: bold; }
           
            .T {font: bold 20px; color:black; }
        </style>
    </head>
	<body padding="20">
        <div >
           
            <img src="{!$Resource.MarcaFL}" style="position:absolute; width:100%; height:75%; opacity:.2;"/>
       	<div>
            <center>
        	<h1 style=" font: bold 2.5em 'Gotham Book', Arial, sans-serif;">
                
            
                                            Some stuff...
                 
                </h1>
        </center>
            </div>
</body>
</apex: page>
When i use "quote" as a standard controller in a visual force page i get the error come up as:

Error: Quote does not exist

What am i doing wrong or can we not use quote as a standard controller?
Hello,

Test coverage at 80% and I cant figure out why. Red highlight on Line 11 "return result;" GET request is working fine in workbench.

Account manager class:
 
@RestResource(urlMapping='/Accounts/*/contacts')
global with sharing class AccountManager {

    @HttpGet
    global static Account getAccount() {
        RestRequest request = RestContext.request;
        // grab the accountId from the end of the URL
        String accountId = request.requestURI.substringBetween('Accounts/', '/contacts');
        Account result = [SELECT ID,Name,(SELECT ID,Name FROM Contacts) FROM Account WHERE Id = :accountId ];
        system.debug(result);
        return result;
        
    }
}
Test Class:
 
@IsTest
private class AccountManagerTest {

    @isTest static void testGetAccount() {
        Id recordId = createTestRecord();
        // Set up a test request
        RestRequest request = new RestRequest();
        request.requestUri =
            'https://na1.salesforce.com/services/apexrest/Accounts/'+ recordId+'/Contacts';
        request.httpMethod = 'GET';
        RestContext.request = request;
        // Call the method to test
        Account thisAccount = AccountManager.getAccount();
        // Verify results
        System.assert(thisAccount != null);
        System.assertEquals('Test record', thisAccount.Name);
    }

   

    // Helper method
    static Id createTestRecord() {
        // Create test record
        Account accountTest = new Account(
        Name='Test record');
        insert accountTest;
       
        Contact con1 = new Contact(
        AccountId = accountTest.Id,
        firstName = 'test',
        lastName  =  'tester');
        insert con1;
        return accountTest.Id;
    }          

}