• navaneetha.cm1.3887470963815178E12
  • NEWBIE
  • 5 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
I have 2 methods, main and a submethod. In main method I will have a list having repeated items. In the submethod I have written a logic to remove duplicate. But when the list is returned back it will have extra values.

For example: 
Main method() {
         list<object> sampleList = {{color: red, qty:1}, {color : blue, qty: 1},{color: red, qty:1}, {color : blue, qty: 1}};
         submethod(sampleList);
         Here the List will have {{color: red, qty:2}, {color : blue, qty: 2},{color: red, qty:1}}; extra value added
         Instead of  {{color: red, qty:2}, {color : blue, qty: 2}};

}

submethod (list<object> sampleList) {
                        logic to remove duplicate;
                        updated list will now have  {{color: red, qty:2}, {color : blue, qty: 2}}; Only 2 values
       return;     
}

Can anyone suggest how that additional value gets added and solution to avoid it?
I have 2 methods, main and a submethod. In main method I will have a list having repeated items. In the submethod I have written a logic to remove duplicate. But when the list is returned back it will have extra values.

For example: 
Main method() {
         list<object> sampleList = {{color: red, qty:1}, {color : blue, qty: 1},{color: red, qty:1}, {color : blue, qty: 1}};
         submethod(sampleList);
         Here the List will have {{color: red, qty:2}, {color : blue, qty: 2},{color: red, qty:1}}; extra value added
         Instead of  {{color: red, qty:2}, {color : blue, qty: 2}};

}

submethod (list<object> sampleList) {
                        logic to remove duplicate;
                        updated list will now have  {{color: red, qty:2}, {color : blue, qty: 2}}; Only 2 values
       return;     
}

Can anyone suggest how that additional value gets added and solution to avoid it?

Hi there,

 

I am building a wizard application. On one of the page, I am asking the user to enter information using inputField tag and I have the required attribute set to true. I also have a 'Previous' Button on the page which will take me to the previous page. How can I ignore the required validation when I click the Previous Button? I only want the validation to occur when there I click next or save. Please help.

Hi,

 

I am getting the below error when i try to save my Apex Controller.

 

line -1, column -1: Dependent class is invalid and needs recompilation: <Namespace.ApexClassName>: <line No> Didn't understand relationship '<Custom Object Name>' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.

 

I checked my WSDL file and could see the field in that Object.

 

Can anyone help me why is this issue being faced.

 

Regards,

OnDem