Thursday, December 20, 2012

Go to main table reference for display fields


12-18-2012
Go to main table reference for Display fields
Problem:   My task was to enable the go to main table reference for display fields (using display methods instead of table fields)
Solved:      In normal table fields EmplId used formref properties to enable the go to main table reference for display fields. There are no such properties. Rather than dynamics provides one method called jumpref. You can override this method in forms to enable this go to main table functionality. Here I given some sample code.
 
                         args = new Args();
                         args.caller(element);
                         args.record(Datasource);
 menuFunction = new MenuFunction(menuitemdisplaystr        (menuitemname),MenuItemType::Display);
             menuFunction.run(args);

Tuesday, May 29, 2012

Batch Job System Date Problem


05-29-2012

Batch job system date problem

Problem: I created the exchange rate update automation (previous blog) for client. But when I check this exchange rate I changed the system date to verify whether the add-on working on month end or not. After i changed the system to original date since the batch job is not working unless the system date changed to the future date.

Solved:    I tried various forums; I didn’t find any solution related to this. At last I found the solution in community dynamics blog . In this article the author explained the whole batch job process in depth. Here I found out the vital point for batch processing. Please read the article before get into details that I am going to explain here.

BatchGlobal -This table responsible for Batch processing and Cleanup the dead tasks. What i am saying here is, it is responsible for changing the job from waiting to executing status vice versa and Executed tasks changed to end status.
                        This table contains the date and time of job when to execute and when to end. You cannot open the table directly, AOS won’t allow it. So you can open it using a job. See the below screen
Batch Infolog

                        When you change the system date, batchGlobal dates changed to future date (last executed job date and time). So the current date jobs cannot be executed the Batch engine wait for the future date to come.
                        Changing the date to current date in batchGlobal table will solve this problem. But you can’t change it in AOS you must go to sqlserver to change the date to current date (time should be 5 hours behind the current time you will understand this if you read the blog), and then wait sometime it won’t affect quickly it take some time.