• David Picksley
  • NEWBIE
  • 20 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 0
    Replies
We have a custom lightning component that takes advantage of an external stylesheet (stored in the static resources).

It is included with 
<ltng:require styles="{! $Resource.STYLESHEETNAMEHERE}"/>

My thinking is that the developer adds a sort of 'onExit' handler to unlink the file, but I can't find any documentation for unloading a static resource, or I could be completely wrong and it just be a caching issue

The issue is that some of the styles in that external resource are being carried over to other components that don't explicitly include the file
How can we tackle this?

A screen recording of the issue
  • Open a default modal (FINE)
  • Open a custom component that includes the CSS file named 'fullModalBypass.css'
  • Re-open the first modal, the modal contains the CSS file that was included in the component of the previous step
I have a formula (see below) which works in Excel and uses the -PV function (in bold). The PV function calculates the present value of a loan based on certain criteria. However, Salesforce doesn't recognise the function...

Is there a similar function/formula I can utilise to get the value I need?

The full formula
 
( Advance_Cost_Less_VAT__c - Predicted_Residual_Value__c /((1+(MAX( Base_Rate__c )+ Rate_Over_Base_Rate__c )/12)^( Subsequent_Rentals__c +IF( Residual_With_Final_Rental__c ="No",1,0))))/(-PV((MAX( Base_Rate__c )+ Rate_Over_Base_Rate__c )/12, Subsequent_Rentals__c ,1)+ Advance_Rentals__c )


 
(-PV((MAX( Base_Rate__c )+ Rate_Over_Base_Rate__c )/12, Subsequent_Rentals__c ,1)+ Advance_Rentals__c )


 
Hi All,

I am trying to output a date type of yyyy-MM-dd, not as a string. I can create the correctly formatted string and insert that into a set.
currentDate = Date.today().toStartofMonth(); // Outputs 2018-12-01 00:00:00

firstDayOfCurrentMonth = currentDate.addMonths(i).toStartofMonth();

String currentDateString = String.valueOf(firstDayOfCurrentMonth).removeEnd(' 00:00:00'); // Outputs 2018-12-01 as a string

However, the issue is converting that string back into the Date type using either .valueOf or .parse
Date.valueOf(currentDateString);
// Outputs 2018-12-01 00:00:00

Date.valueOf(currentDateString.removeEnd(' 00:00:00'))
// Outputs 2018-12-01 00:00:00

Date.parse(currentDateString)
// Throws error with Invalid Date : 2018-12-01

My question is, how can I convert the correctly formatted string back into the Date type?

Many thanks!!
 
Hi,

I am completing another trail (see below)
https://trailhead.salesforce.com/modules/field_service_maint/units/field_service_maint_assets

The step I am having an issue with is 
  • ​In the Primary Assets related list on the Solar Panel 4000 asset, click New. 
User-added image


I have looked around the Asset list, record pages and even scoured around on Google so it must be me being completely blind (to which I do apologise).

Where actually is this button to add a new Asset relationship?