You need to sign in to do that
Don't have an account?
hiteshwar marni
how to insert feedpollchoice data in test class?
I'm trying to create feedpollchoice record in test class but it's throwing exception as fields not writable although i have pernission.pls help on this thanks
public class VANChatterPollArchiveControllertest {
Static TestMethod void VAN_FeedCommentTriggerMethod(){
list<id> lstfeeditem = new list<id>();
FeedItem fi1 = new FeedItem(Body = 'samplebody', ParentId = UserInfo.getUserID(),Type = 'PollPost');
insert fi1;
FeedPollChoice fpc = new FeedPollChoice();
fpc.ChoiceBody='who is our cm';
fpc.FeedItemId=fi1.id;
fpc.Position=2;
insert fpc;
lstfeeditem.add(Fi1.id);
FeedItem fi2 = new FeedItem(Body = 'samplebody', ParentId = UserInfo.getUserID());
insert fi2;
}
}
FeedPollChoice Attributes
activateable: false
compactLayoutable: false
createable: false
custom: false
customSetting: false
deletable: false
deprecatedAndHidden: false
feedEnabled: false
hasSubtypes: false
idEnabled: true
isSubtype: false
keyPrefix: 09A
label: Feed Poll Choice
labelPlural: Feed Poll Choices
layoutable: false
mergeable: false
mruEnabled: false
name: FeedPollChoice
networkScopeFieldName:
queryable: true
replicateable: false
retrieveable: true
searchable: false
undeletable: false
updateable: false
urlDetail:
urlEdit:
urlNew: