# Sales Order Detail Field Read Only

**URL:** <https://www.epiusers.help/t/sales-order-detail-field-read-only/54924>\
**Category:** Epicor ERP 10\
**Tags:** customization\
**Created:** [April 24, 2019, 8:42am UTC](https://www.epiusers.help/t/sales-order-detail-field-read-only/54924 "2019-04-24T08:42:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hari\_Dutt](https://www.epiusers.help/user_avatar/www.epiusers.help/hari_dutt/32/17476_2.png) [@Hari\_Dutt](https://www.epiusers.help/u/Hari_Dutt)\
**Post date:** [April 24, 2019, 8:42am UTC](https://www.epiusers.help/t/sales-order-detail-field-read-only/54924/1 "2019-04-24T08:42:03Z")

</div>

Dear Experts,

When we are trying to set “Unit Price Field” Read Only in Sales Order -\> Lines tab using Set Extended Properties method. It is not working refer to attached screen shot

 ![SO](https://epiusers.help/uploads/default/original/3X/a/d/ad14087f4248a84e02573d048f46c8823a488aac.png)

Code:

public void InitializeCustomCode()  
{  
this.edvOrderDtl = ((EpiDataView)(this.oTrans.EpiDataViews[“OrderDtl”]));  
this.edvOrderDtl.EpiViewNotification += new EpiViewNotification(this.edvOrderDtl\_EpiViewNotification);

```
	SetExtendedProperties();
}

```

private void SetExtendedProperties()  
{  
EpiDataView edvOrderDtl = ((EpiDataView)(this.oTrans.EpiDataViews[“OrderDtl”]));  
if (edvOrderDtl.dataView.Table.Columns.Contains(“DspUnitPrice”))  
{  
edvOrderDtl.dataView.Table.Columns[“DspUnitPrice”].ExtendedProperties[“ReadOnly”] = true;  
}  
}

---

<div class="post-metadata">

**Author:** ![hmwillett](https://www.epiusers.help/user_avatar/www.epiusers.help/hmwillett/32/93207_2.png) [@hmwillett](https://www.epiusers.help/u/hmwillett)\
**Post date:** [April 24, 2019, 10:52am UTC](https://www.epiusers.help/t/sales-order-detail-field-read-only/54924/2 "2019-04-24T10:52:31Z")

</div>

Try setting the field DocDspUnitPrice.

Also, if you don’t want to code it, you can set it in Extended Properties Maintenance:

![image](https://epiusers.help/uploads/default/original/3X/d/5/d5b1556ebbde015cb6207cefaf83ce6ba0d0603f.png)

 ![image](https://epiusers.help/uploads/default/original/3X/b/e/be45ddb56ed0c3e74b6480353c95f3ea16c1b927.png)

---

<div class="post-metadata">

**Author:** ![Hari\_Dutt](https://www.epiusers.help/user_avatar/www.epiusers.help/hari_dutt/32/17476_2.png) [@Hari\_Dutt](https://www.epiusers.help/u/Hari_Dutt)\
**Post date:** [April 24, 2019, 11:06am UTC](https://www.epiusers.help/t/sales-order-detail-field-read-only/54924/3 "2019-04-24T11:06:49Z")

</div>

Thank you @hmwillett for helping me out. I really appreciate your kindness and support.
