Kişi bilgileri gizlidir. Logo çalışanları görebilir.

Extensions tabloya obje ile data insert edememe sorunu

  Tiger/Logo Objects

Merhabalar,


Tiger'da Cari Kart formuna arayüz uyarlama ile eklenen alanlara obje üzerinden veri insert etmek istiyoruz fakat arayüz uyarlama tarafında otomatik oluşturulan LG_XT1015_XXX şeklindeki tabloya veri insert edemiyoruz. Kullanmış olduğumuz örnek kod aşağıdaki gibidir, konu ile ilgili desteğinizi rica ederiz.


r1 := LApp.NewDataObject(30);

r1.New;

r1.DataFields.FieldByName('ACCOUNT_TYPE').Value := 3;

r1.DataFields.FieldByName('CODE').Value := CariKodu;

r1.DataFields.FieldByName('CONTACT').Value := qm.FieldByname('ADI').AsString;

r1.DataFields.FieldByName('CONTACT2').Value := qm.FieldByname('SOYADI').AsString;

r1.DataFields.FieldByName('E_MAIL').Value := qm.FieldByname('EPOSTA').AsString;

r1.DataFields.FieldByName('TITLE').Value := qm.FieldByname('CARIACIKLAMA1').AsString;

r1.DataFields.FieldByName('TITLE2').Value := qm.FieldByname('VELIADISOYADI').AsString;

r1.DataFields.FieldByName('TCKNO').Value := CariKodu;

r1.DataFields.FieldByName('NAME').Value := qm.FieldByname('ADI').AsString;

r1.DataFields.FieldByName('SURNAME').Value := qm.FieldByname('SOYADI').AsString;

r1.DataFields.FieldByName('ADDRESS1').Value := qm.FieldByname('VELIADRES').AsString;

r1.DataFields.FieldByName('TELEPHONE1').Value := qm.FieldByname('VELITELEFONGSM').AsString;

r1.DataFields.FieldByName('PERSCOMPANY').Value := 1;

r1.DataFields.FieldByName('ACCOUNT_TYPE').Value := 3;

r1.DataFields.FieldByName('EXPBRWS').Value := 1;

r1.DataFields.FieldByName('FINBRWS').Value := 1;

r1.DataFields.FieldByName('IMPBRWS').Value := 1;

r1.DataFields.FieldByName('PURCHBRWS').Value := 1;

r1.DataFields.FieldByName('SALESBRWS').Value := 1;

r1.DataFields.FieldByName('PURCHBRWS').Value := 1;

r1.DataFields.FieldByName('SALESBRWS').Value := 1;

r1.DataFields.FieldByName('INVOICE_PRNT_CNT').Value := 1;

r1.DataFields.FieldByName('ISFOREIGN').Value := 0;

r1.DataFields.FieldByName('EXT_ACC_FLAGS').Value := 3;

r1.DataFields.FieldByName('CITY_CODE').Value := VeliIl;

r1.DataFields.FieldByName('CITY').Value := qm.FieldByname('VELIIL1').AsString;

r1.DataFields.FieldByName('COUNTRY_CODE').Value := 'TR';

r1.DataFields.FieldByName('COUNTRY').Value := 'TURKIYE';

r1.DataFields.FieldByName('TOWN_CODE').Value := veliIlce;

r1.DataFields.FieldByName('TOWN').Value := qm.FieldByname('VELIILCE1').AsString;

r1.DataExtensions[0].Fields.FieldByName('OGRENCI_TCKN').Value := qm.FieldByname('CARIKODU1').AsString;

r1.DataExtensions[0].Fields.FieldByName('OGRENCI_ADI').Value := qm.FieldByname('ADI').AsString;

r1.DataExtensions[0].Fields.FieldByName('OGRENCI_SOYADI').Value := qm.FieldByname('SOYADI').AsString;

r1.DataExtensions[0].Fields.FieldByName('SUBE_ADI').Value := qm.FieldByname('KAMPUS1').AsString;

