#NEWLINE# def custom_field( self , object_name , field_name , field_label , field_type = 'Text' , length = 255 , external_id = False ) : #NEWLINE# #INDENT# field_name = self . _ensure_custom_name ( field_name ) #NEWLINE# name = '.' . join ( ( object_name , field_name ) ) #NEWLINE# custom_field = self . client . factory . create ( 'CustomField' ) #NEWLINE# custom_field . fullName = name #NEWLINE# custom_field . label = field_label #NEWLINE# custom_field . type = field_type #NEWLINE# if ( ( field_type == 'Text' ) and length ) : #NEWLINE# #INDENT# custom_field . length = length #NEWLINE# #UNINDENT# custom_field . externalId = external_id #NEWLINE# return custom_field