cancel
Showing results for 
Search instead for 
Did you mean: 

How to set a value to field "DELIVERY_TERM_LOCATION"

Former Member
0 Kudos

Hi

I use code like this:


doc.getFieldMetadata("DELIVERY_TERM_LOCATION").set(doc, "test_incoterm_location");

after save value haven't change

What I do worng ?

Thank you

Sujirach

Accepted Solutions (1)

Accepted Solutions (1)

former_member190023
Contributor
0 Kudos

Hello Sujirach,

The code you are using is correct, so the problem is somewhere else.

In what script do you have this code?

Bogdan

former_member190023
Contributor
0 Kudos

Hello Sujirach,

I just remembered that the Delivery Term fields on the MA are actually TRANSIENT. This means that you will not be able to directly set those field values.

To change a Delivery Term (incoterm) you will have to use something like:


// example to change first

delTermColl = doc.getCollectionMetadata("DEL_TERM_COLLN").get(doc);

delTermLine = delTermColl.get(0);

delTermLine.setLocation("test_incoterm_location");

Regards,

Bogdan

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you very much Vigneshwar Reddy and Bogdan Toma

Regards,

Sujirach

Former Member
0 Kudos

Hello Sujirach,

Try to execute below syntax:

doc.getFieldMetadata("DELIVERY_TERM_LOCATION").set(doc, test_incoterm_location);


This will solve your issue.


Regards,

Vignesh