Hi all
Quick question. :idea:
I have an Add-in Control which has a bigtext as SourceExpr.
I works fine when used on a regular card page, but when used on a cardpart page, included in a Rolecenter. The Add-in does'nt seem to get any data in the SourceExpr variable.
The add-in starts up and IS visible, but has no data available. The variable Does contain data.
Should'nt an Add-in work just the same way, as a part of a Role Center, as if it was run independently?
Best regards / Venlig hilsen
Johannes Sebastian
MB7-840,MB7-841
0
Answers
do you have more details?
I could not see the issue in my experiment.
Does the page have a table set (this might make a difference in update behavior)?
When does the source expression variable get set?
Bthw: In NAV 2013 you just use TEXT data type. This is now Unicode and does not require you to specify a size anymore.
Christian Abeln
Program Manager Microsoft
Dynamics NAV
blogs.msdn.com/cabeln/
Thanks for replying.
Cardpart page hosts the Add-in. The CardPart page is included in a RoleCenter.
CardPart Page Source is set.
The Add-in Variable gets set "OnInit", on CardPart Page.
If I print the data Variable on screen, the dialog appears before Role Center is displayed, showing the correct data.
But still, the Add-in starts up, with no data, and never gain access to any.
Strange! :shock:
Johannes Sebastian
MB7-840,MB7-841
I have a chart addin that i'am using in the rolecenter it works perfectly fine. It is connected to a another ListPart which displays "My Jobs" so therefore i needed the OnAfterGetRecord Trigger, but i remember having problems with the OnInit trigger and addins before on other addin-projects.
In my experiments to repro your issue I have used my Lync communication AddIn on a Card part , which I bind through Source Expression to a local variable of type Text.
Both initializing the local variable on OnInit() on in OnOpenPage() works fine.
Can you try to use a variable of type TEXT instead ?
Christian Abeln
Program Manager Microsoft
Dynamics NAV
blogs.msdn.com/cabeln/
Sorry for taking so long to get back to this issue :shock:
And thank you so much for taking time out for trying this out for me.
I've change to type to sourcevar to TEXT but still the same :?
-
I see you're using 2013, we're still on 2009 for this product.
But anyways, I think we'll stick with having the Add-in in a task page of it's own and Not in the Role Center for now.
I'll give it another go in 2013 when the time comes!
I'll mark this thread as solved since it's clearly possible to run add-ins directly in a role center, just not the combination of my C# in 2009.
Thanks again
Johannes Sebastian
MB7-840,MB7-841
It would be very interesting to see the control or some simple control (the simpler the better) for which you can repro the issue. I know that both Christian and I would be interested.
As mentioned previously (deV.ch) you should generally not use the OnInit trigger (this trigger is happening before the page controls are created. OnAfterGetCurrentRecord is a preferred trigger. However as Christian mentions if you are using databinding you should automatically get the updated value.
Aside: If you are not using databinding then you might benefit from having the Add-in notify (OnControlAddIn trigger) that it is ready (e.g. when the parent changes and thus is no longer null).
/henrik
Henrik Metzger, Software Development Engineer, Dynamics NAV
MSFT
I tried including a copy of this example in my Role Center and the variable data Does reach the Add-in.
(the example uses WinForms, I use WPF)
http://blogs.msdn.com/b/nav/archive/201 ... ample.aspx
So the problem with data not begin sent to the add-in, must reside in my own add-in code.
I will investigate :roll:
Johannes Sebastian
MB7-840,MB7-841