• Josip Krajnović
  • NEWBIE
  • 95 Points
  • Member since 2017
  • IT Administrator Salesforce
  • RTS Elektronik Systeme GmbH


  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 11
    Likes Given
  • 6
    Questions
  • 21
    Replies
I have 3 custom objects with a Master-Detail Relationship and Lookup Relationship.
CustomA__c (related CustomB__c) <-> CustomB__c <-> CustomC_c (related CustomB_cc)

I´ve built a Visualforce page with HTML table to replicate a PDF document and a Custom Controller Extension, so far so good.
But I´m just a beginner with apex coding.

The problem is that I need to replicate the document as it is, when there are no related records for CustomA__c or less then 5, it should still show the full table (the empty rows). Max. rows/related records on the document is 5, no second page needed.

Currently I´m trying to accomplisch that by using apex:variable and apex:repeat as I´ve seen some examples, but perhaps there is also another solution. For the Visualforce page I already wrote the code for the rows with data and another apeax:repeat for the empty rows.

But I´m really strugling with the controller, i know i need to iterate over the list, the code that i already wrote is also put together out of examples as i just don´t understand it yet good enough.

Any help would be appreciated!  Thanks, Josip
 
public with sharing class CustomAController {    
    
    public CustomA__c customa{get; set;}
    public CustomA__c ca{get; set;}
    
    public CustomAController (ApexPages.StandardController controller) {
        ca = (CustomA__c )controller.getRecord();
        customa= [SELECT Id, Name  FROM CustomA__c WHERE Id = :ApexPages.currentPage().getParameters().get('Id')];
    }
    
        public List<CustomB__c > getrelatedCustomB() {
        List <CustomB__c > cbList = New List<CustomB__c >(5);
        
        for(CustomA__c acc:[SELECT Id, Name, (SELECT Id, Name, ... , CustomCfield__r.Name FROM CustomBs__r ORDER BY Name LIMIT 5) FROM CustomA__c WHERE Id = :customa.Id]){
            for(CustomB__c cb:acc.CustomBs__r)
                cbList.add(cb);
        }
        
        return cbList;
        }
        
}

 

I have 3 custom objects with a Master-Detail Relationship and Lookup Relationship.
CustomA__c (related CustomB__c) <-> CustomB__c <-> CustomC_c (related CustomB_cc)

I´ve built a Visualforce page with HTML table to replicate a PDF document and a Custom Controller Extension, so far so good.
But I´m just a beginner with apex coding.

The problem is that I need to replicate the document as it is, when there are no related records for CustomA__c or less then 5, it should still show the full table (the empty rows). Max. rows/related records on the document is 5, no second page needed.

Currently I´m trying to accomplisch that by using apex:variable and apex:repeat as I´ve seen some examples, but perhaps there is also another solution. For the Visualforce page I already wrote the code for the rows with data and another apeax:repeat for the empty rows.

But I´m really strugling with the controller, i know i need to iterate over the list, the code that i already wrote is also put together out of examples as i just don´t understand it yet good enough.


public with sharing class CustomAController {    
    
    public CustomA__c customa{get; set;}
    public CustomA__c ca{get; set;}
    
    public CustomAController (ApexPages.StandardController controller) {
        ca = (CustomA__c )controller.getRecord();
        customa= [SELECT Id, Name  FROM CustomA__c WHERE Id = :ApexPages.currentPage().getParameters().get('Id')];
    }
    
        public List<CustomB__c > getrelatedCustomB() {
        List <CustomB__c > cbList = New List<CustomB__c >(5);
        
        for(CustomA__c acc:[SELECT Id, Name, (SELECT Id, Name, ... , CustomCfield__r.Name FROM CustomBs__r ORDER BY Name LIMIT 5) FROM CustomA__c WHERE Id = :customa.Id]){
            for(CustomB__c cb:acc.CustomBs__r)
                cbList.add(cb);
        }
        
        return cbList;
        }
        
}

Just did the quiz for the 4th Unit in the Analytics App Template Development.
There seems to be an error in the second question, as the correct answer turned out to be the rules.json, but the correct answer is actually the Ui.json, see screenshots below.

correct answer

error in the quiz

For 4 units except the first of the Lightning Experience Reports & Dashboards it shows +100 points in the right side bar, but the challege is actualy +500 points.

For the Data Management - Import Data it shows +100 points in the right side bar, but the challege is actualy +500 points.
I just completed this challenge and it's not working.

I've done everything according to the requirements and still get this message:
"Challenge Not yet complete... here's what's wrong:
The 'Sales Pipeline Overview' lens does not appear to have the correct query. Please check the requirements and ensure everything is setup correctly."
Analyze_Your_Data_Over_Time


