How to create association in a Java Action for new projects

0
Hello, I have tried for the below association in java action .But, i'm not getting the result. Please help me out with the correct syntax.   IMendixObject A = Core.instantiate (getContext(), CUSTOMER.entityName.toString()); A.setValue (getContext(), CUSTOMER.MemberNames.CUSTOMER_ORDER.toString(), getInt(1));
asked
1 answers
-3

Did you really name your entity CUSTOMER?

I'd recommend learning the basics of Java before attempting to write your own Java actions.

To answer your question, and assuming sensible naming for your objects:

 

Customer customer = new Customer() (or Customer(getContext() , not sure).

customer.setCustomer_Order(order);

 

answered