• akshaya vengala
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hello Experts,

We are developing a custom lighting web component where we have a requirement to show a set of custom action buttons. The same set of custom buttons are also added to the page layout of the custom object. We want show the buttons in the lightning web component only if those are added to the page layout. In other words - if the user removes any of the custom buttons from the page layout those options should be hidden from the lighting web component action button list as well.

So I am trying to see if I can access the page layout and its associted properties using Apex.

Could you please suggest if you have solved these type of requirements in any of your projects?

Thanks,
Bikram.

When ever i am trying to update a value in the object array i am greeting script error, even splice does not works below are two snippets in lwc js.

let allValues=this.budgetData; // eslint-disable-next-line no-console console.log('allValues ' + JSON.stringify(allValues) ); for(let i = 0; i < allValues.length; i++){ if(allValues[i].Id === event.target.name ){ // eslint-disable-next-line no-console console.log('allValues ' + JSON.stringify(allValues[i]) ); allValues.splice(i,1); } }



let allValues=this.budgetData; // eslint-disable-next-line no-console console.log('allValues ' + JSON.stringify(allValues) ); for(let i = 0; i < allValues.length; i++){ if(allValues[i].Id === event.target.name ){ // eslint-disable-next-line no-console console.log('allValues ' + JSON.stringify(allValues[i]) ); allValues[i]= objectvalue; } }
Hi - when doing the challenge "Bulk Apex Trigger" in Trailhead I get the error message :"Executing against the trigger does not work as expected."

I have checked the name of the class, task name as mentioned in the challenge description.

I have copied the code below :

trigger ClosedOpportunityTrigger on Opportunity (before insert, before update) {
  List<Task> taskList = new List<Task>();

    //If an opportunity is inserted or updated with a stage of 'Closed Won'
    // add a task created with the subject 'Follow Up Test Task'.
    for (Opportunity opp : [SELECT Id,Name FROM Opportunity
                     WHERE Id IN :Trigger.new AND StageName = 'Closed Won']) {
       //add a task with subject 'Follow Up Test Task'.
       taskList.add(new Task(Subject='Follow Up Test Task', WhatId = opp.id ));                
  }
                          
    if (taskList.size() > 0) {
        insert taskList;
    }



Thank you
Pierre-Alain