Skip to main content
Question

Execute Copy using Client Script


Forum|alt.badge.img+6

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

Shneor Cheshin
Superhero (Employee)
Forum|alt.badge.img+27

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!


SAMLK
Hero (Partner)
Forum|alt.badge.img+13
  • Hero (Partner)
  • April 17, 2024

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings