def copyMasterDetail( dbid, destrid, sourcerid, copyfid = nil, recurse = nil, relfids = nil )
      
      raise "copyfid must be specified when destrid is 0." if destrid == "0" and copyfid.nil?
      
      @dbid, @destrid, @sourcerid, @copyfid, @recurse, @relfids = dbid, destrid, sourcerid, copyfid, recurse, relfids
 
      xmlRequestData = toXML( :destrid, @destrid)
      xmlRequestData << toXML( :sourcerid, @sourcerid )
      xmlRequestData << toXML( :copyfid, @copyfid ) if @copyfid
      xmlRequestData << toXML( :recurse, @recurse ) if @recurse
      xmlRequestData << toXML( :relfids, @relfids ) if @relfids

      sendRequest( :copyMasterDetail, xmlRequestData )

      @parentrid = getResponseValue( :parentrid )
      @numCreated = getResponseValue( :numCreated )

      return self if @chainAPIcalls
      return @parentrid, @numCreated
   end
def copyMasterDetail( dbid, destrid, sourcerid, copyfid = nil, recurse = nil, relfids = nil )
      
      raise "copyfid must be specified when destrid is 0." if destrid == "0" and copyfid.nil?
      
      @dbid, @destrid, @sourcerid, @copyfid, @recurse, @relfids = dbid, destrid, sourcerid, copyfid, recurse, relfids
 
      xmlRequestData = toXML( :destrid, @destrid)
      xmlRequestData << toXML( :sourcerid, @sourcerid )
      xmlRequestData << toXML( :copyfid, @copyfid ) if @copyfid
      xmlRequestData << toXML( :recurse, @recurse ) if @recurse
      xmlRequestData << toXML( :relfids, @relfids ) if @relfids

      sendRequest( :copyMasterDetail, xmlRequestData )

      @parentrid = getResponseValue( :parentrid )
      @numCreated = getResponseValue( :numCreated )

      return self if @chainAPIcalls
      return @parentrid, @numCreated
   end
API_CopyMasterDetail