Set Date01 To Null

Thanks Jose, this works.

vds.Vendor[0]["Date01"] = Convert.DBNull;


From: "Jose Gomez jose@... [vantage]" <vantage@yahoogroups.com>
To: Vantage <vantage@yahoogroups.com>
Sent: Monday, August 18, 2014 11:29 AM
Subject: Re: [Vantage] Set Date01 To Null

#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 #ygrps-yiv-24691741yiv0589809329 --

#ygrps-yiv-24691741yiv0589809329 .ygrps-yiv-24691741yiv0589809329ygrp-photo-title{
clear:both;font-size:smaller;height:15px;overflow:hidden;text-align:center;width:75px;}
#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 div.ygrps-yiv-24691741yiv0589809329ygrp-photo{
background-position:center;background-repeat:no-repeat;background-color:white;border:1px solid black;height:62px;width:62px;}

#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 div.ygrps-yiv-24691741yiv0589809329photo-title
a,
#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 div.ygrps-yiv-24691741yiv0589809329photo-title a:active,
#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 div.ygrps-yiv-24691741yiv0589809329photo-title a:hover,
#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 div.ygrps-yiv-24691741yiv0589809329photo-title a:visited {
text-decoration:none;}

#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 div.ygrps-yiv-24691741yiv0589809329attach-table div.ygrps-yiv-24691741yiv0589809329attach-row {
clear:both;}

#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 div.ygrps-yiv-24691741yiv0589809329attach-table div.ygrps-yiv-24691741yiv0589809329attach-row div {
float:left;}

#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 p {
clear:both;padding:15px 0 3px 0;overflow:hidden;}

#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 div.ygrps-yiv-24691741yiv0589809329ygrp-file {
width:30px;}
#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 div.ygrps-yiv-24691741yiv0589809329attach-table div.ygrps-yiv-24691741yiv0589809329attach-row div div a {
text-decoration:none;}

#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 div.ygrps-yiv-24691741yiv0589809329attach-table div.ygrps-yiv-24691741yiv0589809329attach-row div div span {
font-weight:normal;}

#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 div.ygrps-yiv-24691741yiv0589809329ygrp-file-title {
font-weight:bold;}
#ygrps-yiv-24691741
#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 #ygrps-yiv-24691741yiv0589809329
#ygrps-yiv-24691741yiv0589809329ygrp-mkp {
border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}

#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 #ygrps-yiv-24691741yiv0589809329ygrp-mkp hr {
border:1px solid #d8d8d8;}

#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 #ygrps-yiv-24691741yiv0589809329ygrp-mkp #ygrps-yiv-24691741yiv0589809329hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}

#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 #ygrps-yiv-24691741yiv0589809329ygrp-mkp #ygrps-yiv-24691741yiv0589809329ads {
margin-bottom:10px;}

#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 #ygrps-yiv-24691741yiv0589809329ygrp-mkp .ygrps-yiv-24691741yiv0589809329ad {
padding:0 0;}

#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 #ygrps-yiv-24691741yiv0589809329ygrp-mkp .ygrps-yiv-24691741yiv0589809329ad p {
margin:0;}

#ygrps-yiv-24691741 #ygrps-yiv-24691741yiv0589809329 #ygrps-yiv-24691741yiv0589809329ygrp-mkp .ygrps-yiv-24691741yiv0589809329ad a {
color:#0000ff;text-decoration:none;}
#ygrps-yiv-24691741



