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


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 7
    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
I am stuck on Step 4 of the Process Automation Specialist Superbadge. I am receiving the following error:
Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: GTJRSNVZ

Here are the Challenge Requirements: 
Create Sales Process and Validate Opportunities
Create a sales process with the required stages and name it RB Robotics Sales Process. Create a record type named RB Robotics Process RT. Add a field to the opportunity page layout as described in the business requirements and create the appropriate validation rule for high-value opportunities.

Hey, nice work on the setup records! Now let’s talk about our sales process. Most of the stages we use are already in Salesforce, but one of the stages we track doesn’t come standard so it would be great if you’d add it. These are the stages we use:  Prospecting, Qualification, Proposal/Price Quote, Negotiation/Review, Awaiting Approval, Closed Won, and Closed Lost. We want all our reps to follow the same process, so everyone should see those stages for every opportunity. 
Oh, and the biggest deals--anything over $100K--have to be approved before they can close. We should have a way to show on the record that the deal is approved--maybe you can add an “Approved” checkbox to the opportunity. Obviously the sales reps shouldn’t be able to check that box. Only system administrators like you and sales managers should be able to check it. By the way, all of us sales managers here have the Custom: Sales Profile in Salesforce.

I have created the following:
  1. Created a new Opportunity Stage: Awaiting Approval (Open, 95%, Pipeline)
  2. Created the following Opportunity Fields:
    1. Approved (Checkbox) Defaulted FALSE
  3. Sales Process:
    1. NAMED: RB Robotics Sales Process
    2. Stages Added:
      1. Prospecting (Open, 10%, Pipeline)
      2. Qualification (Open, 10%, Pipeline)
      3. Proposal/Price Quote (Open, 75%, Pipeline)
      4. Negotiation/Review (Open, 90%, Pipeline)
      5. Awaiting Approval (Open, 95%, Pipeline)
      6. Closed Won (Closed/Won, 100%, Closed)
      7. Closed Lost (Closed/Lost, 0%, Omitted)
  4. Opportunity Record Type:
    1. NAMED: RB Robotics Process RT
    2. Sales Process: RB Robotics Sales Process
    3. This is the only record type and assigned to all profiles. Also using the Opportunity Layout. 
  5. Opportunity Validation Rules:
    1. Approved_Field_Validation
      AND( 
      ISCHANGED(Approved__c), 
      OR( 
      $Profile.Name <> 'System Administrator', 
      $Profile.Name <> 'Custom: Sales Profile' 
      ) 
      )

      2. High_Value_Opportunity_Validation
      AND(
          ISCHANGED( IsClosed ),
          IsClosed = TRUE,
          Amount  > 100000,
          Approved__c  <> TRUE
          )
Im not sure what I am missing. Can anyone assist?
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>