This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* eslint-disable no-useless-escape */ | |
| /* eslint-disable radix */ | |
| /* eslint-disable consistent-return */ | |
| /* eslint-disable no-console */ | |
| import ID from '@salesforce/schema/SBQQ__Quote__c.Id'; | |
| import { fireEvent } from "c/pubsub"; | |
| import NAME_FIELD from '@salesforce/schema/Account.Name'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div class="slds-grid slds-wrap"> | |
| <div class="slds-col slds-size_1-of-1 slds-large-size_6-of-12 slds-p-horizontal--small"> | |
| <div class="slds-form-element slds-p-top_medium"> | |
| <label class="slds-form-element__label">Phone number<abbr class="slds-required" | |
| title="required">*</abbr></label> | |
| <div class="slds-form-element__control"> | |
| <span onkeypress={keyCheck} onchange={keyCheck}> | |
| <lightning-input-field data-req="required" data-address="phone" data-id="phone" field-name="Phone" | |
| variant="label-hidden"></lightning-input-field> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .error input { | |
| background-color: rgb(255, 255, 255); | |
| border-color: rgb(194, 57, 52); | |
| box-shadow: rgb(194, 57, 52) 0 0 0 1px inset; | |
| background-clip: padding-box; | |
| } | |
| .error { | |
| background-color: rgb(255, 255, 255); | |
| border-color: rgb(194, 57, 52); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class GoogleAPI { | |
| //Generic method to get GoogleAPIKey from Custom Label. | |
| public static String getAPIKey() { | |
| String api = Label.GoogleAPIKey; | |
| return api; | |
| } | |
| //Generic Http Callout Method |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div class="slds-grid slds-wrap"> | |
| <div class="slds-col slds-size_1-of-1 slds-medium-size_12-of-12 slds-large-size_12-of-12 slds-align_absolute-center"> | |
| <button class="slds-button slds-button_brand" onclick={handleCurrentLocation}>Get my current | |
| location</button> | |
| </div> | |
| </div> | |
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ServiceClass { | |
| public void sampleMethod(String accountIdParent) { | |
| // Define the Unit of Work instance. | |
| // Mention the objects in independent to dependent order. | |
| fflib_SObjectUnitOfWork uow = new fflib_SObjectUnitOfWork(new List<SObjectType> { Account.SObjectType, | |
| Contact.SObjectType, | |
| AccountContactRelation.SObjectType}); | |
| // Selector class | |
| AccountContactRelationSelector acsSelector = new AccountContactRelationSelector(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public without sharing class AccountSelector extends fflib_SObjectSelector { | |
| // super(false, false, false) - Constructor | |
| // 1st param -> includeFieldSetFields (Set to true if the Selector queries are to include Fieldset fields as well) | |
| // 2nd param -> enforceCRUD (To enforce object level permissions) | |
| // 3rd param -> enforceFLS (To enforece Field Level Security) | |
| public AccountSelector() { | |
| super(false, false, false); | |
| } | |
| // Define all the fields required |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void saveDocuments() { | |
| fflib_SObjectUnitOfWork uow = new fflib_SObjectUnitOfWork(new List<SObjectType> { SBQQ__Quote__c.SObjectType }); | |
| // pass your Domain class name to getTriggerEvent method of fflib_SObjectDomain. | |
| // Call disableAll() to disable all trigger contexts. | |
| // Call individual contexts if need to disable in that way -- disableBeforeInsert(), disableBeforeUpdate(), disableAfterUpdate() etc | |
| fflib_SObjectDomain.getTriggerEvent(Quotes.class).disableAll(); | |
| // Do DML only if the trigger context is disabled. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <template if:true={label}> | |
| <li data-index={index} style={hideSelectedPicklist} role="presentation" | |
| onclick={handleSelectPicklist} class="slds-listbox__item" aria-disabled="true"> | |
| <div class="slds-media slds-listbox__option slds-listbox__option_entity slds-listbox__option_has-meta" | |
| role="option"> | |
| <span class="slds-media__body"> | |
| <span class="slds-listbox__option-text slds-listbox__option-text_entity">{label}</span> | |
| </span> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class GooglePlacesAPI { | |
| //Method to make a Callout to Google Place API to get search predications based on input search string | |
| @AuraEnabled(cacheable=true) | |
| public static String getAddressSet(String searchText, Boolean isPersonal){ | |
| String result = null; | |
| system.debug('searchText is ' + searchText); | |
| try{ | |
| if(searchText != null) { | |
| String apiURL; | |
| // String endpoint = 'callout:Google_Places_API'+EncodingUtil.urlEncode(searchText, 'UTF-8') + '&key=' + getAPIKey(); |