Actually I think because Date01 is not part of the original data set hmm that's gonna be tough ... there are other SetXXToNull, this is the code that they generate so perhaps try something similar

   [GeneratedCode("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), DebuggerNonUserCode]
            public void SetServDeliveryDateNull()
            {
                base[this.tableVendor.ServDeliveryDateColumn] = Convert.DBNull;
            }


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?


On Mon, Aug 18, 2014 at 11:21 AM, Ted Koch tkoch77@... [vantage] <vantage@yahoogroups.com> wrote:
 
<div style="" class="ygrps-yiv-24691741">
  
  
  <div class="ygrps-yiv-24691741" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:8pt;"><div style="" class="ygrps-yiv-24691741"><span style="" class="ygrps-yiv-24691741">This is the code I am using, but at the SetField&nbsp; line it is generating an error.</span></div>

                       
vendorAdapt.GetByID((int)edvVendor.dataView[edvVendor.Row][“VendorNum”]);
                        VendorDataSet vds = vendorAdapt.VendorData;

                        vds.Vendor[0].BeginEdit();


                        vds.Vendor[0].SetField<DateTime?>(“Date01”, null);

                        vds.Vendor[0][“CheckBox01”] = false;
                        vds.Vendor[0][“CheckBox02”] =
false;
                        vds.Vendor[0].EndEdit();

                        vendorAdapt.Update();



 Error: CS1061 - line 111 (660) - 'Erp.BO.VendorDataSet.VendorRow' does not contain a definition for 'SetField' and no extension method 'SetField' accepting a first argument of type 'Erp.BO.VendorDataSet.VendorRow' could be found (are you missing a using directive or an assembly reference?)


From: "Jose Gomez jose@... [vantage]" <vantage@yahoogroups.com>

To: Vantage <vantage@yahoogroups.com>
Sent: Monday, August 18, 2014 11:12 AM


Subject: Re: [Vantage] Set Date01 To Null




Same thing would work in customization mode, just  bring in the BO and reference it from the Adapter


BOdataSet ds = adapter.AdapterDataset…




Jose C Gomez
Software Engineer



T: 904.469.1524 mobile

Quis custodiet ipsos custodes?


On Mon, Aug 18, 2014 at 11:09 AM, tkoch77@... [vantage] <vantage@yahoogroups.com> wrote:
 
<div style="" class="ygrps-yiv-24691741">
  
  
  <div style="" class="ygrps-yiv-24691741">Does anyone know how you would achieve this with date fields in E10? The <span style="" class="ygrps-yiv-24691741"><font style="" class="ygrps-yiv-24691741" face="verdana, sans-serif">SetDate01Null() method is no longer.I&#39;ve tried this but it won&#39;t compile in an Epicor customization. In Visual Studio with Erp.Contracts.BO.Vendor referenced it compiles fine.vds.Vendor[0].SetField&lt;DateTime?&gt;(&quot;Date01&quot;, null);Thanks,Ted</font></span></div>





</div>
 


<div class="ygrps-yiv-24691741" style="color:#fff;min-height:0;"></div>





</div>
 


<div class="ygrps-yiv-24691741" style="color:#fff;min-height:0;"></div>





Hi,

Within a customization I am trying to set Date01 to null when a checkbox becomes unchecked. When I use this below I get the object not set to an instance of an object because the database field is type of datetime. What is the best way to do this, in ABL I can set it to ?

edvVendor.dataView[edvVendor.Row]["Date01"] = null;

I've also tried setting the control's value to null, but doesn't make the dataview field null.

dteCertExpDate.Nullable = true;
dteCertExpDate.Value = null;

Thanks,

Ted
The DataSet has a function you can call to set it to null as shown

You’ll have to get the current dataset from the adapter, something like


VendorDataSet vds = yourAdapter.VendorData;

vds.Vendor[yourRow].SetDate01Null();




Jose C Gomez
Software Engineer


T: 904.469.1524 mobile


Quis custodiet ipsos custodes?


On Fri, Mar 28, 2014 at 9:08 AM, <tkoch77@...> wrote:

 
<div>
  
  
  <p>Hi,<br><br>Within a customization I am trying to set Date01 to null when a checkbox becomes unchecked. When I use this below I get the object not set to an instance of an object because the database field is type of datetime. What is the best way to do this, in ABL I can set it to ? <br>


edvVendor.dataView[edvVendor.Row]["Date01"] = null;

I've also tried setting the control's value to null, but doesn't make the dataview field null.

dteCertExpDate.Nullable = true;

dteCertExpDate.Value = null;

Thanks,

Ted

</div>
 


<div style="color:rgb(255,255,255);min-height:0px;"></div>

Nice. Thanks Jose, good to know!



From: Jose Gomez <jose@...>
To: Vantage <vantage@yahoogroups.com>
Sent: Friday, March 28, 2014 9:32 AM
Subject: Re: [Vantage] Set Date01 To Null

#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 #ygrps-yiv-139351233yiv5239364112 --

#ygrps-yiv-139351233yiv5239364112 .ygrps-yiv-139351233yiv5239364112ygrp-photo-title{
clear:both;font-size:smaller;height:15px;overflow:hidden;text-align:center;width:75px;}
#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 div.ygrps-yiv-139351233yiv5239364112ygrp-photo{
background-position:center;background-repeat:no-repeat;background-color:white;border:1px solid black;height:62px;width:62px;}

#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 div.ygrps-yiv-139351233yiv5239364112photo-title
a,
#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 div.ygrps-yiv-139351233yiv5239364112photo-title a:active,
#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 div.ygrps-yiv-139351233yiv5239364112photo-title a:hover,
#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 div.ygrps-yiv-139351233yiv5239364112photo-title a:visited {
text-decoration:none;}

#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 div.ygrps-yiv-139351233yiv5239364112attach-table div.ygrps-yiv-139351233yiv5239364112attach-row {
clear:both;}

#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 div.ygrps-yiv-139351233yiv5239364112attach-table div.ygrps-yiv-139351233yiv5239364112attach-row div {
float:left;}

#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 p {
clear:both;padding:15px 0 3px 0;overflow:hidden;}

#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 div.ygrps-yiv-139351233yiv5239364112ygrp-file {
width:30px;}
#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 div.ygrps-yiv-139351233yiv5239364112attach-table div.ygrps-yiv-139351233yiv5239364112attach-row div div a {
text-decoration:none;}

#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 div.ygrps-yiv-139351233yiv5239364112attach-table div.ygrps-yiv-139351233yiv5239364112attach-row div div span {
font-weight:normal;}

#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 div.ygrps-yiv-139351233yiv5239364112ygrp-file-title {
font-weight:bold;}
#ygrps-yiv-139351233
#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 #ygrps-yiv-139351233yiv5239364112
#ygrps-yiv-139351233yiv5239364112ygrp-mkp {
border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}

#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 #ygrps-yiv-139351233yiv5239364112ygrp-mkp hr {
border:1px solid #d8d8d8;}

#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 #ygrps-yiv-139351233yiv5239364112ygrp-mkp #ygrps-yiv-139351233yiv5239364112hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}

#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 #ygrps-yiv-139351233yiv5239364112ygrp-mkp #ygrps-yiv-139351233yiv5239364112ads {
margin-bottom:10px;}

#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 #ygrps-yiv-139351233yiv5239364112ygrp-mkp .ygrps-yiv-139351233yiv5239364112ad {
padding:0 0;}

#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 #ygrps-yiv-139351233yiv5239364112ygrp-mkp .ygrps-yiv-139351233yiv5239364112ad p {
margin:0;}

#ygrps-yiv-139351233 #ygrps-yiv-139351233yiv5239364112 #ygrps-yiv-139351233yiv5239364112ygrp-mkp .ygrps-yiv-139351233yiv5239364112ad a {
color:#0000ff;text-decoration:none;}
#ygrps-yiv-139351233



The DataSet has a function you can call to set it to null as shown

You’ll have to get the current dataset from the adapter, something like


VendorDataSet vds = yourAdapter.VendorData;

vds.Vendor[yourRow].SetDate01Null();




Jose C Gomez
Software Engineer


T: 904.469.1524 mobile


Quis custodiet ipsos custodes?


On Fri, Mar 28, 2014 at 9:08 AM, <tkoch77@...> wrote:
 
<div>
  
  
  <div>Hi,<br clear="none"><br clear="none">Within a customization I am trying to set Date01 to null when a checkbox becomes unchecked. When I use this below I get the object not set to an instance of an object because the database field is type of datetime. What is the best way to do this, in ABL I can set it to ? <br clear="none">


edvVendor.dataView[edvVendor.Row][“Date01”] = null;

I’ve also tried setting the control’s value to null, but doesn’t make the dataview field null.

dteCertExpDate.Nullable = true;

dteCertExpDate.Value = null;

Thanks,

Ted

</div>
 


<div style="color:rgb(255,255,255);min-height:0px;"></div>





What is the difference in using the adapter from the business object? Is there any?



