0
Good,
I have a form at V9 that is called in Keypress in a Sales Editor line and fills in a textbox depending on the line article.
Artigo.Text = EditorVendas.DocumentoVenda.Linhas(EditorVendas.LinhaActual).Artigo
I’m trying to migrate this development to V10 and I’m having some difficulties. What references do I need? Do I have to inherit Customform? What’s the best way to do this? Thank you.
This is how I did in VBA, had this code in the initialize of my Form.
Private Sub UserForm_Initialize()
Artigo.Text = EditorVendas.DocumentoVenda.Linhas(EditorVendas.LinhaActual).Artigo
Descricao.Text = EditorVendas.DocumentoVenda.Linhas(EditorVendas.LinhaActual).Descricao
QuantidadeEncomenda.Text = Format(EditorVendas.DocumentoVenda.Linhas(EditorVendas.LinhaActual).Quantidade, "##,##0.00")
End Sub
Good Sergio, but in this case I want to be able to interact directly with the Sales Editor from a form of mine, without having to open it, for example. How can I do that in this version?
– Bruno Gomes
In the editor understand itself interface is not possible. It is only possible to manipulate the object associated with the sales document. But this is not the question that posed.
– Sérgio Sereno
I may not have correctly asked the question. But how do I manipulate the object associated with the sales document?
– Bruno Gomes
Is available in context
this.DocumentoVenda
. So if you inherit fromEditorVendas
you have access to the objects there.– Sérgio Sereno
I had already tried to do that, but I cannot inherit Editorvendas... https://imgur.com/aoTynTh
– Bruno Gomes
As I said on
https://developers.primaverabss.com/_v10/#comunidade
gives access to the extension to the visual studio that puts there all the necessary references. I recommend that you install it.– Sérgio Sereno
But I already have the extension installed, and I still can’t. In a class it works perfectly, in a form it is not...
– Bruno Gomes
But that doesn’t work, they are different objects, as you can see by the error that VS is making in the shared image.
– Sérgio Sereno
But this was possible in V9. In V10 is no longer?
– Bruno Gomes
Bruno does not know then what he wants to do, but in V9 this did not exist, that is, there is no inheritance. It is better to ask another question more detailed and with code that helps.
– Sérgio Sereno
I am not referring to inheritance, but to the possibility of, for example, in the Load of my form, loading information from a sales document.
– Bruno Gomes
Sergio, I added the code to the question.
– Bruno Gomes