with(bcAvayaAct)

                                          {

                                                 ClearToQuery();

                                                 ActivateField("Billable Flag");

                                                 bcActPlanAct.SetViewMode(AllView);

                                                 bcActPlanAct.ExecuteQuery(ForwardOnly);

                                                 var bLoop = FirstRecord();

                                                 while (bLoop)

                                                 {

                                                        SetFieldValue("AVAYA Oldest ADM1 Record","Y");

                                                        SetFieldValue("Billable Flag",oldBillableFlag);

                                                        if ( oldBillableFlag == "N")

                                                        {

                                                               var employeebc:BusComp = GetPicklistBusComp("AVAYA Override Authorization Login Name");

                                                               employeebc.ClearToQuery();

                                                               employeebc.SetViewMode(AllView);

                                                               employeebc.SetSearchSpec("Id",oldOverrideAuthorizationId);

                                                               employeebc.ExecuteQuery(ForwardOnly);

                                                               if(employeebc.FirstRecord())

                                                               {

                                                                      employeebc.Pick();

                                                               }

                                                               employeebc = null;

                                                               SetFieldValue("AVAYA Override Reason",oldOverrideReason);

                                                        }

                                                        SetFieldValue("AVAYA Oldest ADM1 Record","N");                                                                                                              

                                                        bLoop = NextRecord();                                    

                                                 }

                                                                                                                                                  

                                          }