Hi Experts,
I would like know if its possible to create an entity record in late bound using object initializer. I know its possible in early bound but cant seem to find a way in late bound.
just like a query expression I can do this:
var queryExp = new QueryExpression("entityname")
{
ColumnSet = new ColumnSet("fieldname"),
Criteria =
{
Filters =
{
new FilterExpression
{
FilterOperator = LogicalOperator.And, Conditions =
{
new ConditionExpression("new_name", ConditionOperator.Equal, "OPP")
}
}
}
}
};
var result = service.RetrieveMultiple(queryExp);
rather than :
var queryExp = new QueryExpression("entityname");
queryExp.ColumnSet = new ColumnSet("fieldname");
queryExp.Criteria.AddCondition("new_name", ConditionOperator.Equal, "OPP");
var result = service.RetrieveMultiple(queryExp);
I want to do same thing when creating an entity like :
var entity = new entity("entityname)
{
//not sure how to assign values to entity attributes here
};
service.Update(entity);
*This post is locked for comments
I have the same question (0)