App Builder : action

Hi there,

i try to implement with App Builder a personalized form in which the user selects a partner and automatically the partner’s information fullfilled all the other fields (like fixed phone, address, …).

In Action Builder i have created an action with these fields :
Json : selected
App Builder : my-application
Name : action-getdata-partner
Type: Update
Object : My-Personnal-Object
Fields :
Target field : location
Value Expr : $.partner.fixedphone

In my form, i call, in the property Onchange of the corresponding field partner, i call action-getdata-partner (the action i have created before)

Any ideas ?

Thk in advance

There is an issue with field name you have specified inside expression it should be ‘fixedPhone’ instead of ‘fixedphone’ .

Thx but i still have this error : TypeError: Cannot get property “fixedPhone” of null in

I think it’s because it can’t find partner model. (null)

Thus my question is : with Action Builder is it possible to set a personalized field with an axelor field ?

You can put condition for null check. What do you mean by personalised field and for what purpose you need it ? You can create dummy field and can use that dummy field in other expressions with ‘_$.dumyField’.

Some more explanations:
In Model Studio i’ve created a custom model in which the user can select a partner name.
My purpose is, when user selects a partner, automatically the partner address information fullfilled my custom field “Location”.
So i’ve created :
custom field : PartnerR (type:manytoone - targetModel:Partner)
custom field : Location (type:string)

then in Action Builder i’ve created an action which is called when user selects an other partner :
Json : selected
App Builder : my-application
Name : action-getdata-partner
Type: Update
Object : My-Personnal-Object
Target field : Location
Value Expr : $.PartnerR.partnerAddressList.City

but it doesn’t work.

You have to provide sub binding by using ‘Sub lines’ for relational fields.