r1.DataExtensions[0].Fields.FieldByName('OGRENCI_DOGUM_TARIHI').Value := '';

r1.DataExtensions[0].Fields.FieldByName('OGRENCI_DOGUM_YERI').Value := '';

r1.DataExtensions[0].Fields.FieldByName('OGRENCI_CINSIYET').Value := '';

r1.DataExtensions[0].Fields.FieldByName('VEL_TCKN').Value := qm.FieldByname('VELIKIMLIKNO').AsString;

r1.DataExtensions[0].Fields.FieldByName('VELI_ADI').Value := qm.FieldByname('VELIADI').AsString;

r1.DataExtensions[0].Fields.FieldByName('VEL_SOYADI').Value := qm.FieldByname('VELISOYADI').AsString;

r1.DataExtensions[0].Fields.FieldByName('VELI_DOGUM_TARIHI').Value := '';

r1.DataExtensions[0].Fields.FieldByName('VELI_DOGUM_YERI').Value := '';

r1.DataExtensions[0].Fields.FieldByName('VELI_CINSIYET').Value := '';

r1.DataExtensions[0].Fields.FieldByName('VELI_MESLEK').Value := qm.FieldByname('VELIMESLEK').AsString;

r1.DataExtensions[0].Fields.FieldByName('VELI_CEL_TEL').Value := qm.FieldByname('VELITELEFONGSM').AsString;

r1.DataExtensions[0].Fields.FieldByName('VELI_ACIK_ADRES').Value := qm.FieldByname('VELIADRES').AsString;

r1.DataExtensions[0].Fields.FieldByName('VELI_SEMT').Value := '';

r1.DataExtensions[0].Fields.FieldByName('VELI_ILCE').Value := qm.FieldByname('VELIILCE1').AsString;

r1.DataExtensions[0].Fields.FieldByName('VELI_IL').Value := qm.FieldByname('VELIIL1').AsString;

if r1.Post Then

begin

s := '[Cari ][Ok][' + IntToStr (FirmaId) + '][' + CariKodu + ']';

end else begin

s := '[Cari ][Er][' + IntToStr (FirmaId) + '][' + CariKodu + '][';

for j := 0 to r1.ValidateErrors.Count - 1 do

begin

s := s + r1.ValidateErrors[j].Error;

end;

s := s + ']';

end;





Kişi bilgileri gizlidir. Logo çalışanları görebilir.

Merhabalar cari ekleyebilmek için aşağıdaki kod bloğunu kulla bilirsiniz. Kapalı olan alanlar aktarımda kullanmadım nesne başvuruna ayarlanamadı hatası alıyorum büyük ihtimal yanlış veri aktarımı var incelenmesi gerekir. Sadece zorunlu olan cari koduna göre aktarım yapınca kod çalışmaktadır.


UnityObjects.Data r1 = Global.UnityApp.NewDataObject(UnityObjects.DataObjectType.doAccountsRP);

r1.New();
r1.DataFields.FieldByName("CODE").Value = "CariKodu.001";

//r1.DataFields.FieldByName("ACCOUNT_TYPE").Value = 3;



//r1.DataFields.FieldByName("CONTACT").Value  = "ADI";

//r1.DataFields.FieldByName("CONTACT2").Value  = "SOYADI";

//r1.DataFields.FieldByName("E_MAIL").Value  = "EPOSTA";

//r1.DataFields.FieldByName("TITLE").Value  = "CARIACIKLAMA1";

//r1.DataFields.FieldByName("TITLE2").Value  = "VELIADISOYADI";

//r1.DataFields.FieldByName("TCKNO").Value  = "CariKodu";

//r1.DataFields.FieldByName("NAME").Value  = "ADI";

//r1.DataFields.FieldByName("SURNAME").Value  = "SOYADI";

//r1.DataFields.FieldByName("ADDRESS1").Value  = "VELIADRES";

