• david boukhors 23
  • NEWBIE
  • 70 Points
  • Member since 2015


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 6
    Replies
Hello,

I have a VF page:
<apex:page standardController="Asset" applyBodyTag="true"  showHeader="false" language="{!$CurrentPage.parameters.lang}" extensions="VFCTechnicianWorksheet" 
           docType="html-5.0" title="Technician Worksheet" sidebar="true">
    <style type="text/css" media="all">          
 .headerStyle {  
        font-size:10px;
        color:red;          
 }
 table {
    border-collapse: collapse;
    border-radius:30px;
 }
 table, th, td {
    border: 1px solid black;
 }
th, td {
    padding: 15px;
    text-align: left;
    border:solid black 1px;
}
tr:nth-child(even) {background-color: #f2f2f2}
th {
    background-color: #4682B4;
    color: white;
}     
    </style>
    <apex:pageblock >
        <apex:form style="text-align:center;">
            <apex:pageBlockSection id="Main">
                <apex:outputPanel >
                    <apex:outputLabel >Select Period: </apex:outputLabel>
                    <apex:outputLabel >Start Date</apex:outputLabel><apex:input value="{!startDate}" type="date"/>
                    <apex:outputLabel >End Date</apex:outputLabel><apex:input value="{!endDate}" type="date" label="End Date"/>
                    <apex:commandButton action="{!filterData}" value="Apply Filter" id="filterButton" reRender="assetList,Main"/>
                </apex:outputPanel>
            </apex:pageBlockSection>
            <apex:pageBlockSection id="assetList">
                <apex:outputPanel >
                    <apex:repeat value="{!lAsset}" var="ass">
                        <table>
                            <tr>
                                <th colspan="2">Date</th>
                                <th>Scan to Call Customer</th>
                                <th>{!$ObjectType.Asset.fields.Address__c.Label}</th>
                                <th>Customer Informations</th>
                                <th>SF Unit ID</th>
                            </tr>
                                <tr>
                                    <td colspan = "2">{!ass.Installation_Preferred_Date__c} </td>
                                    <td colspan="1"><apex:image value="{!ass.Contact_QR__c}" height="110"/></td>
                                    <td>{!ass.Address__c}<br/>
                                        <b>{!ass.City__c}</b><br/>
                                        {!ass.Postal_Code__c}<br/>
                                        {!ass.Country__c}<br/>
                                    </td>
                                    <td>{!ass.Contact.Name}<br/>
                                        {!ass.Contact.MobilePhone}<br/>
                                        {!ass.Note__c}
                                    </td>
                                    <td><apex:image value="{!ass.AssetName_QR__c}" height="110"/><br/>
                                        {!ass.Name}</td>
                                </tr>
                        </table>
                        <br/><br/><br/><br/><br/><br/><br/>
                        <br/><br/><br/><br/><br/><br/><br/>
                    </apex:repeat>
                </apex:outputPanel>
                
                
                
            </apex:pageBlockSection> 
        </apex:form>
    </apex:pageblock> 
</apex:page>

And a Controller:
public class VFCTechnicianWorksheet {
    @testVisible private Asset myAsset;
    @testVisible private PageReference p;
    public Date startDate {get;set;}
    public Date endDate {get;set;}
    @testVisible public List<Asset> lAsset {get;set;}
    
    public VFCTechnicianWorksheet(ApexPages.StandardController controller) {
        myAsset= (Asset) controller.getRecord();
        p = new Pagereference ('/'+myAsset.Id);
    }

    public void filterData(){
        system.debug(String.valueOf(startDate) + String.valueOf(endDate));
        queryData(startDate,endDate);
        
    }    
    @testVisible 
    private void queryData(Date aStartDate,Date aEndDate){
        lAsset = [Select Id,Installation_Preferred_Date__c,
                  AssetName_QR__c,Contact_QR__c,Note__c ,Name,
                  Contact.Name,Contact.MobilePhone, Contact.Email,Address__c,City__c ,Postal_Code__c ,Country__c 
                  from Asset where InstallDate = Null and Installation_Preferred_Date__c > :aStartDate 
                  and Installation_Preferred_Date__c < :aEndDate order by Installation_Preferred_Date__c ASC];
    }
}


When I display this VF page in a non console App, I can print pages without problem.
When this page is in a console mode App (as a VF Tab), I can scroll and see all the pages. But When I right click and select Print, I only see the first page. 
Does someone think there is a workaround to this?

Best Regards

David
Hi, 

I'm new to Salesforce and doing the beginner's Setup and manage shield platform encryption . It keeps giving me an error message saying, 
Challenge Not yet complete... The Case Description field does not appear to be encrypted. Make sure you have records with data in this field.

Even though I've already uploaded the sample import data on my Dev Org without problems.Where to upload sample data for case desciption field
I keep getting the "Challenge Not yet Complete......... Here's whats wrong"
Lightning page named 'New Account Page' does not appear to have the correct components on it.

The new record page must use the 'Header and Two Columns' template, be called 'New Account Page', and be assigned to the Account object. (Check this is done)
The page must have the Highlights Panel and Twitter components, and a Tabs component with these tabs containing these components: (Check this is done)
Activity Tab contains the Activities Component - Complete
Collaborate Tab contains the Feed Component - Complete
Related Tab contains the Related Lists Component - Complete
Details Tab contains the Record Detail Component - Compelte

Here is a screen shot, I believe I have all the items I am supposed to as well as what goes inside the components.
User-added image

Working the "Handle Actions with Controllers" trailhead module and I'm not getting past the validation.
If I put the component in a test jig, I can see the button function and set the check box as expected.
 

Here is the code I'm using to set the item as packed...

component.set("v.item.Packed__c", true );

I'm assuming the validator does not like my syntax. Can you give me a hint to get past this?

Thanks.
John

Hello,

I have a VF page:
<apex:page standardController="Asset" applyBodyTag="true"  showHeader="false" language="{!$CurrentPage.parameters.lang}" extensions="VFCTechnicianWorksheet" 
           docType="html-5.0" title="Technician Worksheet" sidebar="true">
    <style type="text/css" media="all">          
 .headerStyle {  
        font-size:10px;
        color:red;          
 }
 table {
    border-collapse: collapse;
    border-radius:30px;
 }
 table, th, td {
    border: 1px solid black;
 }
th, td {
    padding: 15px;
    text-align: left;
    border:solid black 1px;
}
tr:nth-child(even) {background-color: #f2f2f2}
th {
    background-color: #4682B4;
    color: white;
}     
    </style>
    <apex:pageblock >
        <apex:form style="text-align:center;">
            <apex:pageBlockSection id="Main">
                <apex:outputPanel >
                    <apex:outputLabel >Select Period: </apex:outputLabel>
                    <apex:outputLabel >Start Date</apex:outputLabel><apex:input value="{!startDate}" type="date"/>
                    <apex:outputLabel >End Date</apex:outputLabel><apex:input value="{!endDate}" type="date" label="End Date"/>
                    <apex:commandButton action="{!filterData}" value="Apply Filter" id="filterButton" reRender="assetList,Main"/>
                </apex:outputPanel>
            </apex:pageBlockSection>
            <apex:pageBlockSection id="assetList">
                <apex:outputPanel >
                    <apex:repeat value="{!lAsset}" var="ass">
                        <table>
                            <tr>
                                <th colspan="2">Date</th>
                                <th>Scan to Call Customer</th>
                                <th>{!$ObjectType.Asset.fields.Address__c.Label}</th>
                                <th>Customer Informations</th>
                                <th>SF Unit ID</th>
                            </tr>
                                <tr>
                                    <td colspan = "2">{!ass.Installation_Preferred_Date__c} </td>
                                    <td colspan="1"><apex:image value="{!ass.Contact_QR__c}" height="110"/></td>
                                    <td>{!ass.Address__c}<br/>
                                        <b>{!ass.City__c}</b><br/>
                                        {!ass.Postal_Code__c}<br/>
                                        {!ass.Country__c}<br/>
                                    </td>
                                    <td>{!ass.Contact.Name}<br/>
                                        {!ass.Contact.MobilePhone}<br/>
                                        {!ass.Note__c}
                                    </td>
                                    <td><apex:image value="{!ass.AssetName_QR__c}" height="110"/><br/>
                                        {!ass.Name}</td>
                                </tr>
                        </table>
                        <br/><br/><br/><br/><br/><br/><br/>
                        <br/><br/><br/><br/><br/><br/><br/>
                    </apex:repeat>
                </apex:outputPanel>
                
                
                
            </apex:pageBlockSection> 
        </apex:form>
    </apex:pageblock> 
</apex:page>

And a Controller:
public class VFCTechnicianWorksheet {
    @testVisible private Asset myAsset;
    @testVisible private PageReference p;
    public Date startDate {get;set;}
    public Date endDate {get;set;}
    @testVisible public List<Asset> lAsset {get;set;}
    
    public VFCTechnicianWorksheet(ApexPages.StandardController controller) {
        myAsset= (Asset) controller.getRecord();
        p = new Pagereference ('/'+myAsset.Id);
    }

    public void filterData(){
        system.debug(String.valueOf(startDate) + String.valueOf(endDate));
        queryData(startDate,endDate);
        
    }    
    @testVisible 
    private void queryData(Date aStartDate,Date aEndDate){
        lAsset = [Select Id,Installation_Preferred_Date__c,
                  AssetName_QR__c,Contact_QR__c,Note__c ,Name,
                  Contact.Name,Contact.MobilePhone, Contact.Email,Address__c,City__c ,Postal_Code__c ,Country__c 
                  from Asset where InstallDate = Null and Installation_Preferred_Date__c > :aStartDate 
                  and Installation_Preferred_Date__c < :aEndDate order by Installation_Preferred_Date__c ASC];
    }
}


When I display this VF page in a non console App, I can print pages without problem.
When this page is in a console mode App (as a VF Tab), I can scroll and see all the pages. But When I right click and select Print, I only see the first page. 
Does someone think there is a workaround to this?

Best Regards

David

Hi everyone,

i'm getting the following error after the system checks the challenge:

"Challenge Not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.QueryException: List has no rows for assignment to SObject"

I already tested it via Apex and via REST Explorer in Workbench, the code seems fine to me:

@restResource(urlMapping='/Account/*/contacts')
global class AccountManager {
	
    @httpGet
    global static Account getAccount(){
        RestRequest request = RestContext.request;
        String accountId = request.requestURI.substringBetween('/Account/' , '/contacts');
        
        Account result = [SELECT Id, Name, (SELECT Id,Name FROM Contacts) FROM Account WHERE Id = :accountId];
  
        return result;

    }
    
}


Can somebody help me with this?

Thank you,
Fabio

Hello,

Getting this:
Challenge not yet complete... here's what's wrong: 
The component does not implement the 'appHostable' interface. That interface is required to add the component to Salesforce1.


My component looks like this
 
<aura:component implements="force:appHostable">
	<h1 class="headline">Hello Trailhead</h1>
</aura:component>