Views:

Description

Clones a record and optionally can clone all 1:N & N:N records.

e.g. 1 Shows how to clone the current account entity along with all its related 1:M contacts and opportunities

Signature

Clone('entityname', 'guidofentity', 'relationshipname', 'ignorefields', 'enableprefix')

Example 1

Clone('account',[account.accountid], 'contact_customer_accounts', 'opportunity_customer_accounts', false)

Example 2

How to clone just the account itself.

Clone('account',[account.accountid])

Example 3

How to clone the salesorder entity, the related order detail records and ignore some fields for the clone process.

Clone('salesorder',
      [salesorder.salesorderid],
      'order_details',
       SetIgnoreFields('new_clonethisorder', 'new_privatetaxnumber'), true)

Example 4

How to clone the salesorder entity and ignore some fields for the clone process.

Clone('salesorder', 
       [salesorder.salesorderid], 
       SetIgnoreFields('new_clonethisorder', 'new_privatetaxnumber'), false)

Parameters

Name Type Description Required
entityname xxxx xxxx xxxx
guidofentity xxxx xxxx xxxx
relationshipname xxxx xxxx xxxx
ignorefields xxxx xxxx xxxx
enableprefix xxxx xxxx xxxx