Activity Forums Salesforce® Discussions Problem in response.getReturnValue() result when storing in two attributes in salesforce

  • Problem in response.getReturnValue() result when storing in two attributes in salesforce

    Posted by Deepak on September 19, 2019 at 1:52 pm

    When I stored response.getReturnValue() in two attributes in lightning if any change applied on one attribute other attribute data also changing

    component.set("v.pricebookProducts", response.getReturnValue()); //getting pricebook products
    component.set("v.pricebookProductsCopy", response.getReturnValue());

    if i done any modification on the first attribute then the second attribute also changing.pls help me how to overcome this problem

    Piyush replied 4 years, 7 months ago 2 Members · 1 Reply
  • 1 Reply
  • Piyush

    Member
    September 20, 2019 at 2:47 am

    Hi Deepak,

    You can use like this in your program:-

    component.set("v.pricebookProductsCopy", [response.getReturnValue()]);

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos