Selasa, 15 April 2014

Cannot update LogisticPostalAddress

Hallo
saat ini aku sedang mencoba untuk mengupdate record yang ada di table LogisticsPostalAddress. Tetapi system malah mengeluarkan error seperti dibawah ini "Cannot edit a record in Addresses (LogisticsPostalAddress). Update on a valid time state table is not allowed without specifying a ValidTimeStateUpdateMode."
what u have todo is,... make sure u call validTimeStateUpdateMode method.

here is the example

static void Job12(Args _args)
{
    RecId   _recid;
    LogisticsPostalAddress      _dlvadress;
    ;
   
    ttsBegin;
    _dlvadress.validTimeStateUpdateMode(ValidTimeStateUpdate::Correction);
    select forUpdate _dlvadress where _dlvadress.RecId == 5637147898;
   // _dlvadress = LogisticsPostalAddress::findRecId(5637147898,true); or ucan try this
   
        _dlvadress.Address = "Cirebon";
        _dlvadress.update();
    ttsCommit;

}

OK...
selamat mencoba

Tidak ada komentar:

Posting Komentar