Look in many xref lists for an origin ID

From Starfish ETL
Jump to navigation Jump to search
Function ScriptedField
	Dim newid
	Dim oldid
	oldid = "@@ORG:OLDID@@"
        newid = XrefRead("Accounts",oldid)
	If Len(newid) = 0 Then
                newid = XrefRead("Contacts",oldid)
	End If
	If Len(newid) = 0 Then
                newid = XrefRead("Opportunities",oldid)
	End If
	If Len(newid) = 0 Then
                'If there is no newid, then skip this row.  Uncomment this if you want to skip on a blank ID.
                'GoToNextRow
	End If
	ScriptedField=newid
End Function