• Beto Carvalho 11
  • NEWBIE
  • 63 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 7
    Replies
I have a Visualforce email template based on Opportunity. In it I want to incorporate all the Opportunity Team Members whose Member Role = XYZ, say, "Sales Engineer". The following code works splendidly...
<b>Sales Engineers:</b>
     <apex:repeat value="{!relatedTo.OpportunityTeamMembers}" var="oppTeam">
          <apex:outputText rendered="{!oppTeam.TeamMemberRole ='Sales Engineer'}">
          {!oppTeam.Name}, 
          </apex:outputText>
     </apex:repeat>
Except that it (obviously) appends comma + space to each repeat, leaving a trailing ", " at the end:
 
Sales Engineers: Maggie Simpson, Krusty the Clown, 

Where I want:
 
Sales Engineers: Maggie Simpson, Krusty the Clown
 
(i.e. with no ", " at the end). There's probably more than one way to do this, but I've reached the end of my coding knowledge at this point. Ideas?
I'd like to find all Workflow Rules which run on Object X, are active, and e.g. trigger on create only. Using Tooling API I can get this far, of course:
Select ID, Name
From WorkflowRule
Where TableEnumOrId = 'Opportunity'
I'd like something like this (dream query):
Select ID, Name
From WorkflowRule
Where TableEnumOrId = 'Opportunity' AND metadata.triggerType = 'onCreateOnly' AND metadata.active = true
Of course I made up the above syntax (after TableEnumOrId = 'Opportunity'). 

Object = WorkflowRule
TableEnumOrId = 'Opportunity'
Metadata > triggerType = onCreateOnly
Metadata > active = true

Any way to run this query on Developer Console, Workbench REST Explorer or something of the sort?
Any formula ninjas out there that can think of a way to do this?

Use Case:
  • PICKLIST__c has values:
    • "Value A"
    • "Value B"
    • "Value C"
    • "Value D"
  • Create a formula field (DATE format): DATE_STAMP__c.
  • When user sets PICKLIST__c to "Value C", enter date on DATE_STAMP__c
This is done simply with a workflow rule and field update, I know. This is more of a learning excercise.

The logic would have to be something like:

if PICKLIST__c is set to "Value C", set to TODAY, otherwise do nothing

Problem 1: I can't think of a logic that would determine PICKLIST__c has just been set to "Value C", since PRIORVALUE doesn't work in formula fields.

Problem2: I can't think of a way to "do nothing" (one way would be just to refer the field back to itself, PICKLIST__c, but you can't refer a formula field to itself).
Anyone know how to reference an org's built-in SLDS icons in a formula (if possible at all). At the recent Lightning Tour I was told by a Salesforce presenter that it would be possible, but I can't figure out how.

Details:

Previous to Winter '17 one would have to upload SLDS components onto a Salesforce org as static resources in order to use them. Like this:

IF ( 
PricebookEntry.Product2.KGRenewal__Subscription__c = true, IMAGE("/resource/1488322284000/LDS_Icons/assets/icons/utility/like_60.png", "Yes", 15, 15), IMAGE("/resource/1488322284000/LDS_Icons/assets/icons/utility/dislike_60.png", "No", 15, 15)
)

In Winter '17 you can access SLDS directly using the $Asset global variable [release note (https://releasenotes.docs.salesforce.com/en-us/spring17/release-notes/rn_vf_asset_variable.htm)], but this necessitates the URLFOR() function, which is not usable (as far as I know) in a formula.
Anyone know how to reference an org's built-in SLDS icons in a formula (if possible at all). At the recent Lightning Tour I was told by a Salesforce presenter that it would be possible, but I can't figure out how.

Details:

Previous to Winter '17 one would have to upload SLDS components onto a Salesforce org as static resources in order to use them. Like this:

IF ( 
PricebookEntry.Product2.KGRenewal__Subscription__c = true, IMAGE("/resource/1488322284000/LDS_Icons/assets/icons/utility/like_60.png", "Yes", 15, 15), IMAGE("/resource/1488322284000/LDS_Icons/assets/icons/utility/dislike_60.png", "No", 15, 15)
)

In Winter '17 you can access SLDS directly using the $Asset global variable [release note (https://releasenotes.docs.salesforce.com/en-us/spring17/release-notes/rn_vf_asset_variable.htm)], but this necessitates the URLFOR() function, which is not usable (as far as I know) in a formula.
I'm stuck on the Modify the NewURLPolicyCondition Apex Class challenge: Modify the NewURLPolicyCondition Apex class you created in an earlier challenge and change its condition from any time in the past two days to the past week.

I completed the previous challenges in this section with ease but don't see any reference to "in the past two days" so I am not sure how to modify the condition "to the past week". 

Please help!
 
Hi there!

From one day to another, my Home tab has dissapear from all the apps for all the profiles (including System Admin). Does anybody has any idea of what could be happening and how to solve it?

Thanks a lot in advance!
When using the Salesforce Data Loader and trying to login with the oauth option. I get a blank screen. Why is that?

User-added image

 
  • April 27, 2016
  • Like
  • 2

Hello,

 

How can I write a SOQL statement with a clause "does not contain" ? I've tried this Carrier_ID__c not like '%TEST%' but it does not work. I want to use this SOQL for the dataloader to export the data. Please advise.

 

Thanks

Paul

 

  • July 11, 2013
  • Like
  • 0

Hi,

I am using Salesforce application Developer version.

 

I want to use the "Console" in a custom application.

 

I have used a console layout and have added the console tab to the custom application.

 

But for every profile the "Consile" tab is set as hidden which is not editable.

 

Can any body please tell me how to show console tab in the application?

 

Thanks in advance.

 

Regards,

Dinesh