Hi,
When I use the below function to get the attributes in a grid (showing opportunityproducts records) from the opportunity, the attributes returned are missing some of the fields available in Opportunity Product entity.
Why is this so and how can I get those fields to be returned?
function getGridData() { var grid = Xrm.Page.getControl("Product_Line").getGrid(); var rows = grid.getRows(); var rowList = []; var j = 0; rows.forEach(function (row, index) { try { var data = row.getData(); var crmEntity = data.getEntity(); var attributes = crmEntity.getAttributes().getAll(); attributes.forEach(function (attribute, index) { try { console.log("Name: " + attribute.getName()); console.log("Value: " + attribute.getValue()); } catch (e) { console.error(e); } }); } catch (e) { console.error(e); } }); }
Thanks!
*This post is locked for comments