You need to sign in to do that
Don't have an account?
SImmy
Please help me with Map. My business requirement is , An opportunity can have multiple invoices and I need to map the correct invoice with opportunity lineitems whose account is similar to opportunity.
Please help me with this. I'm struggling due to multiple values it's overriding the values and thus it's not updating the OLIs.
You can have a map with the opportunity id as the key and the list of invoices as the values so that you can store multiple values in the map for a given opportunity id.
You could something like: Map<id, List<invoices>>
In case if helped can you please choose this as the best answer so that it can be used by others in the future.
Regards,
Anutej
After getting all the records you can certainly check the condition Oli.account== OPP.account and update only the records that satisfy the condition.