• GÜNES Admin
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 1
    Replies
Hi everyone!

This is custom object development.

The question is how to share variables between LWC on the same Lightning Record Page?

In this particular context:
A variable value on first component (LWC #1) will decide if the Lightning Card on the second component (LWC #2) will be visible or not.

But, I am not sure how I can pass on a dynamic variable value from one LWC to another. Because the visibility should change based on the variable value.

Thank you!
 
Hello Developers!

In my custom object LWC, when certain critical action is requested such as "cancel record", I want the user to provide their SF credentials, as eSignature, which is then recorded as audit trail.

I already know how to prompt for the username and password!

My Question is:
How to I check the on-screen captured username and password, validate them against the user's SF login credentials?

Thanks,
Adrien
Custom object development.
I have created a button called "Next Stage" inside a LWC on the Lightning page of my custom object. When pressed, I would like the picklist value of the data field "Stage" to simply change/progress to the next value in the picklist list.

Thanks in advance!
I have a custom object (OBJ_X). On its Lightning page, I placed a LWC (Workflow_Panel) which successfully gets the RecordId and does a "Wire" operation and sources multiple data field values from OBJ_X. This all works as expected.

I created a second LWC, placed on the same page, which also needs to use data from the same OBJ_X record (actually it needs just one field value called "Stage").

This second LWC is not able to do the same Wire operation. It captures the RecordId of OBJ_X but nothing else. It will return blank values.

Many thanks for all help!
 
Dear all,

This is custom object development on Platform.
At the moment, there are two lightning buttons. One is called "Cancel".

The goal is to hide the Cancel button, if the picklist value of the field "Stage" is set to "Canceled".

Alternatively, a more elegant solution would be to change the button's style to "disabled" so it is grayed out and not clickable.

Both solutions would do. Can you please provide guidance on how to achieve this? Thank you!

User-added image
 
Dear everyone,

I am new to Apex/Lightning development so please use simple language in your answer :)

I have a custom object called Change.
I have a lightning button called "Cancel Change", placed in a Lightning Component (aura).
At the moment, the button is just displaying a dummy text "You clicked on me"...
The true purpose of this button is to:
- get the Change recordId (record where the button was pressed)
- update the picklist value of field "Stage" to "Canceled".
- display a success message
- do not navigate away, remain on the same Change record

So, I have the CMP file that defines the visual aspects of the Buttons:

<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
<div align="right">
    <lightning:buttonGroup>
        <lightning:helptext content="Use these buttons as Workflow Actions"/>
        <p><lightning:button variant="success" label="Progress Workflow" onclick="{!c.handleClick}"/></p>
        <p><lightning:button variant="destructive" label="Cancel Change" onclick="{!c.handleClick}"/></p>
    </lightning:buttonGroup>
</div>
</aura:component>

And there is the JS file which would normally define the behavior:

({
    handleClick : function(component, event, helper) {
    var selectedButtonLabel = event.getSource().get("v.label");
    alert("You clicked on: " + selectedButtonLabel);
    
    }
})

My difficulty is:
- How do I pass the recordID of the Change record to the code
- How do I update the field inside the record when Cancel is pressed?

Do I need to write an Apex container to start with?

Please provide guidance, thank you in advance!!
 
Dear all,
Sorry for such a simple question but I need guidance on:
How to leave space between two Lightning Buttons that I place in a component?

lightning buttons

At the moment, the buttons are aligned to the right side of the page which is fine, however, there is no space between the buttons.

Currently the code is:
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
<div align="right">
    <lightning:buttonGroup>
        <lightning:helptext content="Use these buttons as Workflow Actions"/>
        <p><lightning:button variant="success" label="Progress Workflow" onclick="{!c.handleClick}"/></p>
        <p><lightning:button variant="destructive" label="Cancel Change" onclick="{!c.handleClick}"/></p>
    </lightning:buttonGroup>
</div>
</aura:component>
How to create LWC Component with one Text box and Seearch button  >>text box
>> search button 
While entering a name in text box it should search for record and return Two fields which is Name and Type of object on the page .