Also, the "Copy and Paste Results between Lenses" is no longer possible for me. Can't find copy or paste...
Copy_and_Paste_Results_between_Lenses
Just did the quiz for the 4th Unit in the Analytics App Template Development.
There seems to be an error in the second question, as the correct answer turned out to be the rules.json, but the correct answer is actually the Ui.json, see screenshots below.

correct answer

error in the quiz
Even after removing the necessary fields it says make sure you have removed the correct fields from the layout. I think some kind of bug is causing this issue and its really annoying. Before it said partner account layout could not be found and now this. Attached are the screenshots of the error message and my layout page. Kindly fix this or if thers a way around it let me know.

User-added image

User-added image

Rating
Region
Zone
Has Support Plan
Support Plan Expiration Date 

These are the fields which were asked to remove in the challenge for this layout.
Hi,

it's about the task "Set Up the Exchange Rate" in trail "Learn Admin Essentials in Lightning Experience"
My Org was set to EUR as currency. So I added USD and change my Org to USD. But I cant finish the challenge.

User-added image
And the company "United Oil & Gas, UK" was not available in my Org. So I took another one. Is that a mandatory step?
If you try to run an sfdx soql query on a Windows terminal, PS, CMD, etc, you will get the following error if your profile contans spaces in the path:
PS C:\sfdx\project1> sfdx force:data:soql:query --query "select count() from Contact"
'C:\Users\Luis' is not recognized as an internal or external command,
operable program or batch file.
To work around this, set your LOCALAPPDATA environment variable to the eight character equivalent of the path segment that contains the spaces. For example, in my case, I set LOCALAPPDATA to C:\Users\LUISLU~1\AppData\Local:
PS C:\sfdx\project1>$Env:LOCALAPPDATA = "C:\Users\LUISLU~1\AppData\Local"
PS C:\sfdx\project1> sfdx force:data:soql:query --query "select Name from Project__c"
NAME
─────────
Project 1
Total number of records retrieved: 1.
I have used other sfdx commands without problems, but apparently, force:data:soql:query uses the LOCALAPPDATA environment variable when executing the command.
 
  • February 16, 2018
  • Like
  • 1
Please can anyone tell me what type of app to create, lightening or connected?
Following command is not working when the default windows username contains a space example (C:\users\John Smith)
sfdx force:org:create -s -f config/project-scratch-def.json -a "default scratch org"

Error is ''C:\Users\John' is not recognized as an internal or external command,
operable program or batch file.

 
Just did the quiz for the 4th Unit in the Analytics App Template Development.
There seems to be an error in the second question, as the correct answer turned out to be the rules.json, but the correct answer is actually the Ui.json, see screenshots below.

correct answer

error in the quiz
I am trying to create a live Quip App usign the trailhead instructions in "Quick Start: Quip Live Apps". I have node and npm compatible versions installed.

I am getting error while executing this line on Command Prompt
.\bin\quip-apps init “J1 quip app” $QeEAjACfHeh

This is the error - '.\bin\quip-apps' is not recognized as an internal or external command, operable program or batch file.

Has anybody come across how to fix this error ?
I noticed that there is no link in this Trailhead for OpenSSL for Windows.  It simpy says "Windows complete package.exe installer" with no link. What's the suggestion or recommendation for those of us on Windows?

