Property Boolean pbForeignReadOnly
Read Access: | Get pbForeignReadOnly to BooleanVariable |
Write Access: | Set pbForeignReadOnly to BooleanVariable/Value |
When set to true, you are telling the system that this DD never changes when it is used as a foreign (parent) table.
This means the record will not be changed by
1) direct changes in the class
2) switching its parent
3) by changes in a child (usually through Update, Backout or Deleting).
If any of these changes occur during a foreign save or delete, an error will be raised and the entire transaction will be rolled back. This will be tested right before Save_Main_File is sent during either a save or a delete.
If an error occurs, this is most likely a programming error. You've told the DD it will not change, but it has. This can be particularly useful with alias tables, because you most often use alias tables as parents and you most often do not want them to be changed. Setting this True in the DD provides a quick and easy way to make sure that this is really the case. When there is a change, we raise an error instead of just not saving the changes in the record. If there are changes you were not expecting, you may have a serious problem which should be resolved. You don't want the DD to guess your intent.
This only applies to foreign saves because Read_Only_State will stop many DD saves and deletes from occurring.