Dear sirs, on InsertRecord from Item form I've a control that detects if a new item contains -A it automatically shows a message and inserts another item.
itemprob := STRPOS("No.", '-A');
IF itemprob <>0 THEN
MESSAGE('Now you will enter a new item');
CREATE(WshShell);
WshShell.SendKeys('{F3}');
It runs me well. Just only I want that insert the new item when I acept the message, not after or before. I don't want to use a "if confirm". It's posible?.
Thanks in advance.
0
Comments
I don't understand why you use Sendkeys and not a record variable. :?:
Thanks for help.
If it is not before or after then when will it occur?
Thanks.
If you use MESSAGE the command will execute immediately. If you want to wait until confirmation you need to use CONFIRM (or some other dialog). What if the user decides to fill the item no. and go smoke a cigarette? You will need to manage the transaction with some commit in order to avoid blocking the table.
Can you explain the meaning of -A? Maybe what you are trying to achieve can be implemented in another way...
Thanks for your help and time.
I mean; I assume this is a joke right? :-k
RIS Plus, LLC
:shock: Sorry?, I don't understand...
Exactly and if you don't understand, how can we be expected to understand the problem and help you. You need to explain the business need of what you are doing. The code you have written should all be simply deleted and thrown away.
Explain the issue clearly and all will become clear.
How else would the system know if you want to add a new item or not?
you even say "Simply I want that it insert another item when I accept the message, not before or after"
How will you accept the message without a YES/No Choice?
I know this has to do with your last post,
viewtopic.php?f=23&t=34933
but i still think a simple message reminder should be enough for the user.
Auto Inserting Items can only be problematic.
http://www.BiloBeauty.com
http://www.autismspeaks.org
Simply wanted to appear the message and after press "Accept" insert the new item, but I thought it meant by your comment that it was not possible, that I had to use "confirm", but I can't for the reasons I have explained. Obviously there is a reason what I want to do it, but it will be very long to explain.
I hope to have explained well.
Thanks for help.
Leroy, it has nothign to do with your language skills. We understand what you are trying to do. BUT we are saying that what you are doing is WRONG. You feel that we are saying that the code is wrong, but that is not the case. We are saying that the underlying business principles are wrong and that you need to go back to the client and rethink this in Navision terms.
if you don't know how to do the business analysis then you need to get someone senior in the company to do this analysis. If there is no one senior enough to analyze such a simple requirement then your company should not be allowed to sell Navision.
Thanks anyway for your help.