September 23, 201213 yr hi, I an new to scripting. I have made a this script myself. Script does execute fine. But there is one little problem with it. At some specific point it does not assigns value to the field. I don't know why. I am attaching the image of my script. Because i don't know how to export it in TEXT format. I am highlighting the part that suppose to assign a value in the field.
September 23, 201213 yr Hi! I believe you need to add a Commit Record/Request immediately before the Delete Record. It has caught me before. You cannot delete a parent if it has a current child still active (as in your situation).
September 23, 201213 yr Author Hi! I believe you need to add a Commit Record/Request immediately before the Delete Record. It has caught me before. You cannot delete a parent if it has a current child still active (as in your situation). But i am not trying to delete the Parent Record. I am in Sale Detail table. Which is child of Sale Table and i am deleting it in Sale Detail. In the box i have highlighted. The second last command set variable. it does not assign value in Product Tables Stock field. Although i have debugged the script the variable contains my required value, It is not assigned to the Stock Field! Why?
September 23, 201213 yr I understand ... but by parent, I mean you are trying to delete the record you are currently on. But it cannot set that related record with a value if ITS parent does not exist and FM therefore will not allow that related Set Field[]. Did you try the Commit? EDIT LATER ... it would probably be clearer if I said that, it isn't that FM stops the Set Field[], but since there is no commit before deleting the 'parent', it reverts it. Edited September 24, 201213 yr by LaRetta
September 23, 201213 yr Author I understand ... but by parent, I mean you are trying to delete the record you are currently on. But it cannot set that related record with a value if ITS parent does not exist and FM therefore will not allow that related Set Field[]. Did you try the Commit? thanks bro, you just saved my 50$. Thank you very much. :laugh:
September 23, 201213 yr It's a bit of a tricky-wicket because you would think that, by deleting the child's parent, that WOULD be a commit in its purest sense, LOL. I LOVE having these kinds of things happen to me because they stick very deep (although sometimes painfully). I will NEVER forget how to use 'Do not evaluate if all referenced fields are empty' for that very reason.
Create an account or sign in to comment