Unable to create a purchase invoice, credit memo

Hi I dont know what’s happen but here is my problem: - Yesterday, i did a training with develop license ( not customer license) which i shouldnt ( mistake) and I showed them a cutom report and how to archive some documents. everything works well. - Today i want to create a purchase invoice ( by using customer license as i should do the first time) and to create a purchase credit memo. This is the message that i have: " You do not have permissions to read the Purchase header Archive table". Before all of this, with that license , i could be able to create purchase invoice and credit memo. So know what can i do??? Thanks.

What is it exactly you are trying to do? Do you want to invoice the order that you created with the developers license? Sometimes this happens when some records are in the database which according to the license shoud not be there. If navision does a find on this table, asuming that if not in the license there is no result, this error occurs. If the customer does not have the archive function you can try to empty these tables. I hope I’ve put this cleary, because it is kind of a technical thing.[;)]

the problem is that if you delete a purch header with dev. license a record is inserted in the arcive table since you have permission to insert with the dev. license. Later when you work with the clients license you will get an error since you have data in a table for which the customer does not have license to. The solution is to delete the record and modify the code that’s archiving so you don’t do the same mistake again.

I agree that doing both options is the most safe way to go.[^]

Basically you can write code in Navision to see if a record exists, you can do just about all functions on a table, (including populating fields, validating, using as a temprecord etc) WITHOUT actually having the license to do so. BUT if you try to insert or modify, or to read an existing record, then permissions come into effect (read, modify, insert), and give an error message if the user license does not have permission. So when you delete (say) a Purchase Header, there is some code like If ArchivePurchHeader.FIND('=><') then begin DoSomethingHere Now since your Devleopers license allowed you to insert the record, the FIND now returns a record, and generates an error. What Lars is saying, is that you need to reopen the database with your developer license, and find the ArchivePurchHeader and Line tables, and delete all the records. Its a common begiers mistake to think that a Devlopers license is a good thing to use, but thats why they don’t give them out untill you pass a few tests. (I am making a guess that it wasn’t your devlopers license that you were using, but maybe I am wrong.) As for Lars’ suggestion of modifying th ecode, I agree that would be good, but its better to just be carefull using a developers license. If there is an actual need to use it, then why not set up a security role that will not let you insert records into tables that the user is not licensed for. Its just a quick 5 minute bit of code to do that.

OK! So when all lines have been deleted in the Purchase header archive table, what am i suppose to do then step by step? Thanks

Hi Tatiana, I don’t want to be rude, but … do you have your own developers license, or in other words, are you a developer. If not then really you should not use a developers license on a clients database, since it is just too easy to screw it up. If there is a reason that you need to use the developers license, and you are not 100% sure what you are doing (as in this case), then create a copy of the DB, work there, then delete it after. That will be a lot safer. As to this actual case, once the records are deleted, the users shoul be able to work. If not, you need to get a developer to look at the DB, and fix it.

quote:

If there is a reason that you need to use the developers license, and you are not 100% sure what you are doing (as in this case), then create a copy of the DB, work there, then delete it after. That will be a lot safer.
Originally posted by David Singleton - 2005 Oct 06 : 15:10:09

I 2nd that motion

Now everything is OK. And David, it’s not the fisrt time that I use that type license ( it’s been 4 years now) and I know very well what you can or cannot do with that. Mistakes can be done and in this case, a devleoper license was installed at my client site and I was not aware. So please, you’re not forced to respond to my question. Thanks.

quote:

Now everything is OK. And David, it’s not the fisrt time that I use that type license ( it’s been 4 years now) and I know very well what you can or cannot do with that. Mistakes can be done and in this case, a devleoper license was installed at my client site and I was not aware. So please, you’re not forced to respond to my question. Thanks.
Originally posted by rosine - 2005 Oct 06 : 16:16:43

David is not forced to respond to any questions. But he is one of the few that take the time, especially with beginner questions.[Sigh…]

Thanks Chris,[^] sometimes people just don’t want to be helped.[V]

I don’t know if it’s about not wanting help. It’s more about not accepting constructive criticism . Which I feel is also very helpful. Keep up the excellent work David!