Author Topic: Create a copy of secondary datatable  (Read 5270 times)

Offline komgbu

  • Administrator
  • Full Member
  • *****
  • Posts: 17
  • Karma: +1/-0
  • Gender: Male
    • View Profile
Create a copy of secondary datatable
« on: June 05, 2018, 01:54:36 PM »

Does anybody know the best approach for making this?
I think we have two ways (probably one of them is wrong...):
1) make a new server task with parameters: MakeCopy(old_record_id, new_record_id)
and inside this method retrieve all linked secondary records and make copies, and just link them to the new main record. In this case, a record with new_record_id must exists in the DB.
Then call this task from UX form (button)

2) try to pass field names/values for all secondary records through the TransitionPointParamaters (for example, userDefinedParameters)
but I'm not sure how to transfer field names / values / types properly...
If I try to use just a simple array of dictionaries to do this - it won't be transferred anyway (probably because of invalid Uxc.lib.types.NetType ... as it is the third parameter in setUserDefinedParameter( index, value, type ))... Probably I can have just a "virtual" datasets (main + secondary) and ability do not save new record with all secondaries at all...

« Last Edit: June 05, 2018, 01:57:34 PM by komgbu »