From: Jose Gomez <jose@...>
To: Vantage <vantage@yahoogroups.com>
Sent: Friday, March 28, 2014 9:32 AM
Subject: Re: [Vantage] Set Date01 To Null

#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 #ygrps-yiv-1150286212yiv5239364112 --

#ygrps-yiv-1150286212yiv5239364112 .ygrps-yiv-1150286212yiv5239364112ygrp-photo-title{
clear:both;font-size:smaller;height:15px;overflow:hidden;text-align:center;width:75px;}
#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 div.ygrps-yiv-1150286212yiv5239364112ygrp-photo{
background-position:center;background-repeat:no-repeat;background-color:white;border:1px solid black;height:62px;width:62px;}

#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 div.ygrps-yiv-1150286212yiv5239364112photo-title
a,
#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 div.ygrps-yiv-1150286212yiv5239364112photo-title a:active,
#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 div.ygrps-yiv-1150286212yiv5239364112photo-title a:hover,
#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 div.ygrps-yiv-1150286212yiv5239364112photo-title a:visited {
text-decoration:none;}

#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 div.ygrps-yiv-1150286212yiv5239364112attach-table div.ygrps-yiv-1150286212yiv5239364112attach-row {
clear:both;}

#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 div.ygrps-yiv-1150286212yiv5239364112attach-table div.ygrps-yiv-1150286212yiv5239364112attach-row div {
float:left;}

#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 p {
clear:both;padding:15px 0 3px 0;overflow:hidden;}

#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 div.ygrps-yiv-1150286212yiv5239364112ygrp-file {
width:30px;}
#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 div.ygrps-yiv-1150286212yiv5239364112attach-table div.ygrps-yiv-1150286212yiv5239364112attach-row div div a {
text-decoration:none;}

#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 div.ygrps-yiv-1150286212yiv5239364112attach-table div.ygrps-yiv-1150286212yiv5239364112attach-row div div span {
font-weight:normal;}

#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 div.ygrps-yiv-1150286212yiv5239364112ygrp-file-title {
font-weight:bold;}
#ygrps-yiv-1150286212
#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 #ygrps-yiv-1150286212yiv5239364112
#ygrps-yiv-1150286212yiv5239364112ygrp-mkp {
border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}

#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 #ygrps-yiv-1150286212yiv5239364112ygrp-mkp hr {
border:1px solid #d8d8d8;}

#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 #ygrps-yiv-1150286212yiv5239364112ygrp-mkp #ygrps-yiv-1150286212yiv5239364112hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}

#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 #ygrps-yiv-1150286212yiv5239364112ygrp-mkp #ygrps-yiv-1150286212yiv5239364112ads {
margin-bottom:10px;}

#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 #ygrps-yiv-1150286212yiv5239364112ygrp-mkp .ygrps-yiv-1150286212yiv5239364112ad {
padding:0 0;}

#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 #ygrps-yiv-1150286212yiv5239364112ygrp-mkp .ygrps-yiv-1150286212yiv5239364112ad p {
margin:0;}

#ygrps-yiv-1150286212 #ygrps-yiv-1150286212yiv5239364112 #ygrps-yiv-1150286212yiv5239364112ygrp-mkp .ygrps-yiv-1150286212yiv5239364112ad a {
color:#0000ff;text-decoration:none;}
#ygrps-yiv-1150286212



The DataSet has a function you can call to set it to null as shown

You’ll have to get the current dataset from the adapter, something like


VendorDataSet vds = yourAdapter.VendorData;

vds.Vendor[yourRow].SetDate01Null();




Jose C Gomez
Software Engineer


T: 904.469.1524 mobile


Quis custodiet ipsos custodes?


On Fri, Mar 28, 2014 at 9:08 AM, <tkoch77@...> wrote:
 
<div>
  
  
  <div>Hi,<br clear="none"><br clear="none">Within a customization I am trying to set Date01 to null when a checkbox becomes unchecked. When I use this below I get the object not set to an instance of an object because the database field is type of datetime. What is the best way to do this, in ABL I can set it to ? <br clear="none">


edvVendor.dataView[edvVendor.Row][“Date01”] = null;

I’ve also tried setting the control’s value to null, but doesn’t make the dataview field null.

dteCertExpDate.Nullable = true;

