-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
14Questions
-
6Replies
Knowledge Article Mail Merge Fields
I am trying to send out notifications when certain knowledge articles are updated.
How do I include Knowledge Article fields in a Mail Merge Template?
Using the salesforce.com/servlet/servlet.SForceMailMerge?id= link doesn't seem to work with knowledge_kav IDs.
-
- ScottB3
- October 29, 2022
- Like
- 0
- Continue reading or reply
Add Related List Action Button "Send Engage Email" to custom Lead List LWC
The out of the box related list view doesn't work for what I need to have displayed for leads as I cannot filter it and only a limited amount of results show.
I have created an LWC which shows all of the information that I need to have displayed, but I don't know how to include the button to "Send Engage Email" Having this button is absolutely critical to what my team needs.
-
- ScottB3
- November 10, 2020
- Like
- 0
- Continue reading or reply
Use Matching Rules in Apex to find all leads which match an account
The problem is that the layout is not conducive to the work that my company needs to do and I need to create a custom component which uses the same matching logic but displays in a more traditional table format.
I cannot find any documentation on where to start on how to utilize the matching rules engine in Apex code to get a list of leads that I can then manipulate into our needed format.
-
- ScottB3
- October 02, 2020
- Like
- 0
- Continue reading or reply
SOQL Retrieve most recent CampaignMember for a set of leads
Since there may be more than 100 leads in the set, I am trying to write a single SOQL query that will return only the CampaignMember Id with the most recent CreatedDate for each lead, rather than put a query inside of a for-loop
I need something along the lines of this, but with the actual ID of the CampaignMember object instead of the count.
SELECT count(Id), LeadID, max(CreatedDate) FROM CampaignMember WHERE LeadID IN :setOfLeads GROUP BY LeadID
-
- ScottB3
- September 28, 2020
- Like
- 0
- Continue reading or reply
Is there any way to get rich text into a lightning datatable
The requirements have just changed and I now need to change some of my fields to rich text. As far as I can figure out, there is no way to do this.
I see in the documentation that there is the idea of Creating Custom Data Types, but can't figure it out.
Does anyone know how I can incorporate a rich text field in a lightning-datatable?
-
- ScottB3
- October 04, 2019
- Like
- 0
- Continue reading or reply
Can a Lightning Web Component know if it is in a Standard or Console App
I need this because I have two separate apps using the same component, one for fully licensed users and another for those only with Company Community.
If console, I need to use Navigation.Mixin, for Standard, I just open a new window.
I've tried calling UserInfo.getUiThemeDisplayed() but I just get Theme4d returned regardless of which app I'm using.
-
- ScottB3
- August 22, 2019
- Like
- 0
- Continue reading or reply
Get available options from lightning:inputfield
Is there any way of getting the number of options from that field, or does the Locker Service completely prevent me from doing anything useful?
<lightning:recordEditForm objectApiName="Case" aura:id="caseCreateForm"> <lightning:inputField fieldName="Service_Area__c" aura:id="Service_Area__c" onchange="{!c.checkForOneOption}"/> </lightning:recordEditForm>
In my onchange, I am trying to find how many options are in the field. I cannot seem to figure out how to figure out to access anything though as it seems the Locker Service is preventing me from finding anything.
-
- ScottB3
- February 22, 2019
- Like
- 0
- Continue reading or reply
Find all objects that are tracked
Is it possible to find all objects that have feed tracking enabled on them? I'm basically trying to find all objects which can be followed.
-
- ScottB3
- January 26, 2019
- Like
- 0
- Continue reading or reply
Trouble returning a Map from the lightning component controller to helper.js
The Map is successfully created in the controller as I can see the values in the debug logs.
However, when I call response.getReturnValue(), it just says that the value is [object Object] and I can't do anything with it. I see no values, the response.getReturnValue().length is 0.
If I return a string instead of a map, it works as would be expected.
Component
<aura:component implements="flexipage:availableForAllPageTypes,force:hasRecordId" access="global" controller="WFS_ObjectsIFollowController" > <aura:attribute name="recordId" type="String" /> <aura:attribute name="targetFields" type="Object"/> <aura:attribute name="recordError" type="String"/> <aura:attribute name="followedObjectsCount" type="Integer" default="0"/> <aura:attribute name="parentObjects" type="Map"/> <force:recordData aura:id="recordLoader" recordId="{!v.recordId}" layoutType="FULL" targetFields="{!v.targetFields}" targetError="{!v.recordError}" recordUpdated="{!c.recordUpdated}" fields="Id" mode="VIEW"/> <article class="slds-card "> <div class="slds-card__body slds-card__body_inner"> <aura:if isTrue="true"> <div class="slds-region_narrow"> Size = {! v.followedObjectsCount } </aura:if> </div> </div> </article> </aura:component>
Controller
({ recordUpdated : function(component, event, helper) { var changeType = event.getParams().changeType; if (changeType === "ERROR") { /* handle error; do this first! */ console.log("Error: ");} else if (changeType === "LOADED") { /* handle record load */ console.log("*** In the controller"); helper.getData(component, event, changeType) } else if (changeType === "REMOVED") { /* handle record removal */ console.log("Removed: ");} else if (changeType === "CHANGED") { /* handle record change */ helper.getData(component, event, changeType) } } })
Helper
({ getData : function(component, event, cType) { console.log("In the WFS_Objects_I_FollowHelper.js function"); var action = component.get('c.getObjectsIFollow'); action.setCallback(this, function(response) { var state = response.getState(); if(state === "SUCCESS"){ alert(response.getReturnValue()); component.set('v.parentObjects', response.getReturnValue()); component.set('v.followedObjectsCount', response.getReturnValue().length); console.log("Objects Returned: " + response.getReturnValue().length); }else { console.log("RESPONSE FAILURE"); } }); $A.enqueueAction(action); } })Apex Controller
public class WFS_ObjectsIFollowController { @AuraEnabled public static Map<String, String> getObjectsIFollow(){ List<Case> followedCases; Map<String, String> parentObjects = new Map<String, String>(); String userId = UserInfo.getUserId(); String soql = 'SELECT Id, Subject FROM Case WHERE Id IN (SELECT ParentId FROM EntitySubscription WHERE SubscriberId = :userId)'; followedCases = Database.query( soql ); for ( Case parent : followedCases ){ String parentId = parent.Id; String caseSubject = parent.Subject; parentObjects.put(parentId, caseSubject); System.debug('*** OBJECTS I FOLLOW - ' + parentId + ' - ' + caseSubject); } System.debug('Parent Objects --- ' + parentObjects); //THIS LINE PRINTS WITH THE CORRECT INFO return parentObjects; } }
-
- ScottB3
- January 24, 2019
- Like
- 0
- Continue reading or reply
Create a custom button which opens the Manage Contact Roles page
I cannot figure out where the page is located that opens in the modal box when the standard button is used.
-
- ScottB3
- January 22, 2019
- Like
- 0
- Continue reading or reply
Best way to choose and track modules installed for a customer
My organization has a limited number of products (20) for which we currently use Salesforce CPQ.
After a customer is signed, we then have thousands of modules which the implementation team needs to sort through to find which are most applicable to the customers needs. These can be categorized by things like geography, feature set, language (customer needs the Ireland, China and US modules that apply to widgets, gizmos and dangles and we need it in Irish, Mandarin and American English)
Once the implementation team decides which modules to use, they then need to be able to associate the chosen module configuration to the customer's account.
These aren't exactly products, and they aren't sold individually. They're just pre-designed software modules to add to an overall configuration.
I'm looking for the best way to implement this which will give me something similar to the Salesforce AppExchange where you can multi-select different attributes based on metadata and narrow down your search to the appropriate modules.
Finally, I would need to be able to associate related objects to these modules such as implementation instructions, requirements, etc.
-
- ScottB3
- January 02, 2019
- Like
- 0
- Continue reading or reply
Custom search across dependent fields
The dropdowns are used to narrow down the type of request that a customer is trying to submit. The problem is that we have around 100 potential options and it can be very difficult at times to find the appropriate choice.
Is it possible to create a search function that would display alongside the dropdowns which would search those fields and display possible selections? Ideally, it would show the best options and if one were clicked it would fill in the dropdowns with the selection chosen.
This would preferably be done in lightning as we are kicking off our migration, but a standard visual force page would be welcome in the meantime as the switch will likely take a while.
-
- ScottB3
- February 02, 2018
- Like
- 0
- Continue reading or reply
Invalid Identifier when using ConnectApi to add a comment to a case feed
When I run this, I get the error
ConnectApi.ConnectApiException: Invalid identifier: 5003B000002o1FfQAI
Class.ConnectApi.ChatterFeeds.postCommentToFeedElement: line 674, column 1
Case salesforceCase; createSFCase(salesforceCase); //this works correctly and retrieving the Id gives me a value matching the system ConnectApi.Comment comment = ConnectApi.ChatterFeeds.postCommentToFeedElement(null, salesforceCase.Id, 'comment text' );
-
- ScottB3
- October 23, 2017
- Like
- 0
- Continue reading or reply
Trying to get a pageBlockSection to show/hide based upon the value of an inputField picklist
I cannot seem to get the reRender function to work and am at a loss as to why.
Here is the code that I am using.
<apex:pageBlockSection title="Case Type Selection" collapsible="false" columns="1" rendered="{!isChangeRequest == false && contains(lower($Profile.Name),'community') == false}"> <apex:repeat value="{!$ObjectType.Case.FieldSets.Standard_Case_Switcher_Fields}" var="f"> <apex:inputField value="{!Case[f.fieldPath]}" required="(f.required, f.dbrequired)" rendered="true"> <apex:actionSupport event="onChange" reRender="acInfo" immediate="true"/> </apex:inputField> </apex:repeat> </apex:pageBlockSection> <apex:pageBlockSection title="Account and Contact Info" collapsible="false" columns="1" rendered="{!IF(contains(Case.Service_Area__c, 'Chg Req'), true, false)}" id="acInfo"> <apex:repeat value="{!$ObjectType.Case.FieldSets.Standard_Case_Account_Contact_Fields}" var="f"> <apex:inputField value="{!Case[f.fieldPath]}" required="(f.required, f.dbrequired)"/> </apex:repeat> </apex:pageBlockSection>
-
- ScottB3
- January 12, 2017
- Like
- 0
- Continue reading or reply
Use Matching Rules in Apex to find all leads which match an account
The problem is that the layout is not conducive to the work that my company needs to do and I need to create a custom component which uses the same matching logic but displays in a more traditional table format.
I cannot find any documentation on where to start on how to utilize the matching rules engine in Apex code to get a list of leads that I can then manipulate into our needed format.
- ScottB3
- October 02, 2020
- Like
- 0
- Continue reading or reply
SOQL Retrieve most recent CampaignMember for a set of leads
Since there may be more than 100 leads in the set, I am trying to write a single SOQL query that will return only the CampaignMember Id with the most recent CreatedDate for each lead, rather than put a query inside of a for-loop
I need something along the lines of this, but with the actual ID of the CampaignMember object instead of the count.
SELECT count(Id), LeadID, max(CreatedDate) FROM CampaignMember WHERE LeadID IN :setOfLeads GROUP BY LeadID
- ScottB3
- September 28, 2020
- Like
- 0
- Continue reading or reply
Is there any way to get rich text into a lightning datatable
The requirements have just changed and I now need to change some of my fields to rich text. As far as I can figure out, there is no way to do this.
I see in the documentation that there is the idea of Creating Custom Data Types, but can't figure it out.
Does anyone know how I can incorporate a rich text field in a lightning-datatable?
- ScottB3
- October 04, 2019
- Like
- 0
- Continue reading or reply
Trouble returning a Map from the lightning component controller to helper.js
The Map is successfully created in the controller as I can see the values in the debug logs.
However, when I call response.getReturnValue(), it just says that the value is [object Object] and I can't do anything with it. I see no values, the response.getReturnValue().length is 0.
If I return a string instead of a map, it works as would be expected.
Component
<aura:component implements="flexipage:availableForAllPageTypes,force:hasRecordId" access="global" controller="WFS_ObjectsIFollowController" > <aura:attribute name="recordId" type="String" /> <aura:attribute name="targetFields" type="Object"/> <aura:attribute name="recordError" type="String"/> <aura:attribute name="followedObjectsCount" type="Integer" default="0"/> <aura:attribute name="parentObjects" type="Map"/> <force:recordData aura:id="recordLoader" recordId="{!v.recordId}" layoutType="FULL" targetFields="{!v.targetFields}" targetError="{!v.recordError}" recordUpdated="{!c.recordUpdated}" fields="Id" mode="VIEW"/> <article class="slds-card "> <div class="slds-card__body slds-card__body_inner"> <aura:if isTrue="true"> <div class="slds-region_narrow"> Size = {! v.followedObjectsCount } </aura:if> </div> </div> </article> </aura:component>
Controller
({ recordUpdated : function(component, event, helper) { var changeType = event.getParams().changeType; if (changeType === "ERROR") { /* handle error; do this first! */ console.log("Error: ");} else if (changeType === "LOADED") { /* handle record load */ console.log("*** In the controller"); helper.getData(component, event, changeType) } else if (changeType === "REMOVED") { /* handle record removal */ console.log("Removed: ");} else if (changeType === "CHANGED") { /* handle record change */ helper.getData(component, event, changeType) } } })
Helper
({ getData : function(component, event, cType) { console.log("In the WFS_Objects_I_FollowHelper.js function"); var action = component.get('c.getObjectsIFollow'); action.setCallback(this, function(response) { var state = response.getState(); if(state === "SUCCESS"){ alert(response.getReturnValue()); component.set('v.parentObjects', response.getReturnValue()); component.set('v.followedObjectsCount', response.getReturnValue().length); console.log("Objects Returned: " + response.getReturnValue().length); }else { console.log("RESPONSE FAILURE"); } }); $A.enqueueAction(action); } })Apex Controller
public class WFS_ObjectsIFollowController { @AuraEnabled public static Map<String, String> getObjectsIFollow(){ List<Case> followedCases; Map<String, String> parentObjects = new Map<String, String>(); String userId = UserInfo.getUserId(); String soql = 'SELECT Id, Subject FROM Case WHERE Id IN (SELECT ParentId FROM EntitySubscription WHERE SubscriberId = :userId)'; followedCases = Database.query( soql ); for ( Case parent : followedCases ){ String parentId = parent.Id; String caseSubject = parent.Subject; parentObjects.put(parentId, caseSubject); System.debug('*** OBJECTS I FOLLOW - ' + parentId + ' - ' + caseSubject); } System.debug('Parent Objects --- ' + parentObjects); //THIS LINE PRINTS WITH THE CORRECT INFO return parentObjects; } }
- ScottB3
- January 24, 2019
- Like
- 0
- Continue reading or reply