Dashboard And csm.GetAdapter

Hi Guys,
Is there anyway inside a dashboard that I can use csm.GetAdapter?

I have a dashboard listing po lines and i want to be able to click on a row and click a button which will then create a line in a UD table.

I can see in some of my dashboards there are other adapters apart from just the query adapter but when I try to use GetAdapter I get - ‘Ice.Lib.Customization.CustomScriptManager’ does not contain a definition for ‘GetAdapter’ and no extension method ‘GetAdapter’ accepting a first argument of type ‘Ice.Lib.Customization.CustomScriptManager’ could be found (are you missing a using directive or an assembly reference?)

Thanks

What adapter are you trying to get? You shouldn’t need to use CSM to instantiate an adapter, justo do

UD02Adapter ad = new UD02Adapter(oTrans);
ad.BOConnect();
ad...Method();...

Yeah that will work but it’s not particularly pretty I would prefer to do it via in memory objects instead of creating a new adapter.

What do you mean not particularly pretty and “memory object”. This is the way a new adapter is instantiated, if its a dashboard there is no reference to the UDXX Adapter to begin with in the dashboard only the DynamicQuery adapter which you can’t use to create UD records.
Maybe I am misunderstanding what you are trying to do.

1 Like