Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

fetch information from multiple entity using SDK.REST library

$
0
0

Hello All,

I want to fetch information from multiple entity like i have written code in c# through JavaScript form SDK.REST library:

public EntityCollection GetProduct(string pro, string level)
{
QueryExpression q = new QueryExpression()
{
EntityName = "Newproduct",
ColumnSet = new ColumnSet("name"),
Criteria = new FilterExpression
{
Conditions =
{
new ConditionExpression("name", ConditionOperator.Equal, pro)
}
}
};

if (!string.IsNullOrEmpty(level))
{
q.LinkEntities.Add(
new LinkEntity()
{
LinkFromEntityName = "newproduct",
LinkFromAttributeName = "newlevel",
LinkToEntityName = "newlevel",
LinkToAttributeName = "levelid",
LinkCriteria = new FilterExpression
{
FilterOperator = LogicalOperator.And,
Conditions =
{
new ConditionExpression("name", ConditionOperator.Equal, level)
}
},
}
);
}

return CRMCon.Service.RetrieveMultiple(q);
}


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images