dteCertExpDate.Value = null;

Thanks,

Ted

</div>
 


<div style="color:rgb(255,255,255);min-height:0px;"></div>





If you are in a customization, the adapter (current adapter) will modify the live data on the form. If you go with the Business Object then you have to re-lookup the data in order to modify it and then do a refresh. But the data is the same so

VendorDataSet vds = myAdapter.VendorData
 is teh same as

VendorDataSet vds = bo.GetByiD((vendor);




Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?


On Fri, Mar 28, 2014 at 10:35 AM, Ted Koch <tkoch77@...> wrote:
 
<div>
  
  
  <p></p><div style="font-size:8pt;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;">What is the difference in using the adapter from the business object? Is there any?<br><div><span><br>


From: Jose Gomez <jose@...>
To: Vantage <vantage@yahoogroups.com>

Sent: Friday, March 28, 2014 9:32 AM
Subject: Re: [Vantage] Set Date01 To Null




The DataSet has a function you can call to set it to null as shown

You’ll have to get the current dataset from the adapter, something like


VendorDataSet vds = yourAdapter.VendorData;

vds.Vendor[yourRow].SetDate01Null();




Jose C Gomez
Software Engineer


T: 904.469.1524 mobile


Quis custodiet ipsos custodes?


On Fri, Mar 28, 2014 at 9:08 AM, <tkoch77@...> wrote:
 
<div>
  
  
  <div>Hi,<br clear="none"><br clear="none">Within a customization I am trying to set Date01 to null when a checkbox becomes unchecked. When I use this below I get the object not set to an instance of an object because the database field is type of datetime. What is the best way to do this, in ABL I can set it to ? <br clear="none">


edvVendor.dataView[edvVendor.Row][“Date01”] = null;

I’ve also tried setting the control’s value to null, but doesn’t make the dataview field null.


dteCertExpDate.Nullable = true;

dteCertExpDate.Value = null;

Thanks,

Ted

</div>
 


<div style="color:rgb(255,255,255);"></div>





</div>
 


<div style="color:#fff;min-height:0;"></div>

Thanks again, very useful knowledge.



From: Jose Gomez <jose@...>
To: Vantage <vantage@yahoogroups.com>
Sent: Friday, March 28, 2014 10:37 AM
Subject: Re: [Vantage] Set Date01 To Null

#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 #ygrps-yiv-940719430yiv2939012604 --

#ygrps-yiv-940719430yiv2939012604 .ygrps-yiv-940719430yiv2939012604ygrp-photo-title{
clear:both;font-size:smaller;height:15px;overflow:hidden;text-align:center;width:75px;}
#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 div.ygrps-yiv-940719430yiv2939012604ygrp-photo{
background-position:center;background-repeat:no-repeat;background-color:white;border:1px solid black;height:62px;width:62px;}

#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 div.ygrps-yiv-940719430yiv2939012604photo-title
a,
#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 div.ygrps-yiv-940719430yiv2939012604photo-title a:active,
#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 div.ygrps-yiv-940719430yiv2939012604photo-title a:hover,
#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 div.ygrps-yiv-940719430yiv2939012604photo-title a:visited {
text-decoration:none;}

#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 div.ygrps-yiv-940719430yiv2939012604attach-table div.ygrps-yiv-940719430yiv2939012604attach-row {
clear:both;}

#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 div.ygrps-yiv-940719430yiv2939012604attach-table div.ygrps-yiv-940719430yiv2939012604attach-row div {
float:left;}

#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 p {
clear:both;padding:15px 0 3px 0;overflow:hidden;}

#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 div.ygrps-yiv-940719430yiv2939012604ygrp-file {
width:30px;}
#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 div.ygrps-yiv-940719430yiv2939012604attach-table div.ygrps-yiv-940719430yiv2939012604attach-row div div a {
text-decoration:none;}

#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 div.ygrps-yiv-940719430yiv2939012604attach-table div.ygrps-yiv-940719430yiv2939012604attach-row div div span {
font-weight:normal;}

#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 div.ygrps-yiv-940719430yiv2939012604ygrp-file-title {
font-weight:bold;}
#ygrps-yiv-940719430
#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 #ygrps-yiv-940719430yiv2939012604
#ygrps-yiv-940719430yiv2939012604ygrp-mkp {
border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}

