CSV Method Call Passing Object Being Created

Hi everyone,

Is it possible to pass a record/item to a method while importing through CSV? It is possible to call a method as below, but if that method were for example take the object created as a parameter how can this object be passed in?

If ‹ validateSaleOrder › were to take an ‹ Order › object for example, how could the record being created through CSV be passed?

Example:

<input file=« sale-orders.csv » type="com.axelor.sale.db.Order"call=« com.axelor.data.tests.Validators:validateSaleOrder »>

Thank you in advance.

it’s possible have you checked docs?

1 « J'aime »

H Siddique,

Thanks for getting back. The issue isn’t calling a method but passing the object being created by CSV data to the method, I don’t believe this is in the docs but please point out to me if I am wrong.

Thanks a mill.

in method you will get record, demo explains all things related to sale import data, let me know if you need more details

1 « J'aime »

Hi Siddique,

This looks like it could do the trick. I will update you when I test it out.
Thank you a thousand for the help and quick replies as usual. It is really much appreciated.

Ce sujet a été automatiquement fermé après 30 jours. Aucune réponse n’est permise dorénavant.