Hello All,
Should be simple this one but its not quite clicking...
I have a field called Sentforapproval. This is boolean.
This exists within the Sales Quote subform and within Sales Line.
If this is set to TRUE, I want to make the entire record un-editable, if the user goes back into the quote.
I have tried various methods including (for example) the setting of the currform.quantity.editable(false) within various sections including OnNextRecord etc.
It seems to work for one record but if there are three records in the subform, and not all have Sentforapproval = TRUE, they still get set to editable(false). This is the same if you navigate to another record, even if the particular sentforapproval is set to FALSE, the field in question remains locked.
Any ideas?
Am I missing something simple?
0
Comments
Try transferring your field to the header record. This will then allow you to choose any of the three lines on that subform and ALL will show the same status.
Then the code can be something quite easy such as...
If Header.SentForApproval=true then
Currform.Subformname.Editable=False
else
Currform.Subformname.Editable=True;
where Subformname is the name that you apply to the subform.
you will need to put this on the various triggers so that it cannot be bypassed by changing records etc..
Hope it helps.
All you have to do then is to call this procedure on the OnOpen and OnAfterGetRecord triggers.
ie.
p_SetEdit(Sentforapproval = TRUE);