You need to sign in to do that
Don't have an account?
Jyosi jyosi
To get the list of duplicate key in the map
for(Sample_Line SampleLineitem:List_SampleLineItemQuery)
{
Map_RejectionSampleLineItem.put(SampleLineitem.Product__c,SampleLineitem.Line_Number__c);
}
In RejectionSampleLineItem it may contian duplicates Product__c so i will be missing one key
for(Inventory__c Inv :Rejection_InvAdjustment)
{
MN =
when i get the items because the line number is not present in the map it wont pull the value and it stamps to different line number
Integer.valueOf(Map_RejectionSampleLineItem.get(Inv.Product__c));
system.debug('MN Value ====== 511 '+MN);
}
Is there anyway i can get all the duplicate ids of products.
Thanks
Regards,
Ashok N
{
Map_RejectionSampleLineItem.put(SampleLineitem.Product__c,SampleLineitem.Line_Number__c);
}
In RejectionSampleLineItem it may contian duplicates Product__c so i will be missing one key
for(Inventory__c Inv :Rejection_InvAdjustment)
{
MN =
when i get the items because the line number is not present in the map it wont pull the value and it stamps to different line number
Integer.valueOf(Map_RejectionSampleLineItem.get(Inv.Product__c));
system.debug('MN Value ====== 511 '+MN);
}
Is there anyway i can get all the duplicate ids of products.
Thanks
Regards,
Ashok N
Thanks
Regards,;p
Product__c Line_Number__c
A 1
A 2
Then you would have a map that looks lke this...
<A,<1,2>>;
For for each Duplicate product - you would have multiple Line Numbers.
Make sense?
But when i excute code
Map<ID,List<Double>> Map_RejectionSampleLineItem= new Map<ID,List<Double>>();
01t4B0000017JMFQA2=(6.0) and 4 share the same Id ,But i am not able not able to get the 4 reference.
{01t4B0000017JMBQA2=(2.0), 01t4B0000017JMFQA2=(6.0), 01t50000002asuaAAA=(3.0), 01t50000002asvkAAA=(5.0), 01t50000002aswyAAA=(1.0)}
Can you please help me out how to fix this .
Thanks for help.
Regards,
Jyo