• shreya duggal
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies
I have a trigger which is added to object A in which I need to show error on save button but at the same time I need to insert record in a custom object B. I am using trigger.new[0].addError('Message') and then using database.insert to insert the data in the custom object B but the record is not getting created as I read in documentation that addError rollbacks the DML operation but I need both the error and DML operation to function.  Can anyone help me with this?
I have a problem related to 'save and new' button in lightning interface i.e when I edit a record and click 'save and new' button on the popup it doesn't pre-fill the lookup values. I can't update it as it is a standard popup and is outside my component. So is there a way to override the 'save and new' button or hide it from the edit record popup please help!!!
 
I am using lighting datatable to show the data. The problem which I am facing is when I delete a row from a table it removes the row correctly but it focuses the last column of the previous row. So when I try to delete that row it remains inactive for random few seconds and always jumps to the same last focused column. 
This doesn't create an issue if there is no scrollbar in the table but it is quite frustrating in case of scrollbar as I am not being able to delete a record on every delete after the first delete for few seconds as it doesn't allow me to click on the button instead takes me the to last column. Can anyone help me out with this issue? I am also attaching a screenshot for better understanding.
User-added image
I have a trigger which is added to object A in which I need to show error on save button but at the same time I need to insert record in a custom object B. I am using trigger.new[0].addError('Message') and then using database.insert to insert the data in the custom object B but the record is not getting created as I read in documentation that addError rollbacks the DML operation but I need both the error and DML operation to function.  Can anyone help me with this?