//r1.DataFields.FieldByName("TELEPHONE1").Value  = "VELITELEFONGSM";

//r1.DataFields.FieldByName("PERSCOMPANY").Value  = 1;

//r1.DataFields.FieldByName("ACCOUNT_TYPE").Value  = 3;

//r1.DataFields.FieldByName("EXPBRWS").Value  = 1;

//r1.DataFields.FieldByName("FINBRWS").Value  = 1;

//r1.DataFields.FieldByName("IMPBRWS").Value  = 1;

//r1.DataFields.FieldByName("PURCHBRWS").Value  =1;

//r1.DataFields.FieldByName("SALESBRWS").Value  =1;

//r1.DataFields.FieldByName("PURCHBRWS").Value  =1;

//r1.DataFields.FieldByName("SALESBRWS").Value  =1;

//r1.DataFields.FieldByName("INVOICE_PRNT_CNT").Value  =1;

//r1.DataFields.FieldByName("ISFOREIGN").Value=0;

//r1.DataFields.FieldByName("EXT_ACC_FLAGS").Value=3;

//r1.DataFields.FieldByName("CITY_CODE").Value=" VeliIl";

//r1.DataFields.FieldByName("CITY").Value= "VELIIL1";

//r1.DataFields.FieldByName("COUNTRY_CODE").Value= "TR";

//r1.DataFields.FieldByName("COUNTRY").Value= "TURKIYE";

//r1.DataFields.FieldByName("TOWN_CODE").Value= "veliIlce";

//r1.DataFields.FieldByName("TOWN").Value  = "VELIILCE1" ;

//r1.DataExtensions[0].Fields.FieldByName("OGRENCI_TCKN").Value= "CARIKODU1";

//r1.DataExtensions[0].Fields.FieldByName("OGRENCI_ADI").Value= "ADI";

//r1.DataExtensions[0].Fields.FieldByName("OGRENCI_SOYADI").Value  = "SOYADI";

//r1.DataExtensions[0].Fields.FieldByName("SUBE_ADI").Value = "KAMPUS1";

//r1.DataExtensions[0].Fields.FieldByName("OGRENCI_DOGUM_TARIHI").Value  = "";

//r1.DataExtensions[0].Fields.FieldByName("OGRENCI_DOGUM_YERI").Value  = "";

//r1.DataExtensions[0].Fields.FieldByName("OGRENCI_CINSIYET").Value  = "";

//r1.DataExtensions[0].Fields.FieldByName("VEL_TCKN").Value  = "VELIKIMLIKNO";

//r1.DataExtensions[0].Fields.FieldByName("VELI_ADI").Value  = "VELIADI";

//r1.DataExtensions[0].Fields.FieldByName("VEL_SOYADI").Value  = "VELISOYADI";

//r1.DataExtensions[0].Fields.FieldByName("VELI_DOGUM_TARIHI").Value  = "";

//r1.DataExtensions[0].Fields.FieldByName("VELI_DOGUM_YERI").Value  = "";

//r1.DataExtensions[0].Fields.FieldByName("VELI_CINSIYET").Value  = "";

//r1.DataExtensions[0].Fields.FieldByName("VELI_MESLEK").Value  = "VELIMESLEK" ;

//r1.DataExtensions[0].Fields.FieldByName("VELI_CEL_TEL").Value  = "VELITELEFONGSM" ;

//r1.DataExtensions[0].Fields.FieldByName("VELI_ACIK_ADRES").Value  = "VELIADRES" ;

//r1.DataExtensions[0].Fields.FieldByName("VELI_SEMT").Value  = "";

//r1.DataExtensions[0].Fields.FieldByName("VELI_ILCE").Value  = "VELIILCE1" ;

//r1.DataExtensions[0].Fields.FieldByName("VELI_IL").Value  = "VELIIL1" ;


04/06/18 11:57

Cevap vermek için giriş yapmanız gerekmektedir.