Skip to main content Join us at TDX in San Francisco or on Salesforce+ on March 5-6 for the Developer Conference for the AI Agent Era. Register now.

#Developer Forums18 discussing

Hello community , 

 

I have 2 components - componentA(parent) and component B(child) 

 

when I pass data from parent to child , data is not visible. 

 

can anyone explain why ? 

 

component A html - 

 

<template>

    <lightning-card label="component A - parent">

        <p>Hi.I am component A.Parent</p>

        <c-component-B>

            {property1}="hi.I am component B.child component"

            {property2}="Welcome"

        </c-component-B>

    </lightning-card>

</template>   

 

component A js - 

 

import { LightningElement } from 'lwc';

 

export default class ComponentA extends LightningElement {

   

 

component B html - 

 

<template>

    <lightning-card>

       <p>message passed from {property1}</p>

       <p>message passed from {property2}</p>

    </lightning-card>

</template> 

 

component B js - 

 

import { LightningElement,api} from 'lwc';

 

export default class ComponentB extends LightningElement {

 

    @api property1;

    @api property2;

 

 

can anyone suggest something ?? 

 

#Developer Forums  #Trailhead Challenges  #Trailhead  #Data Management  #LWC  #LWC Development  #Sales Cloud  #Salesforce Developer  #Salesforce Admin

1 answer
  1. Today, 12:35 AM

     In LWC, to pass data from a parent to a child, you use the @api decorated properties in the child component and bind them using standard HTML attribute syntax

    (e.g., property1="value"), not the curly brace notation you’ve used. The curly braces {} are used for expressions or data binding within the same component, not for passing props directly. 

     

    component A html - 

     

    <template>    <lightning-card label="Component A - Parent">        <p>Hi. I am Component A. Parent</p>        <c-component-b property1="Hi. I am Component B. Child component" property2="Welcome"></c-component-b>    </lightning-card></template>
0/9000

Im trying to create record triggered flow, to trigger on a custom date field being updated in a Task object. Specifically a custom record type in Tasks.  Nothing seems to work.  

 

If I trigger on the field in question, the flow doesn't trigger at all.  If I use the custom record type, it does trigger, but does  not update my other custom object.  

 

There is a date field in this Task object, that we want to also update with the same value in another object.  

 the I/C Effective date actually lives in the Activity object, but is only able to be referenced here as part of the Task object.  There does seem to be some special relationship with Tasks, Events, and Activities.  

When I go to Debug, I do get this: 

 

record triggered flow from Tasks object

Here is my Start: 

 

Screenshot 2025-02-28 143133.png

 

 

Notice that I do have the date field i want to trigger from included. This does not Trigger in the debug.  

If I remove that, and then get it to Trigger, it is still not updating my date in the other object.  

Here is my Update Records. Whether this it triggered or not, I never see it up date, when I go to a task of this type and change this date field.  

 

 

Screenshot 2025-02-28 143441.png

 

 

 

 

#Developer Forums  #Flow  #Topics for Objects

1 answer
0/9000

Hi,  In the org in Health check as critical, high risk items there are these settings: ''Enable clickjack protection for customer Visualforce pages with standard headers''. As this setting is disabled now, what is the best approach to review before enabling it? I researched that testing it  in sandbox, it ''broke'' Docusign which is currently in the org. There are lots of visualforce pages in the org-how to check and where to check''standard headers?

Another settings is ''Enable clickjack protection for customer Visualforce pages with headers disable. I know that some of the Visualforce pages are built without headers for customization purposes. What are implications of ''standard headers are disabled when the show header attribute is set to false What to check /do before enabling this setting? Thank you 

 

#Salesforce Developer  #Developer Forums  #Data Management  #Sales Cloud

0/9000

I use an API Only System Integration user for integrating our website with Salesforce. There is a flow when a salesforce record is made, that executes certain logic. But when this record is made by the 'API Only System Integration user' it is not triggered.

 

This makes such a user almost unusable. Any alternatives?

12 answers
  1. Feb 24, 4:32 PM

    Hi @Stefaan Somers

    Did you figure out how to resolve this issue? 

     

    It seems like I have a similar problem. My "System Integration" user is also not triggering a record-triggered flow upon record creation. The user record has checked the "Flow User" checkbox but nothing is happening. 

     

    The resolution given by