#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 #ygrps-yiv-940719430yiv2939012604ygrp-mkp hr {
border:1px solid #d8d8d8;}

#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 #ygrps-yiv-940719430yiv2939012604ygrp-mkp #ygrps-yiv-940719430yiv2939012604hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}

#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 #ygrps-yiv-940719430yiv2939012604ygrp-mkp #ygrps-yiv-940719430yiv2939012604ads {
margin-bottom:10px;}

#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 #ygrps-yiv-940719430yiv2939012604ygrp-mkp .ygrps-yiv-940719430yiv2939012604ad {
padding:0 0;}

#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 #ygrps-yiv-940719430yiv2939012604ygrp-mkp .ygrps-yiv-940719430yiv2939012604ad p {
margin:0;}

#ygrps-yiv-940719430 #ygrps-yiv-940719430yiv2939012604 #ygrps-yiv-940719430yiv2939012604ygrp-mkp .ygrps-yiv-940719430yiv2939012604ad a {
color:#0000ff;text-decoration:none;}
#ygrps-yiv-940719430



If you are in a customization, the adapter (current adapter) will modify the live data on the form. If you go with the Business Object then you have to re-lookup the data in order to modify it and then do a refresh. But the data is the same so

VendorDataSet vds = myAdapter.VendorData
 is teh same as

VendorDataSet vds = bo.GetByiD((vendor);




Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?


On Fri, Mar 28, 2014 at 10:35 AM, Ted Koch <tkoch77@...> wrote:
 
<div>
  
  
  <div style="font-size:8pt;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;">What is the difference in using the adapter from the business object? Is there any?<br clear="none"><div><span><br clear="none">


From: Jose Gomez <jose@...>
To: Vantage <vantage@yahoogroups.com>

Sent: Friday, March 28, 2014 9:32 AM
Subject: Re: [Vantage] Set Date01 To Null




The DataSet has a function you can call to set it to null as shown

You’ll have to get the current dataset from the adapter, something like


VendorDataSet vds = yourAdapter.VendorData;

vds.Vendor[yourRow].SetDate01Null();




Jose C Gomez
Software Engineer


T: 904.469.1524 mobile


Quis custodiet ipsos custodes?


On Fri, Mar 28, 2014 at 9:08 AM, <tkoch77@...> wrote:
 
<div>
  
  
  <div>Hi,<br clear="none"><br clear="none">Within a customization I am trying to set Date01 to null when a checkbox becomes unchecked. When I use this below I get the object not set to an instance of an object because the database field is type of datetime. What is the best way to do this, in ABL I can set it to ? <br clear="none">


edvVendor.dataView[edvVendor.Row][“Date01”] = null;

I’ve also tried setting the control’s value to null, but doesn’t make the dataview field null.


dteCertExpDate.Nullable = true;

dteCertExpDate.Value = null;

Thanks,

Ted

</div>
 


<div style="color:rgb(255,255,255);"></div>





</div>
 


<div style="color:#fff;min-height:0;"></div>





Does anyone know how you would achieve this with date fields in E10? The SetDate01Null() method is no longer.I've tried this but it won't compile in an Epicor customization. In Visual Studio with Erp.Contracts.BO.Vendor referenced it compiles fine.vds.Vendor[0].SetField<DateTime?>("Date01", null);Thanks,Ted
Same thing would work in customization mode, just  bring in the BO and reference it from the Adapter


BOdataSet ds = adapter.AdapterDataset…




Jose C Gomez
Software Engineer



T: 904.469.1524 mobile

E: jose@...
http://www.josecgomez.com

     Â


Quis custodiet ipsos custodes?


On Mon, Aug 18, 2014 at 11:09 AM, tkoch77@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>Does anyone know how you would achieve this with date fields in E10? The <span><font face="verdana, sans-serif">SetDate01Null() method is no longer.I&#39;ve tried this but it won&#39;t compile in an Epicor customization. In Visual Studio with Erp.Contracts.BO.Vendor referenced it compiles fine.vds.Vendor[0].SetField&lt;DateTime?&gt;(&quot;Date01&quot;, null);Thanks,Ted</font></span></p>



</div>
 


<div style="color:#fff;min-height:0;"></div>

This is the code I am using, but at the SetField  line it is generating an error.

                        vendorAdapt.GetByID((int)edvVendor.dataView[edvVendor.Row]["VendorNum"]);
                        VendorDataSet vds = vendorAdapt.VendorData;

                        vds.Vendor[0].BeginEdit();
                        vds.Vendor[0].SetField<DateTime?>("Date01", null);
                        vds.Vendor[0]["CheckBox01"] = false;
                        vds.Vendor[0]["CheckBox02"] = false;
                        vds.Vendor[0].EndEdit();

                        vendorAdapt.Update();


 Error: CS1061 - line 111 (660) - 'Erp.BO.VendorDataSet.VendorRow' does not contain a definition for 'SetField' and no extension method 'SetField' accepting a first argument of type 'Erp.BO.VendorDataSet.VendorRow' could be found (are you missing a using directive or an assembly reference?)


From: "Jose Gomez jose@... [vantage]" <vantage@yahoogroups.com>
To: Vantage <vantage@yahoogroups.com>
Sent: Monday, August 18, 2014 11:12 AM
Subject: Re: [Vantage] Set Date01 To Null

#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 #ygrps-yiv-1933826483yiv8897205829 --

#ygrps-yiv-1933826483yiv8897205829 .ygrps-yiv-1933826483yiv8897205829ygrp-photo-title{
clear:both;font-size:smaller;height:15px;overflow:hidden;text-align:center;width:75px;}
#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 div.ygrps-yiv-1933826483yiv8897205829ygrp-photo{
background-position:center;background-repeat:no-repeat;background-color:white;border:1px solid black;height:62px;width:62px;}

