Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dufoli opened this issue Jan 4, 2024 · 5 comments
Open

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

dufoli opened this issue Jan 4, 2024 · 5 comments

Comments

@dufoli
Copy link

dufoli commented Jan 4, 2024

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
Copy link
Author

dufoli commented Jan 4, 2024

@ericrsmith35

@ericrsmith35
Copy link
Collaborator

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.

@dufoli
Copy link
Author

dufoli commented Jan 5, 2024

ok I will use this trick. thanks

@dufoli
Copy link
Author

dufoli commented Jan 10, 2024

@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

@ericrsmith35
Copy link
Collaborator

ericrsmith35 commented Jan 10, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants