# Set Checkbox to True on Form Load For Specific Customisation **Category:** [Epicor ERP 10](https://www.epiusers.help/c/e10/5) **Created:** 2017-01-06 11:47 UTC **Views:** 3732 **Replies:** 4 **URL:** https://www.epiusers.help/t/set-checkbox-to-true-on-form-load-for-specific-customisation/36805 --- ## Post #1 by @anon31358647 Hi We need to set a checkbox to True when a new record is created in the RMAHead table. We would use a BPM but we only want the checkbox marked as true when a specific customised form is used. The field name is WarrantyRMA_c and it is in the RMAHead table, in vantage the code was Private Sub edvRMAHead_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvRMAHead.EpiViewNotification '// ** Argument Properties and Uses ** '// view.dataView(args.Row)("[FieldName]") '// args.Row, args.Column, args.Sender, args.NotifyType '// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes If (args.NotifyType = EpiTransaction.NotifyType.AddRow) Then If (args.Row > -1) Then Dim RMAHead As EpiDataView = CType(oTrans.EpiDataViews("RMAHead"), EpiDataView) RMAHead.dataview(RMAHead.Row)("Checkbox01") = "TRUE" End If End If End Sub Converted to C# (using an online converter) it is private void edvRMAHead_EpiViewNotification(EpiDataView view, EpiNotifyArgs args) { //// ** Argument Properties and Uses ** //// view.dataView(args.Row)("[FieldName]") //// args.Row, args.Column, args.Sender, args.NotifyType //// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes if ((args.NotifyType == EpiTransaction.NotifyType.AddRow)) { if ((args.Row > -1)) { EpiDataView RMAHead = (EpiDataView)oTrans.EpiDataViews("RMAHead"); RMAHead.dataview(RMAHead.Row)("WarrantyRMA_c") = "TRUE"; } } } When I add this to the Form Event Wizard as a EpiViewNotification and select Update Selected code and test the code i get theses compile errors Error: CS1955 - line 97 (588) - Non-invocable member 'Ice.Lib.Framework.EpiTransaction.EpiDataViews' cannot be used like a method. Error: CS1061 - line 98 (589) - 'Ice.Lib.Framework.EpiDataView' does not contain a definition for 'dataview' and no extension method 'dataview' accepting a first argument of type 'Ice.Lib.Framework.EpiDataView' could be found (are you missing a using directive or an assembly reference?) I am a complete novice regarding any sort of coding so please bear this in mind. thanks in Advance Mark --- ## Post #2 by @Aaron_Moreng try dataView instead of dataview. Also, this seems like a good place to use a pre-processing BPM instead of a form customization to set the field value. Also, try using brackets instead of parenthesis when indexing your row > RMAHead.dataView[RMAHead.Row]["WarrantyRMA_c"] = "TRUE"; --- ## Post #3 by @Mike Use the BPM. You can use a condition on the customization I'd in the call context. --- ## Post #4 by @zwilli526 Proper c# syntax would be to remove the quotes and make TRUE lower case, true. RMAHead.dataView[RMAHead.Row]["WarrantyRMA_c"] = true; --- ## Post #5 by @anon31358647 Brilliant, many thanks. My last bit of the code now reads EpiDataView RMAHead = (EpiDataView)oTrans.EpiDataViews["RMAHead"]; RMAHead.dataView[RMAHead.Row]["WarrantyRMA_c"] = true; and the checkbox is ticked on form load --- **Canonical:** https://www.epiusers.help/t/set-checkbox-to-true-on-form-load-for-specific-customisation/36805 **Original content:** https://www.epiusers.help/t/set-checkbox-to-true-on-form-load-for-specific-customisation/36805