Display Method in Inventory Transaction


i am new in ax and trying to make display method in inventory transaction with ETA from Purchline but the error showing “Operand types are not compatible with the operator.”. Please see the below screen shot for the code. what do i need to do to solve this.

What is the type of ArrivalId and the field purchLine.LS2ETA? They might be of different types.

purchLine.LS2ETA is date type and no idea about ArrivalId. please see the below screen shot for properties

Arrival id is Enum. Why you are assigning date value to a variable of type Enum? This is not allowed.

what do i choose for the date field

You can have any one of the solution below which are allowed in your scenario.

  1. you need to declare a date variable and store the purchline.ls2eta value in to it.
  2. you need to declare the variable as enum type and change purchline.ls2eta to enum type.

I think, the 1st option should work for you.

What type does the method should return?
If it is date, then your method and return type should be same.
Display TransDate showDate()
TransDate tDate;

// assignment
return tDate;