• Jasper Wall
  • NEWBIE
  • 183 Points
  • Member since 2016

  • Chatter
    Feed
  • 6
    Best Answers
  • 0
    Likes Received
  • 3
    Likes Given
  • 1
    Questions
  • 62
    Replies
I am trying to build a process that triggers when the arrival date is tomorrow.  When I put Arrival date = tomorrow or Arrival Date= tomorrow(), I get the error message: The formula expression is invalid:Field Tomorrow does not exist. Check Spelling. 
 
I am new to salesforce SOQL and I seem to be having an issue when i try to use nested queries the query i am trying to perform is 

List<Space__c> sp = [Select Name, Suite__c, (Select Name from Location__c), (Select Name from RecordType where Name = 'Commercial') from Space__c];

and i keep getting this error 

Name, Suite__c, (Select Name from Location__c), (Select Name from
                                  ^
ERROR at Row:1:Column:42
Didn't understand relationship 'Location__c' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.

even if i append __r instead of __c i still get the same issue any ideas will help i just need the names out of the 2 related objects
I'm trying to write a custom button for a contact page layout. Below is my desired code. I'm trying to initiate an email that will have a custom link URL in its body but the link has URL parameters which aren't working because the original mailto: has URL parameters so it's not being interpreted correctly. I've already tried using ASCII but it doesn't translate correctly. Any help or advice is greatly appreciated. Feel free to recommend an alternative solution for this implementation.

mailto:{!Contact.Email}?body=<a href="http://scholastica.tfaforms.net/217735?tfa_170={!Contact.Id}&FunnelNum={!Contact.Student_Master__Master_Application_Number__c}">Quick Survey</a>

 
Hi Expert,

I need to get the related solution for particular cases by SOQL. 

Can you please write the query to fatch the solution of a particular case.

Thanks
Mukesh
I am inserting new account record and I want certail words in field to be formatted as if they were written using html like heading, bold. rich text area doesnot provide much needed functionality. like when I enter account name as "Harry james potter "and click save. record detail page should show only "james" in bold, when address is being added to rich text area feild form trigger and class, result should be formatted. Can anybody help me with this ?
I have created a custom rich text area field (called General Information) on the Account object and am successfully populating a rich text area field (also called General Information) on the Contact object. I would like:
  • To update the Contact General Information field anytime the Account General Information field is changed.
  • I would also like the field on the Contact object to remain editable--this value will eventually be populated on the Opportunity
  • Additionally, I would like ALL contacts associated with the Account to inherit the Account General Information value.
Is this possible? Any help or sample code would really be appreciated.
I am following the tutorial given in 
https://www.lightningdesignsystem.com/components/trees/#flavor-base

I used the code like this my page
 
<div class="slds-tree_container" role="application">
  <h4 class="slds-text-title--caps" id="treeheading">Tree Group Header</h4>
  <ul class="slds-tree" role="tree" aria-labelledby="treeheading">
    <li id="tree0-node0" role="treeitem" aria-level="1">
      <div class="slds-tree__item">
        <button class="slds-button slds-button--icon slds-m-right--x-small slds-is-disabled" disabled="" title="Toggle">
          <svg class="slds-button__icon slds-button__icon--small" aria-hidden="true">
            <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#chevronright"></use>
          </svg>
          <span class="slds-assistive-text">Toggle</span>
        </button><a href="javascript:void(0);" tabindex="-1" role="presentation" class="slds-truncate" title="Tree Item">Tree Item</a></div>
    </li>
    <li id="tree0-node1" role="treeitem" aria-level="1" aria-expanded="false">
      <div class="slds-tree__item">
        <button class="slds-button slds-button--icon slds-m-right--x-small" aria-controls="tree0-node1" title="Toggle">
          <svg class="slds-button__icon slds-button__icon--small" aria-hidden="true">
            <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#chevronright"></use>
          </svg>
          <span class="slds-assistive-text">Toggle</span>
        </button><a id="tree0-node1__label" href="javascript:void(0);" tabindex="-1" role="presentation" class="slds-truncate" title="Tree Branch">Tree Branch</a></div>
      <ul class="slds-is-collapsed" role="group" aria-labelledby="tree0-node1__label">
        <li id="tree0-node1-0" role="treeitem" aria-level="2">
          <div class="slds-tree__item">
            <button class="slds-button slds-button--icon slds-m-right--x-small slds-is-disabled" disabled="" title="Toggle">
              <svg class="slds-button__icon slds-button__icon--small" aria-hidden="true">
                <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#chevronright"></use>
              </svg>
              <span class="slds-assistive-text">Toggle</span>
            </button><a href="javascript:void(0);" tabindex="-1" role="presentation" class="slds-truncate" title="Tree Item">Tree Item</a></div>
        </li>
      </ul>
    </li>
    <li id="tree0-node2" role="treeitem" aria-level="1">
      <div class="slds-tree__item">
        <button class="slds-button slds-button--icon slds-m-right--x-small" aria-controls="tree0-node2" title="Toggle">
          <svg class="slds-button__icon slds-button__icon--small" aria-hidden="true">
            <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#chevronright"></use>
          </svg>
          <span class="slds-assistive-text">Toggle</span>
        </button><a id="tree0-node2__label" href="javascript:void(0);" tabindex="-1" role="presentation" class="slds-truncate" title="Tree Branch">Tree Branch</a></div>
      <ul class="slds-is-collapsed" role="group" aria-labelledby="tree0-node2__label">
        <li id="tree0-node2-0" role="treeitem" aria-level="2">
          <div class="slds-tree__item">
            <button class="slds-button slds-button--icon slds-m-right--x-small slds-is-disabled" disabled="" title="Toggle">
              <svg class="slds-button__icon slds-button__icon--small" aria-hidden="true">
                <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#chevronright"></use>
              </svg>
              <span class="slds-assistive-text">Toggle</span>
            </button><a href="javascript:void(0);" tabindex="-1" role="presentation" class="slds-truncate" title="Tree Item">Tree Item</a></div>
        </li>
      </ul>
    </li>
    <li id="tree0-node3" role="treeitem" aria-level="1">
      <div class="slds-tree__item">
        <button class="slds-button slds-button--icon slds-m-right--x-small slds-is-disabled" disabled="" title="Toggle">
          <svg class="slds-button__icon slds-button__icon--small" aria-hidden="true">
            <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#chevronright"></use>
          </svg>
          <span class="slds-assistive-text">Toggle</span>
        </button><a href="javascript:void(0);" tabindex="-1" role="presentation" class="slds-truncate" title="Tree Item">Tree Item</a></div>
    </li>
  </ul>
</div>

Even i have included SLDS in my css list as follows,
 
<apex:stylesheet value="{!URLFOR($Resource.SLDS221, 'assets/styles/salesforce-lightning-design-system-vf.min.css')}" />

The code just displaying trees and those are neither collapsing nor expanding, please help me
I'm trying to use an apex:inputField to ask for user input and store the input in an object's field. i.e. 
<apex:inputfield type="number" value="{!case.CustomField__c}" />
My custom field is read/write and it's of type number. I would like to just restrict the maximum number to input for the user. Let's say I want the user to input a number between 1 and 10. I have tried this, but I get an error.
<apex:inputField type="number" min="1" max="5" value="{!case.CustomField__c}" />
The error message is: Unsupported attribute min in <apex:inputField>

I have also tried to use <apex:inputField type="range" /> but the same error applies. Ultimately I could use the html tag <input> but storing the value to my object's field would not work.

Any guidance would be appreciated, thanks!
Scenario:
I have been asked to present information at an Account, Opportunity, Contact and Lead level where we have a simple date field that shows the Date of Last Activity for each of these objects. However, I need to specify which activity... ensuring that it is only giving us the teams activity (and not marketing generated) 

So Far:
I have a custom field against the task object - "Hubspot generated" - Y/N which is populated by workflow. 

I have created new custom formula (date) fields against each of the objects (which are currently pulling in the date of last activity (any activity including hubspot generated).  

I had previously been coming at this from a workflow or formula based approach but now understand Apex is the way to go.. but I have no experience in this whatsoever! 

trigger lastactivitydate ex hubspot (after insert, after update)
?????
and then i am lost in code! I believe i need to incorporate Task = Closed, Hubspot Generated = No  but not sure how to present this.

Any helpers?  Thanks In Advance!
Kellie 
I have developed a Visualforce page that needs to display a fairly complicated report. Data needs to be pulled from a variety of objects, and because the filter criteria may vary, I have to use dynamic SOQL.

The problem is that when the report is first run, it takes inordinately long. 2-3 minutes are not uncommon, and lately we've even encountered complete timeouts. Neither the amount of data (less than 5000 rows per query) nor the complexity of the queries (less than 10 columns, one level of joining per query) warrants this.

What's more, this slowness only occurs when the page is first loaded in one session. If the user changes the filter and re-runs the same report, it is much faster, no more than a few seconds. I did two runs of the same report with Apex/SOQL profiling turned on, and the result is abundantly clear.
Here's the profiling info for the first query of the first run:
Class.MyReport.rewardsReport: line 419, column 1: [
	SELECT Visit__r.Client__c, Value__c, Visit__r.Year__c
	FROM Reward__c
	WHERE Visit__r.Ev__c >= :minYear AND Visit__r.Type__c = 'Settlement' AND Visit__r.Client__c IN :clientIds
]: executed 4603 times in 134160 ms
And then, here's the same query when I changed the filter and re-ran the report from the page:
Class.MyReport.rewardsReport: line 419, column 1: [
	SELECT Visit__r.Client__c, Value__c, Visit__r.Year__c
	FROM Reward__c
	WHERE Visit__r.Ev__c >= :minYear AND Visit__r.Type__c = 'Settlement' AND Visit__r.Client__c IN :clientIds
]: executed 6565 times in 1917 ms
(note: I'm not sure why it says "executed x times", I don't run the query that many times, I presume that refers to the number of rows returned by the query)

I have no idea if SF does any caching for SOQL queries (and if yes then how) but to me it would seem so. The problem is, "the report works fine once you wait out the first 3 minutes" is not a solution my client is ready to accept. Does anyone have any experience with this problem, and/or an idea for how to improve performance?
Hello Friends,

I am new to development and i am trying to build pop up screen .

when ever i change my status from closed to open before clicking on save button i would like to get a java script pop up to show the message.

Can anyone help me please.

Thanks

 

public class OpportunityHelper {
	

public static void CreateURL_SendComingSoonEmail(){
        List<Id> oppsToQuery = new List<Id>();
        for (Tabella_consultazioni__c tc : (List<Tabella_consultazioni__c>)trigger.new){
          //invio email solo se tipologia è uguale a Sessione
			  if(tc.Tipologia__c=='Sessione' ) {
                if (tc.Opportunita__c != NULL && 
                ((Tabella_consultazioni__c)trigger.oldMap.get(tc.Id)).Opportunita__c != tc.Opportunita__c){
                    oppsToQuery.add(tc.Opportunita__c);
                }
            }
        }
        if (oppsToQuery.isEmpty()){
            return;
        }
        List<Messaging.SingleEmailMessage> emailsToSend = new List<Messaging.SingleEmailMessage>();
        List<DatiVersamento__c> dvToInsert = new List<DatiVersamento__c>();
        List<Opportunity> oppsToUpdate = new List<Opportunity>();
        Map<Id, DatiVersamento__c> insertedDVs = new Map<Id, DatiVersamento__c>();
        EmailTemplate emailTemp = [SELECT htmlValue FROM EmailTemplate WHERE name = 'Filippo_ComingSoonTemplate'][0];
        Map<Id, Opportunity> oppQuery = new Map<Id, Opportunity>(
            						[SELECT Id, amount, URL_Dati_Anticipo__c,
                                     Account.FirstName, Account.LastName, Account.PersonEmail
                                     FROM Opportunity WHERE Id IN :oppsToQuery]);
        for (Opportunity opp : oppQuery.values()){
            dvToInsert.add(new DatiVersamento__c(Opportunity__c = opp.Id,
                                                Nome_Paziente__c = opp.Account.FirstName,
                                                Cognome_Paziente__c = opp.Account.LastName));
        }
        insert dvToInsert;
        Site_domain__c sd = Site_domain__c.getInstance();
        String url = sd.URL__c+'DatiVersamento';
        for (DatiVersamento__c dv : dvToInsert){
            insertedDVs.put(dv.Opportunity__c, dv);
        }
        for (Opportunity opp : oppQuery.values()){
            opp.URL_Dati_Anticipo__c = '<a href="'+url+'?Id='+insertedDVs.get(opp.Id).Id+'">'+url+'?Id='+insertedDVs.get(opp.Id).Id+'</a>';
            oppsToUpdate.add(opp);
        }
        update oppsToUpdate;
        for (Tabella_consultazioni__c tc : (List<Tabella_consultazioni__c>)trigger.new){
            if (tc.Opportunita__c != NULL && 
            ((Tabella_consultazioni__c)trigger.oldMap.get(tc.Id)).Opportunita__c != tc.Opportunita__c){
                Opportunity opp = oppQuery.get(tc.Opportunita__c);
                Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
                String body = emailtemp.htmlValue.replace('{!Opportunity.Account}', 
                                                          opp.Account.FirstName+' '+opp.Account.LastName);
                String subject = 'Acconto Sessione bSBS '+opp.Account.FirstName+' '+opp.Account.LastName;
                if (opp.URL_Dati_Anticipo__c == NULL || opp.Account.PersonEmail == NULL){
                    tc.addError('Errore: mancano i campi Email, Url o Amount nella opportunità scelta.');
                }
                body = body.replace('<![CDATA[','');
                body = body.replace(']]>','');
                body = body.replace('{!date}', tc.Data__c.day()+'/'+tc.Data__c.month()+'/'+tc.Data__c.year());
                body = body.replace('{!time}',tc.Ora_inizio_appoggio__c+'.'+tc.Minuto_inizio_appoggio__c);
                body = body.replace('{!IBAN}',IBAN);
                body = body.replace('{!SWIFT}',SWIFT);
                body = body.replace('{!BENEFICIARY}',BENEFICIARY);
                body = body.replace('{!BANK}',BANK);
                body = body.replace('{!subject}',subject);
                body = body.replace('{!amount}','600,00');
                body = body.replace('{!expireDate}',system.Date.today().addDays(2).day()+'/'+system.Date.today().addDays(2).month()+'/'+system.Date.today().addDays(2).year());
                body = body.replace('{!URLdatidacompilare}',opp.URL_Dati_Anticipo__c);
                email.setToAddresses(new List<String>{opp.Account.PersonEmail});
                email.setSubject(subject);
                email.setHtmlBody(body);
                if (opp.Account.PersonEmail == NULL) {
                    continue;
                } else {
                	emailsToSend.add(email);
                }
            }
            
        }
        Messaging.SendEmailResult[] results = Messaging.sendEmail(emailsToSend, TRUE);
        return;
    }
    
    
    public static void PopulateSMSField(){
        List<Id> oppIDsToQuery = new List<Id>();
		for (Tabella_Consultazioni__c tcs : (List<Tabella_Consultazioni__c>)trigger.new){
            	oppIDsToQuery.add(tcs.Opportunita__c);
        }
        Map<Id, Opportunity> oppsToUpdate = new Map<Id, Opportunity>([SELECT Id, OwnerId
                                                FROM Opportunity
                                                WHERE Id IN :oppIDsToQuery]);
        Map<Id, User> users = new Map<Id, User>([SELECT Id, FirstName, LastName
                                                FROM User]);
        Configurazione_SMS__c smsPC = Configurazione_SMS__c.getValues('SMS Prenotazione Consultazione');
        Configurazione_SMS__c smsPS = Configurazione_SMS__c.getValues('SMS Prenotazione Sessione');
        for (Tabella_Consultazioni__c tcs : (List<Tabella_Consultazioni__c>)trigger.new){
            if (tcs.Tipologia__c == 'Consultazione' && tcs.opportunita__c != NULL){
                String str=smsPC.Test_SMS__c;
                str = str.Replace('{!DATA}',FormatDate(System.date.today().day())+'/'+FormatDate(System.date.today().month())+'/'+System.date.today().year());
                str = str.Replace('{!ORA}',FormatDate(system.now().hour())+':'+FormatDate(system.now().minute()));
                str = str.Replace('{!COMMNAME}',users.get(oppsToUpdate.get(tcs.Opportunita__c).OwnerId).FirstName + ' ' + users.get(oppsToUpdate.get(tcs.Opportunita__c).OwnerId).LastName);
            	oppsToUpdate.get(tcs.Opportunita__c).SMS_Prenotazione_Consultazione__c = str;
            } else if (tcs.Tipologia__c == 'Sessione' && tcs.opportunita__c != NULL){
                String str=smsPS.Test_SMS__c+' '+smsPS.Test_SMS_2__c;
                str = str.Replace('{!DATA}',FormatDate(System.date.today().day())+'/'+FormatDate(System.date.today().month())+'/'+System.date.today().year());
                str = str.Replace('{!ORA}',FormatDate(system.now().hour())+':'+FormatDate(system.now().minute()));
                str = str.Replace('{!COMMNAME}',users.get(oppsToUpdate.get(tcs.Opportunita__c).OwnerId).FirstName + ' ' + users.get(oppsToUpdate.get(tcs.Opportunita__c).OwnerId).LastName);
            	oppsToUpdate.get(tcs.Opportunita__c).SMS_Prenotazione_Sessione__c = str;
            }
        }
        update oppsToUpdate.Values();
    }
    
    public static String FormatDate(integer inte){
        if (inte<10){
            return '0'+inte;
        } else{
            return String.ValueOf(inte);
        }
    }
    
    
    public static void PopulateSMSFieldFromDate(){
        Configurazione_SMS__c cSMS = Configurazione_SMS__c.getValues('SMS Conferma Sessione');
        for (Opportunity opp :(List<Opportunity>)trigger.new){
            if( (trigger.isInsert || ( opp.data_pagamento__c != NULL && ((Opportunity)trigger.oldMap.get(opp.Id)).data_pagamento__c == NULL) ) ){
                   opp.SMS_Conferma_Sessione__c = cSMS.Test_SMS__c;
               }
        }
    }
    
}

 
                        <apex:commandButton value="SDS Account" action="{!fetchSDSAccountDetails}" styleClass="btn btn-primary btn-sm" reRender="pbstracc,pbssdsacc" status="sdsAccButton"/> 

<apex:outputPanel id="pbssdsacc">
                            <apex:pageBlockSection rendered="{!sdsAccount}" columns="2" >
                                <apex:outputText label="Customer" value="{!customerDetails.Name}"/>
                                <apex:outputText label="Customer Code" value="{!customerDetails.KUNNR__c}"/>
                                <apex:outputText label="Address" value="{!customerDetails.Street_1__c} {!customerDetails.Street_1__c} {!customerDetails.Street_2__c} {!customerDetails.Town__c} {!customerDetails.State__c} {!customerDetails.District__c} {!customerDetails.PIN_code__c}"/><br/>
                                <apex:input type="date" label="From Date " value="{!accountFromDate}" style="width:120px;font-size:12px" />
                                <apex:input type="date" label="To Date " value="{!accountToDate}" style="width:120px;font-size:12px" />
                                <apex:commandButton value="Generate Report" action="{!generateSDSAccountDetails}" styleClass="btn btn-primary btn-sm" reRender="pbssdsacc"/>
                            </apex:pageBlockSection> 
                                <apex:outputPanel>
                                    <apex:pageBlockSection rendered="{!sdsAccountGenerateReport}">
                                        Customer Name
                                    </apex:pageBlockSection>
                                </apex:outputPanel>
                                
                        </apex:outputPanel> 
Onclick of SDS Account button i want to rerender pbssdsacc which is working fine. But on click of Generate Report i want to show the pageblock section which is not displayed on click of SDS Account button but displayed on click of Generate Report button
 

Hi All,

I want to know that why we use map instead of list in salesforce. Please help with scenario.

Thanks,
Parteek

I'm getting the following error:

System.QueryException: No such column 'Location__c' on entity 'Special_Event__c'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. 
Stack Trace: Class.ORC.<init>: line 81, column 1 Class.ORTests.testORC: line 196, column 1
  • Special_Event__c.Location__c does exist and its a GeoLocation field type
  • It is visable to all profiles.  
  • Special_Event__c is Deployed.
  • I've updated the class to API 38 thinking perhaps it's prior API version didn't support GeoLocation but that didn't help
  • I tried rewriting the soql statement to a string with a database.execute() statement but again no luck.
I'm out of ideas.  Please help with any other idea
I have created a visualforce page in company sandbox with Apex controllers.   it renders and works as expected in the sandbox.   I used a changeset to migrate to production.  the page does not display at all.... even if I go into the developer console to preview page in production it does not display......   I have verified urls are linked correctly to static resources.  This page is actually assigned to all profiles.  I have checked the API version is the same.   

Can someone tell me what would cause this.....  I have deployed other pages using the same controller and they all display and work correctly.
 I have other pages in this site that utilize the contact object but when I use it in this page it makes the entire page read only.  The page works in the scope of a logged in user, but not with an external site. If I remove the ID Parameter, the page renders as it should, but obviously cannot update.   I have gone through all the public access settings in the guest profile for this site.  This is probably a simple thing, but I am too many hours into this to figure it out, any help is appreciated.
Hi 

I am trying to install the Force ide and used the following
https://developer.salesforce.com/docs/atlas.en-us.eclipse.meta/eclipse/ide_install.htm

and eclipse installer fails here:

g.eclipse.equinox.p2.transport.ecf code=1002 Unable to read repository at http://download.eclipse.org/releases/neon/201512181000/content.xml.
org.apache.http.NoHttpResponseException: download.eclipse.org failed to respond





my java version is:

java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) Client VM (build 25.121-b13, mixed mode)


How do I fix so that the eclipse IDE for Force.com does not fail on install ?



 
I am using StandardController="Emploee__c" , able to retrieve the input text , while unable to retrieve the value in textarea.What would be the problem ? And how do i retrieve it. My requirement is I want to use the textarea tag only.

The field i have in salesforce is long textarea

Note : I am able to save the value I entered in the text Area , but value not retrieved on my VF Page as it did for input text , when I give the Id in the URL. 
Name : <input type="text" value="{!Emploee__c.Name}" id="nm"/>
<textarea id="resizable" rows="5" cols="20" value="{!Emploee__c.Long_Description__c}" ></textarea>

<button onclick="save();" >Submit Form </button>

User-added image
How to retrieve value in text area when I give Id in the url.
 
How can I accomplish this? "write triggers to send an email alert when a duplicate record is created or create a Process Builder to which auto launches a flow"

Looking to receive the alerts to one specific email address..
I am trying to build a process that triggers when the arrival date is tomorrow.  When I put Arrival date = tomorrow or Arrival Date= tomorrow(), I get the error message: The formula expression is invalid:Field Tomorrow does not exist. Check Spelling. 
 
Hi Everyone,
I tried to use the syntax below to load an external page within visualforce but keep getting a blank page. Anyone can help me on how to display an external website within visualforce, I would be helpful. I am new to salesforce, so any help would be appreciated

<apex:iframe src="http://www.salesforce.com" scrolling="true" id="theIframe"/> 
Can any one help me on this....
In classic  while passing object record id in the URL will get the field values on the page ,how can we achieve this in the lightning.
Here am tryng same but unable to get field values and where can I pass the id in the lightning,below is my component and app.



<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global" >
    <aura:attribute name="expense" type="expense__c"/>
<p>Amount:<ui:outputCurrency Value="{!v.expense.Amount__c}"/></p>
<p>Client:<ui:outputtext value="{!v.expense.Client__c}"/> </p>
<p>Date:<ui:outputdate value="{!v.expense.Date__c}"/></p>
<p>Reimbursed?: <ui:outputcheckbox value="{!v.expense.Reimbursed__c}"/></p>
    <ui:outputText class="form-control" aura:id="recid" value="{!v.recordId}" />
</aura:component>


<aura:application >
  
    <c:expense/>
        
</aura:application>


Thanks in advance.
Hi guys, 

Im setting up some email alerts for my org. 

I need to set an alert 75 days before a client turns certain age.

I have set a time triggered action send me an email alert when this happens and here goes my question. 

If a contact has been recently added to the org and this contact is only 40 days away from its birthday. will the workflow still send me the alert even tho is past the 75 day mark ?
I am new to salesforce SOQL and I seem to be having an issue when i try to use nested queries the query i am trying to perform is 

List<Space__c> sp = [Select Name, Suite__c, (Select Name from Location__c), (Select Name from RecordType where Name = 'Commercial') from Space__c];

and i keep getting this error 

Name, Suite__c, (Select Name from Location__c), (Select Name from
                                  ^
ERROR at Row:1:Column:42
Didn't understand relationship 'Location__c' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.

even if i append __r instead of __c i still get the same issue any ideas will help i just need the names out of the 2 related objects