Author Topic: Create a copy of secondary datatable  (Read 183 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 »
Hi!

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...

Thanks!
« Last Edit: June 05, 2018, 01:57:34 PM by komgbu »
http://www.bfs-corp.com/

26 Bloomsbury Street, London WC1B 3QJ
Switchboard & Fax +44 (0) 845 057 4148