• Anupam Shrivastava 9
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hi All,
I am getting error as following : IN operator must be used with an iterable expression .
My code is : 
List<Task> ts1=[Select Id,WhoId from Task];
    for(Task ts2 : ts1){
    Map<ID, Obj1__c> mapAccounts = new Map<ID, Obj1__c>([SELECT Id, Name, Filed1__c  FROM Obj1__c WHERE                                                                                                               Field1__r.Id IN: ts2.whoId]);
}
Filed1__c is lookup to account.
How to resolve this?

Thanks in Advance
<!--campingListItem.cmp-->
<aura:component >
	<aura:attribute name="item" type="Camping_Item__c" required="true"/>

	<ui:outputText value="{!v.item.Name}" />
	<ui:outputCheckbox value="{!v.item.Packed__c}" />
	<ui:outputCurrency value="{!v.item.Price__c}" />
	<ui:outputNumber value="{!v.item.Quantity__c}" />
	<ui:button label="Packed!" press="{!c.packItem}"/>
	
</aura:component>
<!--campingListController.js-->
({
	packItem : function(component, event, helper) {
		var button = event.getSource().get("v.disabled");
		component.set("v.item.Packed__c", "true");
		component.set(button, "true");
	}
})
What am I doing wrong?