#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 div.ygrps-yiv-1933826483yiv8897205829photo-title
a,
#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 div.ygrps-yiv-1933826483yiv8897205829photo-title a:active,
#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 div.ygrps-yiv-1933826483yiv8897205829photo-title a:hover,
#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 div.ygrps-yiv-1933826483yiv8897205829photo-title a:visited {
text-decoration:none;}

#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 div.ygrps-yiv-1933826483yiv8897205829attach-table div.ygrps-yiv-1933826483yiv8897205829attach-row {
clear:both;}

#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 div.ygrps-yiv-1933826483yiv8897205829attach-table div.ygrps-yiv-1933826483yiv8897205829attach-row div {
float:left;}

#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 p {
clear:both;padding:15px 0 3px 0;overflow:hidden;}

#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 div.ygrps-yiv-1933826483yiv8897205829ygrp-file {
width:30px;}
#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 div.ygrps-yiv-1933826483yiv8897205829attach-table div.ygrps-yiv-1933826483yiv8897205829attach-row div div a {
text-decoration:none;}

#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 div.ygrps-yiv-1933826483yiv8897205829attach-table div.ygrps-yiv-1933826483yiv8897205829attach-row div div span {
font-weight:normal;}

#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 div.ygrps-yiv-1933826483yiv8897205829ygrp-file-title {
font-weight:bold;}
#ygrps-yiv-1933826483
#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 #ygrps-yiv-1933826483yiv8897205829
#ygrps-yiv-1933826483yiv8897205829ygrp-mkp {
border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}

#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 #ygrps-yiv-1933826483yiv8897205829ygrp-mkp hr {
border:1px solid #d8d8d8;}

#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 #ygrps-yiv-1933826483yiv8897205829ygrp-mkp #ygrps-yiv-1933826483yiv8897205829hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}

#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 #ygrps-yiv-1933826483yiv8897205829ygrp-mkp #ygrps-yiv-1933826483yiv8897205829ads {
margin-bottom:10px;}

#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 #ygrps-yiv-1933826483yiv8897205829ygrp-mkp .ygrps-yiv-1933826483yiv8897205829ad {
padding:0 0;}

#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 #ygrps-yiv-1933826483yiv8897205829ygrp-mkp .ygrps-yiv-1933826483yiv8897205829ad p {
margin:0;}

