There is a post on the forum with a similar problem but it hasn’t been asnswered so I have created another topic.
I am using the Cfront.Net Api within an Asp.net aaplication.
I get the error 1246279 with no descripttive message when searching for records in some tables :
cFront.SetFilter(table, 3, "=37615");
cFront.FindRecord(table, record, false, false);
It’s the only set filter.
The record exists. I tried to allow all Navision errors but it doesn’t change anything.
Now, if I change the number to:
cFront.SetFilter(table, 3, "=2889");
cFront.FindRecord(table, record, false, false);
It works. But number 1001 makes an error.
I once had an error message:
1246279 - Error Message: There is no Purchase Line within the filter. Filters: Document No.: =2889
Which is a false statement.
If anyone has experienced the same issue and dealt with it I would appreciate any help given.
Answers
Try to use just
or try to add aphostrophe
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I tried using the SetRange method too.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
And I get the same error message each time.When I restart the asp.net test server, the first time I run the code the message is more detailed (like the one in the first post):
2) In your first message you are working with the table "Purchase Line". In your last message you are talking about table "Purch. Inv. Line". Which table you checked for existency of this record??? Open the DB through Navision client and check the correct table for correct record once again...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
2) I have been playing with different tables, and the last error message is correct actually there is no such record. I got mixed up somewhere.
I have redone my testing again and know it seems to work !
I can use any of the following syntax :
Now the error message I mentioned:
Is actually valid (am I mad?). I think I’ve been making up all this (maybe I need some rest ?).Thanks for asking me to redo everything !
I noticed a strange behaviour from the Api where I got error messages related to tables I wasn’t trying to access (but I had just before). In fact the error message was the last I had regardless of the new parameters.
Restarting the asp.net test server seemed to solve the problem.
Actually I just trapped this behaviour !
Throws an error: it’s valid.
Throws the same error but the table is different (there should be an error though) !
I restart the Asp.net test server, run the code and I get:
Which is valid. The only thing I can say is that I don’t call the CloseTable or CloseTable methods yet (debugging stage). The test server even get’s unstable and crashes after a while (tries to write in protected memory).
Also, I don’t understand why an error is raised with the following code :
Gets the following error :
Why is the error raised (or the Allow method is unclear for me) ?
Thanks again for you answers to what was obviously only wrong in my poor mind.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Not a very constructive topic but I really spent a lot of time lost in my false errors before posting here.
:oops:
Not to be cheeky but the 85132272 error code allowed by the Allow method is not really the same as the 1246279 raised error code.
It is common, that if you do not know where is the problem, after "look from outside" you find it... (I am asking my co-workers nearly each day for help and right after the question, I see the error clearly...).
I am not using C/Front, I do not know the error nos. or their meanings. But for me it seems like if you are not using the return value, you will have error although you set to allow the error... 8)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.