Hi Rocco

 

I think you need to select the record for update first. I am not sure what you intend to achieve with the following line:

 

custtable.AccountNum = Projinvoicetable.InvoiceAccount;

 

My guess is to replace this line with the following:

 

Select forupdate Projinvoicetable where Projinvoicetable.InvoiceAccount == custtable.AccountNum;

 

Varden Morris

 

J. Wray & Nephew Ltd. - Group I.S.

234 Spanish Town Road

Kingston 11, Jamaica, W.I.

 

Phone:  (876) - 923 - 6141 Ext. 2226
Fax:      (876) - 923 - 5372

Cell:      (876) - 3833566
Email:   [EMAIL PROTECTED]

            [EMAIL PROTECTED]  


Rocco Giumelli <[EMAIL PROTECTED]> wrote:
Hi All
 
I am Trying  to put some code in that will change a Field on a Different table when the change on the custtable  field is Modified
 
Custtable form\Datatsource\custtable\field\blocked ( this is a enum custvendorblocked)
 
Change New Field on Invoiceprojecttable  (A tick Box)
It Can not edit a record as the record has never been selected
 
Missing something????
 
Thanking you all
public void modified()
{
    ProjInvoiceTable        Projinvoicetable;
    CustVendorblocked       Blocked;
 

    super();
 
    custtable.AccountNum = Projinvoicetable.InvoiceAccount;
 
    if(custTable.Blocked  == CustVendorBlocked::All)
    Projinvoicetable.ECL_Blocked = Noyes::Yes;
    Projinvoicetable.doUpdate();
 

    If(custtable.Blocked ==  CustVendorBlocked::Invoice)
    Projinvoicetable.ECL_Blocked = Noyes::Yes;
    Projinvoicetable.doUpdate();
 

    If(custtable.Blocked ==  CustVendorBlocked::No)
    Projinvoicetable.ECL_Blocked = Noyes::No;
    Projinvoicetable.doUpdate();
 
    Projinvoicetable.doUpdate();
    custTable_ds.refresh();
 
 }

 
 
 
____________________________________________
Rocco Giumelli
IT MANAGER      
Metric Australia Pty Ltd
Assistance is only the Beginning
893745331











 


Sharing the knowledge on Axapta.



Do you Yahoo!?
Yahoo! Search presents - Jib Jab's 'Second Term'

Sharing the knowledge on Axapta.


Yahoo! Groups Sponsor
ADVERTISEMENT


Yahoo! Groups Links

Reply via email to