Thank you.
There seems to be an issue in this trailhead module when running it on Windows. Unencrypting the encrypted server key on the Travis server doesn't work.
This seems to be a known issue (https://github.com/travis-ci/travis-ci/issues/4746) and this alternative (https://docs.travis-ci.com/user/encrypting-files/#Using-OpenSSL) didn't work for me as well.
I've tried three different browsers, as well as logging out and logging back in. There is no challenge at the bottom of Create Custom Objects and Fields in the Data Modeling Trailhead. Clicking the bookmark on the right hand list does not work either. Is this a bug?
I just completed this challenge and it's not working.

I've done everything according to the requirements and still get this message:
"Challenge Not yet complete... here's what's wrong:
The 'Sales Pipeline Overview' lens does not appear to have the correct query. Please check the requirements and ensure everything is setup correctly."
Analyze_Your_Data_Over_Time


Also, the "Copy and Paste Results between Lenses" is no longer possible for me. Can't find copy or paste...
Copy_and_Paste_Results_between_Lenses
Hello,

I have this error when I try to check challenge:

Challenge Not yet complete... here's what's wrong: 
Could not find an account named 'Blackbeards Grog Emporium' created from Workbench with the Description 'The finest grog in the seven seas.'


In the next picture you can see what I send by the Workbench

User-added image

The result is succes and in my Developer Org I can see the Account created correctly, but the challenge isn't passed.
Even after removing the necessary fields it says make sure you have removed the correct fields from the layout. I think some kind of bug is causing this issue and its really annoying. Before it said partner account layout could not be found and now this. Attached are the screenshots of the error message and my layout page. Kindly fix this or if thers a way around it let me know.

User-added image

User-added image

Rating
Region
Zone
Has Support Plan
Support Plan Expiration Date 

These are the fields which were asked to remove in the challenge for this layout.
Hi,

it's about the task "Set Up the Exchange Rate" in trail "Learn Admin Essentials in Lightning Experience"
My Org was set to EUR as currency. So I added USD and change my Org to USD. But I cant finish the challenge.

User-added image
And the company "United Oil & Gas, UK" was not available in my Org. So I took another one. Is that a mandatory step?
If you try to run an sfdx soql query on a Windows terminal, PS, CMD, etc, you will get the following error if your profile contans spaces in the path:
PS C:\sfdx\project1> sfdx force:data:soql:query --query "select count() from Contact"
'C:\Users\Luis' is not recognized as an internal or external command,
operable program or batch file.
To work around this, set your LOCALAPPDATA environment variable to the eight character equivalent of the path segment that contains the spaces. For example, in my case, I set LOCALAPPDATA to C:\Users\LUISLU~1\AppData\Local:
PS C:\sfdx\project1>$Env:LOCALAPPDATA = "C:\Users\LUISLU~1\AppData\Local"
PS C:\sfdx\project1> sfdx force:data:soql:query --query "select Name from Project__c"
NAME
─────────
Project 1
Total number of records retrieved: 1.
I have used other sfdx commands without problems, but apparently, force:data:soql:query uses the LOCALAPPDATA environment variable when executing the command.
 
  • February 16, 2018
  • Like
  • 1
Following command is not working when the default windows username contains a space example (C:\users\John Smith)
sfdx force:org:create -s -f config/project-scratch-def.json -a "default scratch org"

Error is ''C:\Users\John' is not recognized as an internal or external command,
operable program or batch file.

 
Hello,
I tried many times... but receive the same error message : "Challenge Not yet complete... here's what's wrong: 
Formula in custom field 'Account Annual Revenue' is not correct. Check the instructions."
I followed all instructions & get the right results. It's a basic & very simple formula.
Do someone else encounter the same issue ? Any solution ?
Hello,
context- trailhead module : Quick Start: Quip Live Apps > Run Your Live App in Quip

I Had to install python in order to execute quip-apps in order to success.
Creating a app using a python :
C:\..\quip-apps-sdk-0.91\bin>C:\Users\e371495\AppData\Local\Programs\Python\Python36-32\python .\bin\quip-apps init myApp FCCAjAoobBu
INFO:root:Successfully initialized apps\myapp

I get an OK from npm install and build.
but I am not able to pack the application :
C:\..\quip-apps-sdk-0.91>C:\Users\e371495\AppData\Local\Programs\Python\Python36-32\python bin\quip-apps pack apps\myapp\app
I get the following :
User-added image
 
Thank you,
Christophe
I've tried different browsers but the Challenge for the Custom Objects and Fields is not visible.  (On Trailhead for the Admin Beginner)  Furthermore, the feedback link on this page does not work.  As a result, I cannot complete this module as it remains stuck at 75% even though I've finished everything before and after it.  Please advise so I can get this marked as complete?

The URL in question is:  https://trailhead.salesforce.com/en/trails/force_com_admin_beginner/modules/data_modeling/units/creating_custom_objects_fields
 
I've tried three different browsers, as well as logging out and logging back in. There is no challenge at the bottom of Create Custom Objects and Fields in the Data Modeling Trailhead. Clicking the bookmark on the right hand list does not work either. Is this a bug?
In the Trailhead module Data Modeling, Unit two, Create Custom Object and Fields, the challenge section is missing.  Whats even more odd is that I was sure  I had already completed it.  

User-added image
I wanted to solve the challenge on "Create Custom Objects and Fields" section but challenge doesn't display. Instead i get "Remember, this module is meant for Salesforce Classic. When you launch your hands-on org, switch to Salesforce Classic to complete this challenge" information and despite switching to Salesforce Classic i can't see the challenge. Any solutions?
Hello everyone, I'm getting confused on this module for the mobile section... the directions state to build the lens as follows:
  • Dataset: DTC Opportunity
  • Add Group: Opportunity Owner
  • Change Measure: Count of Rows to Sum of Amount
  • Sort by: Dsc (Descending)
  • Filter by: Industry Equals Engineering
  • Filter by: Won Equals True
  • Chart Type: Horizontal Bar
  • Lens Name: Top Engineering Sales
  • App: My Exploration
I have my criteria setup as follows:

User-added image
User-added imageUser-added imageUser-added imageUser-added image

I am just not sure where I am going wrong!  I've tried deleting it and reconstructing it, but every time I get the error "Challenge Not yet complete... here's what's wrong: The 'Top Engineering Sales' lens does not appear to have the correct query. Please check the requirements and ensure everything is setup correctly."

Any help would be appreciated!