2019 Apr 16 6:26 AM
Hi,
Is there any way to put in your value for CardName instead of getting its corresponding value based on the inputted CardCode? Because if you use DI API, it automatically gets the values corresponding to the CardCode inputted. I want to put in a different value without editing the BP Master, more like using the Ctrl Tab after entering the different card name in a document in SAP.
Hi,
Is there any way to put in your value for CardName instead of getting its corresponding value based on the inputted CardCode? Because if you use DI API, it automatically gets the values corresponding to the CardCode inputted. I want to put in a different value without editing the BP Master, more like using the Ctrl Tab after entering the different card name in a document in SAP.
2019 Apr 16 6:55 AM
Dear limdentin,
You can use the `SendKeys()` Method described in SAP Business One SDK Help.
Application.SBOAplication.SendKeys("{^}{TAB}");Here are all the supported keys;
Backspace
{BACKSPACE},
{BS}, or {BKSP}
Break
{BREAK}
Caps Lock
{CAPSLOCK}
Delete
{DELETE} or
{DEL}
Down Arrow
{DOWN}
End
{END}
Enter
{ENTER}
Esc
{ESC}
Help
{HELP}
Home
{HOME}
Insert
{INSERT} or
{INS}
Left Arrow
{LEFT}
Num Lock
{NUMLOCk}
Page Down
{PGDN}
Page Up
{PGUP}
Right Arrow
{RIGHT}
Scroll Lock
{SCROLLLOCK}
Tab
{TAB}
Up Arrow
{UP}
F1, F2,
F3...
{F1}, {F2},
{F3}...
Combination Keys;
Shift
{+}
Ctrl
{^}
Alt
{%}
Sincerely,
Varnavas Eleftheriou
2019 Apr 16 7:07 AM
Hi,
I mean how to force CardName to be value I pass in DI, not the one corresponding value of CardCode in OCRD.
Example in Incoming Payment, I use Customer1 as CardCode. In OCRD table, Customer1 has corresponding Dennis as CardName.
When I use DI API to add Incoming Payment, I don't want DI to automatically put Dennis as CardName, I want to put in another value say Peter.
In SAP application you can do this by inputting Peter in the Name field then press Ctrl Tab to go to the next field in the form.
2019 Apr 16 8:34 AM
Dear limdentin,
You have to set the cardname right after you set the cardcode
oIP = ((SAPbobsCOM.Documents)(globals.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)));
oIP.CardCode = bpcode;
oIP.CardName = "NewNameYouWantToGiveToTheDocument";
Sincerely,
Varnavas Eleftheriou
2019 Apr 17 3:11 AM
Hi Varnavas,
I already did that. Still CardName is based on CardName in OCRD not inputted CardName in code
Set oPayments = sapCompany.GetBusinessObject(oIncomingPayments)
oPayments.CardCode = .Fields("CardCode")
oPayments.CardName = .Fields("CardName")
After adding it to SAP, I check on Incoming Payment document, CardName is not the one I wanted but the one in the Business Partner.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |