You need to sign in to do that
Don't have an account?
Mktdev
creating one map using two maps based on keyset
Hi,
I have two map one is Contact Account and another is Contact User .I want to create another map by comparing these two and create a new map for Account User.
Please help.
Regards,
Mktg
Final chance
If it also gives error please provide comple class.
All Answers
I think you want to create a MAP which will give you user for Account
try this
let me know if any issues in it.
Thanks Shashikant !
Sorry ! for this dump question!
Since I have to use this new map to enter in account sharing table.So I am try:
List<AccountShare> lsMultipleAccountShare = new List<AccountShare>();
For(Object__c obj1:listofobject)
{
}
will map be used?
Thanks in advance!
I don't think AccountShare give you directly User for this Account, I think in case you need a MAP
Yes, I am using the same map which you have helped me to create.But using this I m getting an error
Loop must iterate over a collection type: Id at line
Just try this
Thanks!
Still getting the same error.
Thanks,
Mktg
Ok now i got the issue try this
Now this code expect that your one account will only have one user, I think you have multiple user's on multiple contacts case. If so we need to make change in map. let me know if it works for you or you need change in MAP.
I have a requirment that a contact can be part of multiple accounts and this relationship is stored in Object__c object with AccountId and ContactID,
Therefore what I am doing :
Map:
Account and contact
Contact and User
Account User (thanks to you)
Currently what you just provided it says "Illegal assignment from Id to SOBJECT:User at ..
Regards,
Mktg
Oh Sorry!
My all map is of <Id,Id>
this was accepted:
Id userId=userAccountMap.get(assAcc.Account__c);
Regards,
Mktg
Final chance
If it also gives error please provide comple class.
Many Thanks!
Code is working fine but sharing is not working .once done I will confirm you.
Regards,
Mktg