cancel
Showing results for 
Search instead for 
Did you mean: 

form.update: no effect on Business Partner form

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

> Thanks for your hints. Unfortunately it still does

> not work.

>

> oApp.ActivateMenueItem("****") throws an exception.

Maybe it's because the method is called

ActivateMenuItem

and not

ActivateMenueItem ?

Or is did you (andy Ibai) just do the same typo in both posts by accident?

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

I think it would be easyer to move into next IC and then come back to the current one.

oApp.ActivateMenueItem("1288")

oApp.ActivateMenueItem("1289")

you could try some freezing stuff in order not to see any blinking.

Regards,

Ibai Peñ