Skip to main content

Dears,

 

Please let us know the function which is used to call copy map in Client scripts.

As I need to create a new task based on old task data.

 

Thanks & regards,

Narsing

Hi @Narsing Rao 

I am not aware of such a client script function.

You can consider using createInsertRequest() functionality or an XML business rule.

Cheers!


Hi @Narsing Rao 

If you are using the web client scripts, then suggesting you to get the perform_copy MPM to execute in your client script (have not tried this one before, but I have been able to call several other MPMs using the web client scripts).

The general MPM for perform_copy mpm looks like this in XML. Therefore, you need to format the xml message accordingly.

<perform_copy>
<parameters>
<key_item />
<key_item />
<column_name />
<column_value />
<table_name />
<copy_map_id />
<copy_from_keys />
<copy_to_keys />
<user_input_values />
<table_name />
<column_name />
<column_value />
<user_input_value />
</parameters>
</perform_copy>

webclient script  

var performExecuteVars = {};
performExecuteVars.column_name = 'task_id';
performExecuteVars.copy_map_id = 'YOUR_MAP_ID';
performExecuteVars.table_name = 'task';
performExecuteVars.copy_from_keys = {task_id:previous_task_id};
performExecuteVars.table_name = 'task';
performExecuteVars.column_name = 'task_id';
var results=executePerform('copy', performExecuteVars);

 


Reply