6 Replies Latest reply: Aug 8, 2013 7:57 AM by InoL RSS

    How to ensure a record is created in a block linked to a detail block?

    user11938516

      Hi All,

       

      I am stuck. In my form I have a master block (blockA), a detail block (blockB) and a third block (blockC) that is linked to blockB via a standard relation on blockB where blockB.id = blockC.id. In blockB if column adtype = 'P' then the requirement is that a corresponding record is entered into blockC. So If I enter several detail records into blockB and set adtype = 'P' on each then I can double click on each and add the details to blockC. Save. This works fine and when I re-query each of the records can be seen as appropriate. The problem I'm facing is enforcing a record to be entered into blockC based on the adtype equaling 'P' in blockB. I have tried performing checks in lots of different triggers but to no avail the same thing keeps happening which is this. If I create more than one record in blockB with an adtype of 'P' but don't enter any details into blockC my checks will always flag this up when saving. If however I enter some details into blockC for the first of the records from blockB with an adtype of 'P' then all checks are passed and no errors are raised. It is as if that now a record exists in blockC I can no longer check for the existence of a record even though that record is only applicable to the first record in blockB and not any of the others??

       

      I hope I have explained this clearly enough for someone to come to my aide as I am truly stumped!

       

      Many Thanks in advance

       

      Matt