    @VINAY KUMAR K does not work for me, as the "Edit Access" options is not available for record triggered flows.

0/9000

I have one parent lwc component from which i am calling child lwc component and passing the record variable to it but child component does n ot get it.

 

<template>

<c-asf-create-case-with-type onresetbox={resetBox} isasset={withoutAsset} account-id={parentId} field-to-be-stamped-on-case={fieldToBeStampedOnCase}>

</c-asf-create-case-with-type>

</template>

// JS//

@wire(getRecord, { recordId: '$recordId', fields: [Account_Id] })

recAcc;

get parentId() {

return getFieldValue(this.recAcc.data, Account_Id);

}

/* connectedCallback() {

this.accountId = this.parentId;

console.log('accountId ---> ' + this.accountId);

}*/

@wire(fetchAssets, { accountRecordId: '$parentId'})

wiredAssets({ error, data }) {

if (data) {

this.assetRecords = data.assetRecords;

console.log('currentSelRecord ',JSON.stringify( this.assetRecords[0]));

// this.populateLwcDatatableData();

//this.totalNoOfRecordsInDatatable = data.assetRecords.length;

// this.columns = data.columnNameList;

//this.accBusinessUnit = data.accBusinessUnit;

// this.setInfoObj();

this.fieldMappingForCase = data.fieldMappingForCase;

// this.currentSelectedRec = this.recordId;

let currentSelectedRec;

currentSelectedRec = this.assetRecords[0];

this.setFieldMaapingOnCase(currentSelectedRec);

//console.log('fieldToBeStampedOnCase ',this.fieldMappingForCase);

}

else if (error) {

console.error('Error fetching record', error);

}

}

setFieldMaapingOnCase(currentSelectedRowRec) {

console.log('inside idasset ',this.recordId);

let selectedRowRecord = currentSelectedRowRec;

// console.log('fieldToBeStampedOnCaseunder ',this.fieldMappingForCase);

let fldToMapToCaseObj = {};

if(this.fieldMappingForCase && currentSelectedRowRec) {

let fldsToSearch = this.fieldMappingForCase.split(",");

console.log('fldsToSearch ',selectedRowRecord);

for(let fld of fldsToSearch) {

let fldToSearch = fld.split(":")[0];

let fldToMapToCase = fld.split(":")[1];

fldToMapToCaseObj[fldToMapToCase] = selectedRowRecord[fldToSearch];

}

this.fieldToBeStampedOnCase = fldToMapToCaseObj;

console.log('fieldToBeStampedOnCase2 ',this.fieldToBeStampedOnCase);

}

}

my child component is not getting 'parentd' and 'fieldToBeStampedOnCase'. however i am getting the values on console log. What I am missing here. Please help me . Thanks in advance.

 

#Developer Forums  #Lightning Web Components

7 answers
  1. Feb 26, 2024, 6:26 AM

    I got the issue. I think the issue was my child component was rendering before fetching the accountId. I have changed my html and it is working as it should be.

    <template>

    <!--

    <template if:true={accountId}>

    <c-asf-create-case-with-type isasset={withoutAsset} account-id={accountId} field-to-be-stamped-on-case={fieldToBeStampedOnCase}>

    </c-asf-create-case-with-type>

    </template>

    </template>

0/9000

So my picklist field Purpose is a dependent field of another picklist field Price. I have updated some picklist values in Purpose and deployed the changes in the higher org. When I checked, the field dependency in setup did not get updated with the changed picklist values of Purpose. So in the UI, the dropdown is still showing the old picklist values. How do I solve for this?

4 answers
  1. Jan 10, 7:49 AM

    Hi @Carmelli Molijon,

     

    When you deploy metadata from one environment to another, it's important to ensure that the field dependency itself (i.e., the relationship between the controlling and dependent fields) is included in your deployment package.

    Check the following:

    • Field Dependency Metadata: In your deployment package, make sure the Field Dependency is included, not just the individual picklist fields. If only the picklist values of Purpose were deployed, the field dependency (which controls how Purpose values are displayed based on Price) may not have been updated.

    The following docs explain the same 

    https://salesforce.stackexchange.com/questions/41815/how-to-deploy-field-dependencies-using-change-sets

     

    https://www.simplysfdc.com/2013/07/salesforce-field-dependencies-deployment.html

     

    I hope you find this information helpful

     

    #Trailhead #Trailhead Challenges #Salesforce Developer #Sales Cloud #Security #Salesforce Developer #Developer Forums #Salesforce_developer

0/9000

For a new Experience Cloud site, I'm having a certain welcome email sent out. When I use the {!community_url} merge field in an email template, I'm getting 2 different behaviors: 1. if the user has an "internal" profile like System Admin, they get the welcome email for the experience cloud site, but the community url is just the experience cloud url, like: https://myexperiencecloud.my.site.com/myvforcesite

 

When an external user is created, the community_url in the welcome email has a token attached, so something like https://myexperiencecloud.my.site.com/myvforcesite/login?c=slkdjskljfsomesuperlongtoken

 

Why is the behavior different, im trying to find the salesforce documentation. I'm using LWR template after 2023 release.

 

#Developer Forums  #Experience Cloud

0/9000

Hello everyone,

 

We are trying to load data to the personEducation object, which has a field lookup to account.

Now, once the accounts (person accounts ) are loaded, trying to load their respective person education records.

 

Tried using the workbench, Dataloader.Io, we don't see the accountId field to map, Checked for access also, the field has got edit,read and all required access.

Am I missing anything?

 

Thanks in advance,

 

#Developer Forums #Education Cloud #Education Data Architecture

 

Thanks in adavnce.

3 answers
  1. Dec 24, 2024, 5:40 AM

    Hello @Sreekar Roy Akula 

    The issue you're facing with the missing AccountId field on the PersonEducation object while data loading is likely due to field accessibility or API visibility restrictions.

0/9000

Does Salesforce Support Org Chart? I need to create our company's org chart in detail. Please assist.

 

#Developer Forums  #Data Management  #TrailblazerCommunity  #Salesforce Admin

2 comments
  1. Dec 24, 2024, 5:36 AM

    Hi @Usman k Salesforce does not provide a built-in org chart feature specifically, but it does provide tools and options to create and visualize organizational hierarchies.

0/9000

 I have used lwc database with accordion. I was trying to deselect all functionality for the selected accordion section. I need to remove the selected accordion section selected IDs from the list. Post if anyone has any solutions.

 

#Developer Forums

0/9000