• richard lloyd 9
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 0
    Replies
Hi There, I've followed this guide: https://developer.salesforce.com/docs/atlas.en-us.salesforce_vpm_guide.meta/salesforce_vpm_guide/vpm_finish_override.htm#! to create an Action that dispalys a created record to the User once created and the Flow ends.  I dont have any errors messages and I've successfully linked the Action to the Flow, but the Flow doesnt dispaly the created record - it just loops back to the beginning - please see below for my code and Flow screenshots.

+ I've disabled any Opportunity or Account Validation rules and debugged - but cant see any errors.

Any help would be greatly appreciated, I'm very confused!
 
Component:

<aura:component implements="force:lightningQuickAction, lightning:availableForFlowActions">
   <aura:attribute name="recordId" type="String" />
</aura:component>

Controller:

({    invoke : function(component, event, helper) {
   // Get the record ID attribute
   var record = component.get("v.recordId");
   
   // Get the Lightning event that opens a record in a new tab
   var redirect = $A.get("e.force:navigateToSObject");
   
   // Pass the record ID to the event
   redirect.setParams({
      "recordId": record
   });
        
   // Open the record
   redirect.fire();
}})


Design:

<design:component>
   <design:attribute name="recordId" label="Record ID" />
</design:component>
Flow connected to Action to show the created recordScreenshot passing newly created recordId to flow Action to display the record
 
Hi There,

I'm having trouble getting CSS tags to work in a screen flow.  I've got the Flow itself to work (dispalying 3 fields from all Opportunities associated with an Account) but the formatting displays like this on the screen element, (i.e. it is not picking up the CSS tags):
 
<style>

table, th, td {

 border: 1px solid black;

}

</style>

<table>

<tr>

<th>Opp name</th>

<th>Stage</th>

<th>Type</th>

</tr>

<tr>

<td>Test Opp 2</td><td>Test Opp 2</td><td>Existing Customer - Upgrade</td>

</tr>

<tr>

<td>Test Opp 1</td><td>Test Opp 1</td><td>Existing Customer - Replacement</td>

</tr>

<tr>

<td>Dickenson Mobile Generators</td><td>Dickenson Mobile Generators</td><td>New Customer</td>

</tr>

</table>

Any help would be greatly appreciated.
Hi There, in my flow I'm converting old products to new products and then creating Opportunity line items.  Because 2 of the old products are now combined into 1 new product, I end up with 2 opportunity line items of the same product on the finished opportunity.

Does anyone have any advice or an example of a similar situation and how best to handle it please?
Hi There,

I am trying to separate out the Account field billingstreet based upon carriage returns AKA Line Feed using a formula.  I have achieved this for commas in the text but cant quite get it to work for carriage return / line feed, apologies in adavance for the formulas:

This first part in all formulas is to decide if the billingstreet contains commas or carriage returns/line feed.
 
IF( 
CONTAINS(BillingStreet, MID($Setup.Global__c.CRLF__c,3,1) )=TRUE

I had to first implement this useful very clever post: https://salesforce.stackexchange.com/questions/18909/find-line-break-in-formula-field

The following IF statements all come from separate text formula fields:
 
Get first line of text in billing street:
IF(
CONTAINS(BillingStreet,   MID($Setup.Global__c.CRLF__c,3,1)  )=TRUE,TRIM(LEFT( BillingStreet ,(FIND(MID($Setup.Global__c.CRLF__c,3,1), BillingStreet))-1 )),
TRIM(LEFT( BillingStreet ,(FIND(",", BillingStreet))-1 ))
)

Get 2nd line of text in billing street:
IF( 
CONTAINS(BillingStreet, MID($Setup.Global__c.CRLF__c,3,1) )=TRUE,
MID(BillingStreet,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet)+1,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet)+1)-1-FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet)),
TRIM(MID(BillingStreet,FIND(",",BillingStreet)+1,FIND(",",BillingStreet,FIND(",",BillingStreet)+1)-1-FIND(",",BillingStreet)))
)

Get 3rd line of text in billingstreet:
IF( 
CONTAINS(BillingStreet, MID($Setup.Global__c.CRLF__c,3,1) )=TRUE, 
TRIM(LEFT(MID(BillingStreet,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet)+1)+1,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet)+1)-1-FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet))),FIND(MID($Setup.Global__c.CRLF__c,3,1),MID(BillingStreet,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet)+1)+1,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet)+1)-1-FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet))))-1)), 

TRIM(LEFT(MID(BillingStreet,FIND(",",BillingStreet,FIND(",",BillingStreet)+1)+1,FIND(",",BillingStreet,FIND(",",BillingStreet,FIND(",",BillingStreet)+1)-1-FIND(",",BillingStreet))),FIND(",",MID(BillingStreet,FIND(",",BillingStreet,FIND(",",BillingStreet)+1)+1,FIND(",",BillingStreet,FIND(",",BillingStreet,FIND(",",BillingStreet)+1)-1-FIND(",",BillingStreet))))-1)) 
)

Get 4th line of text in billingstreet:
IF( 
CONTAINS(BillingStreet, MID($Setup.Global__c.CRLF__c,3,1) )=TRUE, 
TRIM(MID(BillingStreet,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet)+1))+1)+1,LEN(BillingStreet)-FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet,FIND(MID($Setup.Global__c.CRLF__c,3,1),BillingStreet)+1))+1)+1)),


TRIM(MID(BillingStreet,FIND(",",BillingStreet,FIND(",",BillingStreet,FIND(",",BillingStreet,FIND(",",BillingStreet)+1))+1)+1,LEN(BillingStreet)-FIND(",",BillingStreet,FIND(",",BillingStreet,FIND(",",BillingStreet,FIND(",",BillingStreet)+1))+1)+1))
)

These formulas work fine, except when the billingstreet only contains anything other than 4 lines of text, please see images for how the formulas display with:

1 line of text with carriage return
2 lines of text with carriage return
3 lines of text with carriage return
4 lines of text with carriage return

Thank you for even your time to look at this,
Richard
How displays with only 1 line in billingstreetHow displays with only 2 lines in billingstreetHow displays with only 3 lines in billingstreetHow displays with 4 lines in billingstreetHow displays with 5 lines in billingstreet
Hi There,

I'm having trouble getting CSS tags to work in a screen flow.  I've got the Flow itself to work (dispalying 3 fields from all Opportunities associated with an Account) but the formatting displays like this on the screen element, (i.e. it is not picking up the CSS tags):
 
<style>

table, th, td {

 border: 1px solid black;

}

</style>

<table>

<tr>

<th>Opp name</th>

<th>Stage</th>

<th>Type</th>

</tr>

<tr>

<td>Test Opp 2</td><td>Test Opp 2</td><td>Existing Customer - Upgrade</td>

</tr>

<tr>

<td>Test Opp 1</td><td>Test Opp 1</td><td>Existing Customer - Replacement</td>

</tr>

<tr>

<td>Dickenson Mobile Generators</td><td>Dickenson Mobile Generators</td><td>New Customer</td>

</tr>

</table>

Any help would be greatly appreciated.