Axapta 3.0에서 x ++ 배치 작업을 만드는 방법은 무엇입니까?

StackOverflow https://stackoverflow.com/questions/170088

  •  05-07-2019
  •  | 
  •  

문제

Microsoft Axapta 3.0 (Dynamics Ax)의 경우 X ++에서 배치 작업을 만들고 싶습니다.

이와 같은 x ++ 함수를 실행하는 작업을 어떻게 만들 수 있습니까?

static void ExternalDataRead(Args _args)
{
...
}
도움이 되었습니까?

해결책

AX에서 배치 작업을 만드는 데 필요한 최소값은 다음과 같습니다.

연장되는 새로운 클래스를 만들어 배치 작업을 만듭니다. RunBaseBatch 수업:

class MyBatchJob extends RunBaseBatch
{
}

추상 방법을 구현하십시오 pack():

public container pack()
{
    return connull();
}

추상 방법을 구현하십시오 unpack():

public boolean unpack(container packedClass)
{
    return true;
}

무시하십시오 run() 실행하려는 코드가있는 메소드 :

public void run()
{
    ;
    ...
    info("MyBatchJob completed");
}

정적을 추가하십시오 main 수업에 수업 인스턴스를 만들고 표준을 호출하는 방법 RunBaseBatch 대화:

static void main(Args _args)
{
    MyBatchJob myBatchJob = new MyBatchJob();
    ;
    if(myBatchJob.prompt())
    {
        myBatchJob.run();
    }
}

배치 작업이 배치 목록에 설명을 갖도록하려면 정적을 추가하십시오. description 수업에 대한 방법 :

server client static public ClassDescription description()
{
    return "My batch job";
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top