• Tim Jones 71
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 5
    Replies
So I am attempting to use Lightning Card or Tile to display a small bit of data returned from a record via an Apex wire.
This is just read only with a link to click to the full record.
How do I display the data with a lable in a well spaced way.
Right now it bunches it all together on the left side of the component.
<p>Status: {status}</p>
<p>Start Date: <lightning-formatted-date-time value={start}></lightning-formatted-date-time></p>
 <p>End Date: <lightning-formatted-date-time value= {end}></lightning-formatted-date-time></p>     
 <p>All Registrations: {all}</p>
 <p>Eligable: {eligable}</p>
 <p>Redeemed: {redeemed}</p>
 <p>FY Registrations: {fy}</p>

User-added image
I am sure its something simple but I am stuck. Been trying to get this to work for a bit.
Business case
Use the User Id to find a single record of a custom object they own.
In this example the Loyalty group is owned by the community user.

Appex Class
public with sharing class groupCordinator {
    @AuraEnabled(cacheable = true)
    public static List<Loyalty_Group__c> getLoyaltyGroup(String recordId) {
        return [SELECT Name FROM Loyalty_Group__c WHERE OwnerId = :recordId LIMIT 1];
    }
}
Java Script
import { LightningElement, wire, api, track } from 'lwc';
import uId from '@salesforce/user/Id';
import getRecord from '@salesforce/apex/groupCordinator.getLoyaltyGroup';

export default class CurrentUser extends LightningElement {
  userId = uId;
  @api recordId
  @track loyaltyGroup;

  @wire(getRecord, {recordId: '$recordId'})
  loyaltyGroup({ error, data }) {
      if (data) {
          this.loyaltyGroup = data[0];
      } else if (error) {
          console.log('Something went wrong:', error);
      }
  }

  get groupName() {
      return this.loyaltyGroup?.Name;
  }

}
HTML
<template>
    <lightning-card title="Current U">
        <p>Current User Id : {userId}</p>
        <p>Group Name : {groupName}</p>
    </lightning-card>
</template>

In the community the Current User ID populates but the name does not.
And the console does not show an error


 
I have been researching this for days. Such a stron supporter of Salesforce and am completely in the dark as to wh this is so difficutl.

Business case, 
Experience Customer Community User has registered and now set theri passord. 
Upon login, I want to take them directly to a custome object detail page. 
I have tried this solution, but it does not work in a community.

https://help.salesforce.com/s/articleView?id=sf.flow_concepts_finish_override.htm&type=5

What am I missing here, this seems to be such a normal expected behavior that I am surprised you cannot just configure it.
 
I get this error
Error refreshing authentication token. Run "SFDX: Authorize an Org" to authorize your org again.

But when I run again it just keeps looping out.

Any idea what is going on? None of my other orgs are impacted. Just the ones with Multifactor turned on
Afternoon evryone,
Administrator making the move to developer so be easy on a rookie.
I have a class the implements Database.Batchable 
Start
In the start I am setting my scope with a SOQL query that gets all the members of a campaign where a logic check box is not set, scope
Execute
Now I am looping through those records and creating a new record in a form processor object that will be exposed in a public community for tokenized email responces
Loop through for cm :scope
Create a new form processeor record for each cm and add to list 
If the record count of list is >0 insert the list

Finish
Sending an email to the user letting them know the batch completed.

Problem
How can I check the logic box on the campaign after the member records are sent to batch

Code available if needed
I want to build flow page component to display a picklist based on record type filtering. 
Is there a component out there that does this already in the open source world?
 
I have a custom object in Salesforce that manages folks in a non profit staff role.
We want to prevent users from seeing their own record in this one object.
Guessing an appex trigger and sharing rule is the only way to do this.
Is that a correct assumption, and can someone point me in the direction of a good resource to do that?
I get this error
Error refreshing authentication token. Run "SFDX: Authorize an Org" to authorize your org again.

But when I run again it just keeps looping out.

Any idea what is going on? None of my other orgs are impacted. Just the ones with Multifactor turned on
Afternoon evryone,
Administrator making the move to developer so be easy on a rookie.
I have a class the implements Database.Batchable 
Start
In the start I am setting my scope with a SOQL query that gets all the members of a campaign where a logic check box is not set, scope
Execute
Now I am looping through those records and creating a new record in a form processor object that will be exposed in a public community for tokenized email responces
Loop through for cm :scope
Create a new form processeor record for each cm and add to list 
If the record count of list is >0 insert the list

Finish
Sending an email to the user letting them know the batch completed.

Problem
How can I check the logic box on the campaign after the member records are sent to batch

Code available if needed