Skip to main content

Posts

Showing posts from January, 2013

AXAPTA Ana tablo formuna git

Go to the Main Table Form has to be implemented manually. In this recipe, to demonstrate how it works, we will modify the Business relations form in the CRM module to make sure that the Employee filter at the top of the form allows users to use the Go to the Main Table Form feature from the context menu. 1. Open the formform in AOT, and override jumpRef() of the EmployeeFilter control with: "Ana tablo formuna git" butonu otomatik olarak çalışır. Ancak kontrol sadece extended data tipine bağlıysa, çalışmaz. Bu durumda kendi Jumpref methodunuzu yazmanız gerekir. Bu konuda Fatih Demirci 'nin aşağıdaki kodundan faydalandım: public void jumpRef() { EmplTable emplTable; Args args; MenuFunction menuFunction; ; emplTable = EmplTable::find(this.text()); if (!emplTable) { return; } args = new Args(); args.caller(element); args.record(emplTable); menuFunction = new MenuFunction( menuitemdisplaystr(EmplTable), MenuItemType::Display); menuFunction.run(

Kullanıcı grubu yetkilerini kodla toplu olarak güncelleme

Mesut Boztaş dan bir bilgi tşk. Yetkilendirme malumunuzdur ki AX’ın en hassas kısımlarından biridir. Bir müşterimizde SecurityKey değeri olmadan Canlıya alınan bir form menüdeki ilgili klasörü ve menüyü otomatik olarak tüm kullanıcılara açmıştır. Daha sonra forma SecurityKey değeri verilse bile birkez açılan ana anahtarlar kapanmamaktadır. Eğer çok kullanıcı grubunuz ve etki alanınız varsa bu işlemi telafi etmek uzun sürecek bir işlemdir. Altta belirtiğim job kullanılarak istenilen bir objenin yetki ayarlaması otomatik olarak yapılabilmektedir. İşlem süresi Kullanıcı grubu ve etki alanı sayısına göre değişkenlik gösterebilir.   02 static void changeAccessRights(Args _args) 03 { 04     SecurityKeySet          swSysSecurity; 05     UserGroupList           userGroupList; 06     DomainInfo              domainInfo; 07     #admin 08   09     ttsbegin; 10   11     while select domainInfo 12          //where domainInfo.id == #AdminD

Force delete inventtrans

Below is sample job to force delete inventtrans, which will take care of invent on hand update. static void DeleteInventTrans(Args _args) { Dialog dlg = new Dialog("Delete inventtrans ?"); DialogField dlgFld; InventMovement inventMovement; PurchLine purchLine; PurchLineRefRecId recId; ; dlgFld = dlg.addField(typeid(PurchLineRefRecId)); if(dlg.run()) { recId = dlgFld.value(); purchLine = PurchLine::findRecId(recId); if(purchLine) { InventMovement = InventMovement::construct(purchLine); InventUpd_DeleteMovement::newMovement( inventMovement,true).updateNow(); info("done"); } } }