Question

Using an extension table in a client script

  • 14 February 2023
  • 2 replies
  • 47 views

Userlevel 4
Badge +9

How can we use fields in a extension table in a client script of type “Mobile Only”.

Ex: User have created a extension table to task and added several fields. If those fields are to be used in a client script, can those be directly used as if they are fields from the task table?

 

What is the correct use from the following two?

  1. setControlValue("TASK","CUST_FIELD_1", ‘value_1’);
  2. setControlValue("TASK_EXT","CUST_FIELD_1", ‘value_1’);

2 replies

Userlevel 6
Badge +21

Hi @Kalana Surendra

 

in client script, what you have set is table name and the value. So 

  1. for custom field

setControlValue("custom","CUST_FIELD_1", ‘value_1’);

 

  1. if you use ext table (assume table name is task_ext)

setControlValue("task_ext","CUST_FIELD_1", ‘value_1’);

 

Thank you

Isuru Wijeratna

Userlevel 3
Badge +6

If you have your metadata set up correctly for the TASK_EXT table as an Extension of TASK, you should never see the TASK_EXT table in the mobile database.  Therefore, the mobile client would consider the CUST_FIELD_1 column to be on the Task table.  Verify you do NOT have the TASK_EXT table set up in the Sync Rules.  Your script should refer to task.cust_field_1.

Reply