We have a rest api call where id is passed needs to be cloned in order to get a new record for the object. As the object has multiple record types, so we want to get fields based on the record type. Is it possible to get fields based on record type of an object? The purpose of getting those fields were we do not need to fill few fields while cloning the record.
For example RecordType A has following fields FieldName1 FieldName2 FieldName3 FieldName4
RecordType B has following fields FieldName1 FieldName3 FieldName5
While cloning the record we do not want to copy the FieldName3,FieldName4 value for RecordType A and similarly do not want to copy FieldName3 value for RecordType B.
If I use standard Clone(), then is it possible to avoid cloning few field values?
Thanks in advance.