I have the following method attached to a form event:
if (equipmentinventory_to_equipmentspecs_by_model.getSize()<= 0);
{
equipmentinventory_to_equipmentspecs_by_model.getSize();
globals.Text1 = classification;
globals.Text2 = sub_classification;
globals.Text3 = manufacturer;
globals.Text4 = spec_it_diameter;
globals.Text5 = spec_channel_diameter;
globals.Text6 = spec_fov;
globals.Text7 = spec_angle_of_view;
globals.Text8 = spec_length;
globals.Text9 = spec_degree;
globals.Text10 = model;
equipmentinventory_to_equipmentspecs_by_model.newRecord();
equipmentinventory_to_equipmentspecs_by_model.service_classifiaction = globals.Text1;
equipmentinventory_to_equipmentspecs_by_model.sub_classification = globals.Text2;
equipmentinventory_to_equipmentspecs_by_model.manufacturer = globals.Text3;
equipmentinventory_to_equipmentspecs_by_model.it_diameter = globals.Text4;
equipmentinventory_to_equipmentspecs_by_model.channel_diameter = globals.Text5;
equipmentinventory_to_equipmentspecs_by_model.field_of_view = globals.Text6;
equipmentinventory_to_equipmentspecs_by_model.angle_of_view = globals.Text7;
equipmentinventory_to_equipmentspecs_by_model.it_length = globals.Text8;
equipmentinventory_to_equipmentspecs_by_model.degree = globals.Text9;
equipmentinventory_to_equipmentspecs_by_model.model = globals.Text10;
plugins.dialogs.showInfoDialog(‘Notification’, ‘The equipment specs for this model have been added to the database’,‘OK’);
No matter what the getsize is, the method runs completly. I was expecting that the method would only run if there where not any related records.
I have captured the output of the getsize to verify that number of related records are correct.
I must be missing something very simple.
Thanks