Undoing user update of a field

Undoing user update of a field

I have two bits of code that are used for different subforms on the same form. The idea behind the code is to prevent the user from changing a field on a locked row (invoiced). The first code snippet works fine, the second gives an error.  Does anyone know why that would be?

  1. if(row.Locked)
  2. {
  3. cd = PrintCustomisations[ID == row.ID];
  4. if(cd.Height1 != row.Height1)
  5. {
  6. row.Height1=cd.Height1;
  7. }
  8. return;
  9. }
  1. if(row.Invoiced)
  2. {
  3. info row.ID;
  4. pp = PrintPublication[ID == Row.ID];
  5. if(pp.Classification != row.Classification)
  6. {
  7. row.Classification=pp.Classification;
  8. }
  9. return;
  10. }

      Zoho SalesIQ Resources

            Zoho TeamInbox Resources

              Zoho DataPrep Resources

                  Zoho CRM Plus Resources

                    Zoho Books Resources

                      Zoho Subscriptions Resources

                        Zoho Desk Resources

                          Zoho Projects Resources

                            Zoho Sprints Resources

                              Qntrl Resources

                                Zoho Creator Resources

                                  Zoho WorkDrive Resources

                                      Zoho Campaigns Resources

                                        Zoho CRM Resources

                                                    Design. Discuss. Deliver.

                                                    Create visually engaging stories with Zoho Show.

                                                    Get Started Now

                                                      Zoho Show Resources

                                                        Zoho Writer Writer

                                                        Get Started. Write Away!

                                                        Writer is a powerful online word processor, designed for collaborative work.