LightningFlowComponents icon indicating copy to clipboard operation
LightningFlowComponents copied to clipboard

*DataTable* - mis edited row and not edited one in a new output

Open dufoli opened this issue 1 year ago • 7 comments

Is your feature request related to a problem? Please describe. context: user have a list of line of order and he can edit line quantity but I want to get the full list of line (edited or not) to create invoice line. So by default order line is fully invoiced but user can reduce quantity to partially invoice. before saving invoice line, I need to check few things (consistency) that s why I do not save invoice line at the beginning then edit it.

Describe the solution you'd like

  • add an output to datatable which is edited row + not edited row. this solution seems easier and have less impact but I do not found in datatable the outputrows in total.

Describe alternatives you've considered

  • with current situation: create invoice line then used edited one to update invoice line => issue is that I want to check invoice line concistency before writing anything to database. => solution 1 is just create a new object temporary invoice line object or an apex structure and used it in the flow. so I can check consistency on temporary object then save on the real object after that.
  • after edition mix edited row and not edited row based on it. (need an apex class with map by id) to avoid duplicate.

Additional context Add any other context or screenshots about the feature request here.

dufoli avatar Jan 04 '24 09:01 dufoli

@ericrsmith35

dufoli avatar Jan 04 '24 09:01 dufoli

Here's a write-up on how to combine selected and edited records. https://ericsplayground.wordpress.com/2021/06/11/2144/

You can use similar logic to create a collection of all the original records with the edits included. Let me know if you need more details.

ericrsmith35 avatar Jan 04 '24 19:01 ericrsmith35

ok I will use this trick. thanks

dufoli avatar Jan 05 '24 15:01 dufoli

@ericrsmith35 I try to use the trick. It work perfecty if I use multi screen but if I use "calculate field summary" LWC to sum the I need to sum the whole list and not edited only So I used the "Find unique and common" LWC I need to add unique and common like the assigment action : joins collection will do the trick I guess.

then for each line to do quantity x unit price then sum totalpriceline then display totalPrice and difference with expectedValue

So I think I will do My own lwc to do it because I have not the quantity x unit price CP collection lwc

dufoli avatar Jan 10 '24 14:01 dufoli

Add a new formula field to the record that is quantity x unit price and sum that value

On Wed, Jan 10, 2024 at 9:03 AM olivier dufour @.***> wrote:

@ericrsmith35 https://github.com/ericrsmith35 I try to use the trick. It work perfecty if I use multi screen but if I use "calculate field summary" LWC to sum the I need to sum the whole list and not edited only So I used the "Find unique and common". But I need for each line to do quantity x unit price then sum totalpriceline then display totalPrice and difference with expectedValue

— Reply to this email directly, view it on GitHub https://github.com/alexed1/LightningFlowComponents/issues/1506#issuecomment-1884909334, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4UHX7DRWS2HLCBIEFDZVTYN2NU3AVCNFSM6AAAAABBMT22JWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBUHEYDSMZTGQ . You are receiving this because you were mentioned.Message ID: @.***>

ericrsmith35 avatar Jan 10 '24 14:01 ericrsmith35