-
ChatterFeed
-
2Best Answers
-
1Likes Received
-
0Likes Given
-
18Questions
-
11Replies
Add another LWC component to a LWC component
I have created two LWC component and in my prop.html I want to add lWC component.
<template>
<ligthning-input label="percentage" type="number" min="0"
max="100" value={percentage} onchange={changepercent}></ligthning-input>
<c-lwc percentage={percentage}></c-lwc>
</template>
When I try to push this to my scratch org I am getting the following error
I am new to LWC
-
- sevindu
- January 08, 2020
- Like
- 0
- Continue reading or reply
Creating CampaignMembers from Task when RelatedTo is a Campaign
Happy Friday All!
Our AEs don't always remeber to add CampaignMembers when they create Tasks related to the Campaign. To save the AEs and kepp marketing happy it was decided that we could use an Apex Trigger to check if the Contact was already a CampaignMember and add if they were not.
I think my code is close, but it is not adding the CampaignMember. Can someone please take a look at my code to show me what I missing?
Kind regards,
Robert.
trigger Task_to_CampaignMember on Task (after insert, before update) { //WhoId is ContactId; //WhatId is CampaignId; List<ID> WhoIds = new List<ID>(); List<String> prStr = new List<String>(); List<CampaignMember> newList = new List<CampaignMember>(); for(Task Tsk: Trigger.new){ String WhtId = Tsk.WhatId; String CmpPfx = WhtId.substring(0,3); if(CmpPfx == '701') //'701' Prefix is Campaign { prStr.add(Tsk.WhatId); } } Map<String,Id> cmMap = new Map<String,ID>(); for(CampaignMember cm1 :[select id,CampaignId,ContactId from CampaignMember where CampaignId IN: prStr]) { cmMap.put(cm1.CampaignId,cm1.Id); } for(Task Tsk: Trigger.new){ if(Tsk.WhatId!=Null) { CampaignMember cm = new CampaignMember(CampaignId=Tsk.WhatId,ContactId=Tsk.Whoid,Status='Responded'); newList.add(cm); } } if(newList.size()==0) { insert newList; } }
-
- Robert Wambold 10
- August 23, 2019
- Like
- 0
- Continue reading or reply
Lightning Scheduler for the external web page
I have setup all the things given here (https://help.salesforce.com/articleView?id=ls_set_up_inbound.htm&type=5), but still I can't see anything in my external website. I guess, I'm confused with external page for an inbound scheduling flow (Which I created in salesforce) and Inbound Scheduling Flow (Which is in my external site).
But not sure what I missed. If would be great if anyone help me on this.
-
- sfdcDeveloper 12
- July 12, 2019
- Like
- 0
- Continue reading or reply
Event Scheduling App
Bascially it will be added on my website and from there customers can schedule meeting with my agents based on availability. I also need to sync these meeting with my office 365.
I have couple of products in mind like: Calendy, Salesforce Lightning scheduler, Sumo Scheduler.
If anyone has experience with any of these or any other scheduling app please let me know how is the product.
-
- sfdcDeveloper 12
- July 08, 2019
- Like
- 0
- Continue reading or reply
How to replace the default live chat icon with the custom image in the website
I'm not able to find the correct place where I need to change the icon. I tried to update embedded_svc.settings.defaultMinimizedTex but it update the highlighted part in image. It's even not taking the image of chat button. Not sure from where to replace the icon.
<img id="liveagent_button_online_5730O000000byoz" style="display: none; border: 0px none; cursor: pointer" onclick="liveagent.startChat('5730O000000byoz')" src="https://saasdeveloper-developer-edition.ap7.force.com/liveAgent/resource/1555073074000/chat" /><div id="liveagent_button_offline_5730O000000byoz" style="display: none;"><!-- Offline Chat Content --></div><script type="text/javascript"> if (!window._laq) { window._laq = []; } window._laq.push(function(){liveagent.showWhenOnline('5730O000000byoz', document.getElementById('liveagent_button_online_5730O000000byoz')); liveagent.showWhenOffline('5730O000000byoz', document.getElementById('liveagent_button_offline_5730O000000byoz')); });</script>
-
- sfdcDeveloper 12
- April 15, 2019
- Like
- 0
- Continue reading or reply
shift tracking feature in salesforce
-
- sfdcDeveloper 12
- April 01, 2019
- Like
- 0
- Continue reading or reply
Lightning Experience Specialist Superbadge #6
-
- sfdcDeveloper 12
- December 13, 2017
- Like
- 0
- Continue reading or reply
Error in continous integration using Salesforce DX
NARENDER@NARENDER-PC MINGW64 ~/desktop/SalesforceDX
$ sfdx force:auth:jwt:grant --clientid ${CLIENT_ID} --jwtkeyfile ${JWT_KEY_FILE} --username ${HUB_USERNAME} --setdefaultdevhubusername
! Unexpected argument C:Users/NARENDER/Documents/certificates/server.key
Not sure what I'm missing
-
- sfdcDeveloper 12
- December 02, 2017
- Like
- 0
- Continue reading or reply
Lightning Experience roll out specialist Error at Step 6
-
- sfdcDeveloper 12
- November 04, 2017
- Like
- 0
- Continue reading or reply
Need help to complete below trailhead challenge
Ensure that your Execution Details perspective contains the Stack Tree, Execution Stack, Source, and Execution Overview panels.
Even though I have added all these panels in my Execution details perspective.
-
- sfdcDeveloper 12
- March 24, 2017
- Like
- 0
- Continue reading or reply
Trailhead error on Wave mobile exploration
The 'Top Engineering Sales' lens does not appear to have the correct query. Please check the requirements and ensure everything is setup correctly.
I have completed each and every thing asked in this module. I don't know if I'm missing anything.
-
- sfdcDeveloper 12
- January 29, 2017
- Like
- 0
- Continue reading or reply
Error in SOAP API Unit
Error 405 GET not supported
I'm not able to change GET method to POST method.
-
- sfdcDeveloper 12
- August 30, 2016
- Like
- 0
- Continue reading or reply
Handling Events with Client-Side Controllers not completed
"Challenge Not yet complete... here's what's wrong:
The 'PhoneNumberInput' client-side controller is not setting the phone param"
Below is my code:
<aura:component > <aura:attribute name="number" type="String" default="No Phone Number"/> <ui:outputText aura:id="phone" value="{!v.number}"/> <aura:handler event="c:PhoneNumberEvent" action="{!c.answer}"/> </aura:component>
<aura:component > <ui:inputPhone aura:id="phone" label="phone" /> <aura:registerEvent name="phone" type="c:PhoneNumberEvent"/> <ui:button label="Show Phone" /> </aura:component>
<aura:event type="APPLICATION" description="Event template"> <aura:attribute name="phone" type="String"/> </aura:event>
<aura:application > <c:PhoneNumberInput /> <c:PhoneNumberOutput /> </aura:application>
Thanks in advance for help
-
- sfdcDeveloper 12
- April 03, 2016
- Like
- 0
- Continue reading or reply
Didn't receive any mail after completing challenge
-
- sfdcDeveloper 12
- January 26, 2016
- Like
- 0
- Continue reading or reply
Apex REST Callouts
Below is my test Class:
@isTest private class AnimalLocatorTest{ @isTest static void AnimalLocatorMock1() { Test.setMock(HttpCalloutMock.class, new AnimalLocatorMock()); string result = AnimalLocator.getAnimalNameById(0); String expectedResult = 'dog'; System.assertEquals(result,expectedResult ); } }My Mock Class:
@isTest global class AnimalLocatorMock implements HttpCalloutMock { // Implement this interface method global HTTPResponse respond(HTTPRequest request) { // Create a fake response HttpResponse response = new HttpResponse(); response.setHeader('Content-Type', 'application/json'); response.setBody('{"name": ["dog"]}'); response.setStatusCode(200); return response; } }
My Rest Class:
public class AnimalLocator{ public string getAnimalNameById(Integer id){ Http http = new Http(); HttpRequest request = new HttpRequest(); request.setEndpoint('https://th-apex-http-callout.herokuapp.com/animals/:'+id); request.setMethod('GET'); HttpResponse response = http.send(request); String ret; if(response.getStatusCode() == 200){ Map<String, Object> results = (Map<String, Object>) JSON.deserializeUntyped(response.getBody()); List<Object> name = (List<Object>) results.get('name'); for (Object animal: name) { ret = (String)animal; } } return ret; }
-
- sfdcDeveloper 12
- January 20, 2016
- Like
- 1
- Continue reading or reply
Create a Lightning App using Custom Components
"Challenge not yet complete... here's what's wrong:
The 'My Data' Lightning App was not found."
I already created Lightning App and added custom component to that app
-
- sfdcDeveloper 12
- October 20, 2015
- Like
- 0
- Continue reading or reply
Creating Global Quick Actions
To set predefined field values:
1. Click the name of an action in the Buttons, Links, and Actions list or the Global Actions list.
2. On the action detail page, click New in the Predefined Field Values list.
3. Select the field you want to predefine a value for.
4. Specify the value for the field.
5. Click Save.
Not able to found the second step. Can anyone please help me
-
- sfdcDeveloper 12
- May 29, 2015
- Like
- 0
- Continue reading or reply
Controlling Access to Fields
The Marketing Coordinator and Account Manager both require access to view and update Account Records, but only the Account Manager should be able to see and edit certain fields. Specifically, only the Account Manager should be able to see and edit the Rating field. The Marketing Coordinator should not be able to see or edit the Rating field. Create one profile and one permission set with the appropriate field-level security to solve for this use case.The profile must be named 'Basic Account User' and result in an API name of 'Basic_Account_User'. It should use the 'Salesforce' user license type.
The permission set must be named ‘Account Rating’ and result in an API name of 'Account_Rating'.
-
- sfdcDeveloper 12
- April 03, 2015
- Like
- 0
- Continue reading or reply
Display field name in VF page
I have a requirment where I need to create a VF page which will display all field name present in the object when We select the object in our VF page.
Can any one give me an idea on this as I am new to SFDC development.
Thanks
-
- sfdcDeveloper 12
- February 18, 2015
- Like
- 0
- Continue reading or reply
Show result from google search
Thank you
-
- sfdcDeveloper 12
- February 18, 2015
- Like
- 0
- Continue reading or reply
Apex REST Callouts
Below is my test Class:
@isTest private class AnimalLocatorTest{ @isTest static void AnimalLocatorMock1() { Test.setMock(HttpCalloutMock.class, new AnimalLocatorMock()); string result = AnimalLocator.getAnimalNameById(0); String expectedResult = 'dog'; System.assertEquals(result,expectedResult ); } }My Mock Class:
@isTest global class AnimalLocatorMock implements HttpCalloutMock { // Implement this interface method global HTTPResponse respond(HTTPRequest request) { // Create a fake response HttpResponse response = new HttpResponse(); response.setHeader('Content-Type', 'application/json'); response.setBody('{"name": ["dog"]}'); response.setStatusCode(200); return response; } }
My Rest Class:
public class AnimalLocator{ public string getAnimalNameById(Integer id){ Http http = new Http(); HttpRequest request = new HttpRequest(); request.setEndpoint('https://th-apex-http-callout.herokuapp.com/animals/:'+id); request.setMethod('GET'); HttpResponse response = http.send(request); String ret; if(response.getStatusCode() == 200){ Map<String, Object> results = (Map<String, Object>) JSON.deserializeUntyped(response.getBody()); List<Object> name = (List<Object>) results.get('name'); for (Object animal: name) { ret = (String)animal; } } return ret; }
-
- sfdcDeveloper 12
- January 20, 2016
- Like
- 1
- Continue reading or reply
Add another LWC component to a LWC component
I have created two LWC component and in my prop.html I want to add lWC component.
<template>
<ligthning-input label="percentage" type="number" min="0"
max="100" value={percentage} onchange={changepercent}></ligthning-input>
<c-lwc percentage={percentage}></c-lwc>
</template>
When I try to push this to my scratch org I am getting the following error
I am new to LWC
- sevindu
- January 08, 2020
- Like
- 0
- Continue reading or reply
Delete Contact but update Account record
I need help with a deleing Contacts from an Account and updating the Account. If I have multiple Contacts on an Account and one of the Contacts is checked as the primary then the checkbox on the Account should be checked. If a contact is deleted I need to detemine if it was the Primary. So if a non primary Contact is deleted then the checkbox on the Account remains checked. But if the Contact that is flagged as the primary is deleted then i need checkbox on teh Account to be unchecked.
Thanks
- Rick Tyler
- August 23, 2019
- Like
- 0
- Continue reading or reply
Creating CampaignMembers from Task when RelatedTo is a Campaign
Happy Friday All!
Our AEs don't always remeber to add CampaignMembers when they create Tasks related to the Campaign. To save the AEs and kepp marketing happy it was decided that we could use an Apex Trigger to check if the Contact was already a CampaignMember and add if they were not.
I think my code is close, but it is not adding the CampaignMember. Can someone please take a look at my code to show me what I missing?
Kind regards,
Robert.
trigger Task_to_CampaignMember on Task (after insert, before update) { //WhoId is ContactId; //WhatId is CampaignId; List<ID> WhoIds = new List<ID>(); List<String> prStr = new List<String>(); List<CampaignMember> newList = new List<CampaignMember>(); for(Task Tsk: Trigger.new){ String WhtId = Tsk.WhatId; String CmpPfx = WhtId.substring(0,3); if(CmpPfx == '701') //'701' Prefix is Campaign { prStr.add(Tsk.WhatId); } } Map<String,Id> cmMap = new Map<String,ID>(); for(CampaignMember cm1 :[select id,CampaignId,ContactId from CampaignMember where CampaignId IN: prStr]) { cmMap.put(cm1.CampaignId,cm1.Id); } for(Task Tsk: Trigger.new){ if(Tsk.WhatId!=Null) { CampaignMember cm = new CampaignMember(CampaignId=Tsk.WhatId,ContactId=Tsk.Whoid,Status='Responded'); newList.add(cm); } } if(newList.size()==0) { insert newList; } }
- Robert Wambold 10
- August 23, 2019
- Like
- 0
- Continue reading or reply
date issue
I am running this below code:
Date d=Date.today();
system.debug('todyas date:'+d);
Datetime dt = (DateTime)d;
String dayOfWeek = dt.format('EEEE');
system.debug('day Of Week :'+dayOfWeek);
And got the debug log:
22:01:52:002 USER_DEBUG [2]|DEBUG|todyas date:2019-08-23 00:00:00
22:01:52:002 USER_DEBUG [5]|DEBUG|day Of Week :Thursday
but 23rd August 2019 is Friday.
Can any one tell me what is the issue?
- sujay Paul
- August 23, 2019
- Like
- 0
- Continue reading or reply
How to replace the default live chat icon with the custom image in the website
I'm not able to find the correct place where I need to change the icon. I tried to update embedded_svc.settings.defaultMinimizedTex but it update the highlighted part in image. It's even not taking the image of chat button. Not sure from where to replace the icon.
<img id="liveagent_button_online_5730O000000byoz" style="display: none; border: 0px none; cursor: pointer" onclick="liveagent.startChat('5730O000000byoz')" src="https://saasdeveloper-developer-edition.ap7.force.com/liveAgent/resource/1555073074000/chat" /><div id="liveagent_button_offline_5730O000000byoz" style="display: none;"><!-- Offline Chat Content --></div><script type="text/javascript"> if (!window._laq) { window._laq = []; } window._laq.push(function(){liveagent.showWhenOnline('5730O000000byoz', document.getElementById('liveagent_button_online_5730O000000byoz')); liveagent.showWhenOffline('5730O000000byoz', document.getElementById('liveagent_button_offline_5730O000000byoz')); });</script>
- sfdcDeveloper 12
- April 15, 2019
- Like
- 0
- Continue reading or reply
Error in SOAP API Unit
Error 405 GET not supported
I'm not able to change GET method to POST method.
- sfdcDeveloper 12
- August 30, 2016
- Like
- 0
- Continue reading or reply
Apex REST Callouts
Below is my test Class:
@isTest private class AnimalLocatorTest{ @isTest static void AnimalLocatorMock1() { Test.setMock(HttpCalloutMock.class, new AnimalLocatorMock()); string result = AnimalLocator.getAnimalNameById(0); String expectedResult = 'dog'; System.assertEquals(result,expectedResult ); } }My Mock Class:
@isTest global class AnimalLocatorMock implements HttpCalloutMock { // Implement this interface method global HTTPResponse respond(HTTPRequest request) { // Create a fake response HttpResponse response = new HttpResponse(); response.setHeader('Content-Type', 'application/json'); response.setBody('{"name": ["dog"]}'); response.setStatusCode(200); return response; } }
My Rest Class:
public class AnimalLocator{ public string getAnimalNameById(Integer id){ Http http = new Http(); HttpRequest request = new HttpRequest(); request.setEndpoint('https://th-apex-http-callout.herokuapp.com/animals/:'+id); request.setMethod('GET'); HttpResponse response = http.send(request); String ret; if(response.getStatusCode() == 200){ Map<String, Object> results = (Map<String, Object>) JSON.deserializeUntyped(response.getBody()); List<Object> name = (List<Object>) results.get('name'); for (Object animal: name) { ret = (String)animal; } } return ret; }
- sfdcDeveloper 12
- January 20, 2016
- Like
- 1
- Continue reading or reply
Controlling Access to Fields
The Marketing Coordinator and Account Manager both require access to view and update Account Records, but only the Account Manager should be able to see and edit certain fields. Specifically, only the Account Manager should be able to see and edit the Rating field. The Marketing Coordinator should not be able to see or edit the Rating field. Create one profile and one permission set with the appropriate field-level security to solve for this use case.The profile must be named 'Basic Account User' and result in an API name of 'Basic_Account_User'. It should use the 'Salesforce' user license type.
The permission set must be named ‘Account Rating’ and result in an API name of 'Account_Rating'.
- sfdcDeveloper 12
- April 03, 2015
- Like
- 0
- Continue reading or reply
Show result from google search
Thank you
- sfdcDeveloper 12
- February 18, 2015
- Like
- 0
- Continue reading or reply
Lookup field components
Are there UI components that handle lookup field selection, for example lookup from my custom object to an account? From experience this takes a lot of effort to implement and would seem like a very common use case. Maybe there is an open source version?
Thanks
- Daniel Rudman 5
- December 01, 2014
- Like
- 0
- Continue reading or reply