#ygrps-yiv-1933826483 #ygrps-yiv-1933826483yiv8897205829 #ygrps-yiv-1933826483yiv8897205829ygrp-mkp .ygrps-yiv-1933826483yiv8897205829ad a {
color:#0000ff;text-decoration:none;}
#ygrps-yiv-1933826483



Same thing would work in customization mode, just  bring in the BO and reference it from the Adapter


BOdataSet ds = adapter.AdapterDataset…




Jose C Gomez
Software Engineer



T: 904.469.1524 mobile

Quis custodiet ipsos custodes?


On Mon, Aug 18, 2014 at 11:09 AM, tkoch77@... [vantage] <vantage@yahoogroups.com> wrote:
 
<div style="" class="ygrps-yiv-1933826483">
  
  
  <div style="" class="ygrps-yiv-1933826483">Does anyone know how you would achieve this with date fields in E10? The <span style="" class="ygrps-yiv-1933826483"><font style="" class="ygrps-yiv-1933826483" face="verdana, sans-serif">SetDate01Null() method is no longer.I&#39;ve tried this but it won&#39;t compile in an Epicor customization. In Visual Studio with Erp.Contracts.BO.Vendor referenced it compiles fine.vds.Vendor[0].SetField&lt;DateTime?&gt;(&quot;Date01&quot;, null);Thanks,Ted</font></span></div>



</div>
 


<div class="ygrps-yiv-1933826483" style="color:#fff;min-height:0;"></div>





Actually I think because Date01 is not part of the original data set hmm that's gonna be tough ... there are other SetXXToNull, this is the code that they generate so perhaps try something similar

  [GeneratedCode("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), DebuggerNonUserCode]
      public void SetServDeliveryDateNull()
      {
        base[this.tableVendor.ServDeliveryDateColumn] = Convert.DBNull;
      }


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com

     Â


Quis custodiet ipsos custodes?


On Mon, Aug 18, 2014 at 11:21 AM, Ted Koch tkoch77@... [vantage] <vantage@yahoogroups.com> wrote:
Â
<div>
  
  
  <p></p><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:8pt;"><div><span>This is the code I am using, but at the SetField  line it is generating an error.</span></div>

                 Â
vendorAdapt.GetByID((int)edvVendor.dataView[edvVendor.Row][“VendorNum”]);
                  VendorDataSet vds = vendorAdapt.VendorData;

                  vds.Vendor[0].BeginEdit();


                  vds.Vendor[0].SetField<DateTime?>(“Date01”, null);

                  vds.Vendor[0][“CheckBox01”] = false;
                  vds.Vendor[0][“CheckBox02”] =
false;
                  vds.Vendor[0].EndEdit();

                  vendorAdapt.Update();



 Error: CS1061 - line 111 (660) - 'Erp.BO.VendorDataSet.VendorRow' does not contain a definition for 'SetField' and no extension method 'SetField' accepting a first argument of type 'Erp.BO.VendorDataSet.VendorRow' could be found (are you missing a using directive or an assembly reference?)


From: "Jose Gomez jose@... [vantage]" <vantage@yahoogroups.com>

To: Vantage <vantage@yahoogroups.com>
Sent: Monday, August 18, 2014 11:12 AM


Subject: Re: [Vantage] Set Date01 To Null




Same thing would work in customization mode, just  bring in the BO and reference it from the Adapter


BOdataSet ds = adapter.AdapterDataset…




Jose C Gomez
Software Engineer



T: 904.469.1524 mobile
E: jose@...

http://www.josecgomez.com

     Â


Quis custodiet ipsos custodes?


On Mon, Aug 18, 2014 at 11:09 AM, tkoch77@... [vantage] <vantage@yahoogroups.com> wrote:
Â
<div>
  
  
  <div>Does anyone know how you would achieve this with date fields in E10? The <span><font face="verdana, sans-serif">SetDate01Null() method is no longer.I&#39;ve tried this but it won&#39;t compile in an Epicor customization. In Visual Studio with Erp.Contracts.BO.Vendor referenced it compiles fine.vds.Vendor[0].SetField&lt;DateTime?&gt;(&quot;Date01&quot;, null);Thanks,Ted</font></span></div>





</div>
 


<div style="color:#fff;min-height:0;"></div>





</div>
 


<div style="color:#fff;min-height:0;"></div>