• Dustin Moore 22
  • NEWBIE
  • 10 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hello, 

I have a custom LWC built primarly for use in a lightening community. I need to find the correct attribute to show/hide this component based on a record type of the Account Object. 

Record Types:
Household: Hide
Office: Show
State Office: Show

Additionally, I need to be able to show/hide the options in  based on the record types

Record Types Show Options:
HouseHold: N/A component not shown on page
Office: Show Option 1 and 2
State Office: Show options 3 and 4

Please see the code below, and any help would be greatly appericated!

XML:
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="DocGenSelector">
    <apiVersion>46.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
      <target>lightning__AppPage</target>
      <target>lightning__RecordPage</target>
      <target>lightning__HomePage</target>
      <target>lightningCommunity__Page</target>
    </targets>
</LightningComponentBundle>

HTML:
<template>
  <div style="position:relative;" class="wrapper">
    Select a report: 
    <select class="doc-gen-selector">
      <option value="eyJhY3Rpb25JZCI6ImEwMDM2MDAwMDBQYmgwTUFBUiIsImxpbmtGaWVsZElkIjoiSWQifQ==">VOCA Office Last Quarter</option>
      <option value="eyJhY3Rpb25JZCI6ImEwMDFSMDAwMDBkbE1KU1FBMiIsImxpbmtGaWVsZElkIjoiSWQifQ==">MVS Office YTD</option>
      <option value="eyJhY3Rpb25JZCI6ImEwMDFSMDAwMDBkbE1KU1FBMiIsImxpbmtGaWVsZElkIjoiSWQifQ==">VOCA State Last Quarter</option>
      <option value="eyJhY3Rpb25JZCI6ImEwMDFSMDAwMDBkbE1KU1FBMiIsImxpbmtGaWVsZElkIjoiSWQifQ==">MVS State YTD</option>
    </select>
    <button title="Run the selected action" type="button" class="slds-button slds-button_brand" style="margin-left: 1rem" onclick={runButtonClicked}>Run</button>
    <div class="popup">
      <button class="close-popup" onclick={closePopup}>&#215;</button>
      <div class="popup-body">
        <iframe class="iframe"></iframe>
      </div>
    </div>
  </div>
</template>


​​​​​​​

 
Hello, 

I am needing some assistnace writing a batched apex class that will update contacts meeting certin criteria, and update a picklist based on a date field. 

Example:

Get all contacts where record type id = XXXXXXX & Latest_Service_Date__c != (not equal) NULL

If Latest_Service_Date__c is ≥ Date(TODAY - 90) update Picklist_Field__c = TRUE

else If Latest_Service_Date__c is < Date(TODAY - 90) update Picklist_Field__c = FALSE


Date(TODAY - 90) meaning if the Latest_Service_Date__c is in the past 90 days. 

Would be glad to read through any articles or material, I just have not been successful in finding anything helpful thus far. 
Hello, 

I am needing some assistnace writing a batched apex class that will update contacts meeting certin criteria, and update a picklist based on a date field. 

Example:

Get all contacts where record type id = XXXXXXX & Latest_Service_Date__c != (not equal) NULL

If Latest_Service_Date__c is ≥ Date(TODAY - 90) update Picklist_Field__c = TRUE

else If Latest_Service_Date__c is < Date(TODAY - 90) update Picklist_Field__c = FALSE


Date(TODAY - 90) meaning if the Latest_Service_Date__c is in the past 90 days. 

Would be glad to read through any articles or material, I just have not been successful in finding anything helpful thus far.