on 03-21-2005 1:43 PM
I would like to refresh an opened business partner form using UI-API, because the current record was changed in the meantime via DI-API. I tried it using the Update-Method of the Form-Object but nothing happened. Any ideas? Workarounds?
Thanks a lot for all Your suggestions. I did try all of it.
But the effect is, that no one of them works when the focus is not on the BP menu. Means:
E.g. suggestion from Ibai Peña
oApp.ActivateMenueItem("1288")
oApp.ActivateMenueItem("1289")
It runs perfect under the control of the VisualStudio debugger and at minimal one breakpoint performs a scope change between SBO and the debugger. But it does not work when no break point (focus change) happens.
The same effect I can recognize with using
oApp.ActivateMenueItem("1282")
or
oApp.ActivateMenueItem("1281").
It seems, that the ActivateMenueItem() has an effect only when SBO had lost the scope completly before.
What do I wrong ?
Thanks again for investigations.
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your hints. Unfortunately it still does not work.
oApp.ActivateMenueItem("****") throws an exception.
Probably it's because the currently shown record on the form was changed by the user but these changes are no more relevant.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Interesting solution, but it only works if you have more than two BP in your Database and you are not at the start or end of the current BP BrowseList. But anyhow your solution covers 99% of all cases.
best regards Boris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe should try to re-search the current CardCode.
try this:
'get The Form
oForm = oApp.Forms.GetFormByTypeAndCount(134, 1)
'Get The CardCode
strCardCode = oForm.items.item("5").Value
'Put Form in Find Mode
oApp.ActivateMenueItem("1282")
'put CardCode into the CardCode field
oFrom.items.iten("5").Value = strCardCode
'do a click on Find Button
oForm.items.item("1").click
'no joke this is how it works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
106 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.