• Stuart Fleming
  • NEWBIE
  • 35 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 7
    Replies
The flow should call apex class to create new record. The field values are given in flow screen, the class should get the values to create record. I'm having trouble in passing the flow variable to class. How to use the flow input values in apex class. Can anyone help me out in this please.
Hi.  I have created a flow that shows a number of orders that a person is making.  The first thing the flow does is assign the flow {!$Flow.CurrentDateTime} to a variable called NowVariable.  The next screen the user enters the order.  The final screen the user sees a lightning component table that shows the orders the person made (passing in the contact and NowVariable).  The lightning component controller is an apex class:

     @AuraEnabled
  public static List<ice_Cream_Order__c> getIceCreamOrdersByContactTime(Id contactId, DateTime createdWhen){

      return [  select Id, How_Many__c , Ice_Cream_Flavor__r.Name, Contact__c  ,  Contact__r.Name
                FROM ice_Cream_Order__c 
                 where Contact__c = :contactId AND createdDate >= :createdWhen];
  }  

At issue:  The table shows no data.  I assume it is an issue of the Flow DateTime value of 2018-06-18T15:42:53.986Z does not correspond to the apex sql.    

Would anyone have any suggestions on how to pass the dateTime variable to the apex method?

Thanks,
stuart

I am stuck on the https://trailhead.salesforce.com/modules/security-for-lightning-components/units/secure-your-lightning-java-script-code challenge.
After searching on the internet, I am unable to find a solution.  I found a link https://developer.salesforce.com/forums/?id=9060G000000UbhwQAC but I am not sure what solution in it works.  (And I found another web page referring this same url saying "Jeff" had found a solution..but it did not work for me.  Here is what Jeff first says:
Trying securing the description instead:   secureFilters.html(results[i].Description__c)

I tried that and get this message:  
Challenge Not yet complete... here's what's wrong: 
The 'LTNG_SecureFilters_Challenge' component does not appear to be requiring the secureFilters resource.

Further in the post the person who asked the question says this:   "That worked. Thanks."
And then he summarizes and says would this be OK:

​secureFilters.html(results)  

And Jeff replies, "Correct".  

So I tried doing this:  
                var results =   response.getReturnValue()  ;
                secureFilters.html(results) ;    
And this created an error.....
And I tried this (thinking that maybe it needs to be passed to a variable) :
                var results =   response.getReturnValue()  ;
                results =  secureFilters.html(results) ;
And this created an error.....

Can anyone please help?

Thank you,
Stuart

I am working on the trailhead https://trailhead.salesforce.com/modules/salesforce1_mobile_app/units/salesforce1_mobile_app_compact_layouts

I am getting the following warning message after checking the challenge:

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: IREOKHWT

I had some problems accessing my developer org earlier, and had to disconnect it.

Given that this assignment relies on previously created objects and such, I can't just create a new Developer Edition.

Any ideas?

Thank you,
Stuart

 
So on this page about halfway down it states: 
Create Custom Metadata Type Records
For SFA Field, enter Minimum Support Level.

I only see the Support Level field that was created on the account.  Also, I don't see that this is actually limiting the chosen fields (seems like that was the point of all of the new metadata fields).  Is there something I am doing wrong here, or is the example off?

Also, if anyone has built out a rules engine while referencing metadata, I'd love to see a link to an example of that.
Hi,
I am new to salesforce. I have an apex class from where I am calling a web service. I want to insert the delay of 10 sec so that I can handle the 'over query limit' error. 
thanks in advance!