Skip to content
+1-888-319-3663

EONE BLOG

Tech Tuesday: Extending a SmartList Builder GoTo using Extender Enterprise Scripting


A user had a question today about creating a GoTo using SmartList Builder.

In the SmartList, they were building a Security report based on the SY60100 table for the User/Company access.

That was all working successfully.

Figure 1: User-Company Access SmartList

Figure 1: User-Company Access SmartList

Next they wanted to create a GoTo that would open the User Company Access window.

That was of course, very easy. We were able to create an Open Form GoTo named “User Access Setup”

Figure 2: Open form GoTo

Figure 2: Open form GoTo

…and I think he was happy with that result.

But always pushing the boundaries, I thought it would be more interesting if we could pull the selected user from SmartList and then select that ID in the GP UI so that our user does not have to do this manually.

Thinking about what we would need to do for this:

  1. Find the selected line in SmartList
  2. Determine which column IS the user id in SmartList
  3. Find the data for that column in SmartList
  4. In the User Company Access window, find that user in the Users list (which also has other information on the line we have to exclude)
  5. Make GP select that user and fill the Company Access list for the selected user

While SmartList Builder can make useful GoTos, it isn’t going to handle this as we can only set fields to specific values. And we won’t be able to read the SmartList ListView control in any case.

Next thought was using DrillDown Builder. But again we have the same limitations as SLB – we can’t find our value or parse the fields on the UI.

Now the “right” answer to this question is probably to use the SLB SDK to make a 3rd party cnk file to create a custom Execute Procedure that we can run natively from within SmartList Builder. This custom GoTo would act like the ones already included out of the box.

However you would need someone with good Dexterity skills and you will end up with a small customization in the end that you would have to maintain.

But I wanted to see if I could do it with our good friend Extender Enterprise.

In the end, the answer is “Yes, I can use Extender Enterprise to do this”.

What we can do is create an Extender Action that will run after the selects the GoTo item that we created with SmartList Builder.

Because now we can write native Dexterity, we can now do the steps 1-5 as noted above.

The first thing we need to do is go to the Extender main window and create a new action.

Figure 3: Creating the action

Figure 3: Creating the action

Knowing that Change field actions run after the original code, we then add a new item to this Action.

So select the Add dropdown and choose Run Dynamics GP script.

I named this new action “User Access Setup – GoTo” but the name doesn’t really matter. I just like naming this relevant to what their purpose is.

Figure 4:

Figure 4: User Access Setup – GoTo

Notice too that this is running in the SmartList Product context. We have our choice with this one because we need to get the values from the SmartList product but then have to set field information on a window in the Dynamics GP product. So no matter which way we go – we’ll have to run pass through sanScript against SmartList or Dynamics GP.

I’ll have to admit, the Dexterity code is somewhat complicated and running the pass-thru sanScript doesn’t make it easier to read and understand. Even with 15 years of full time Dexterity experience under my belt, it took me a few hours to make this work correctly.

I won’t go through all of the code itself as it is well commented and should give you an idea what each piece does. Having a good amount of experience of Dexterity would also be helpful.

In the screenshot, we can see the User Access Setup window opened from the line I double clicked on with the default GoTo.

Figure 5: Results with our Extender code included

Figure 5: Results with our Extender code included

Without the Extender Action we created, the SLB GoTo would have opened the window but then no user would be selected. The same result as if the user opens this window from the GP menu.

But with the new Action, we notice that I have the ‘sa’ user selected in SmartList and that it is the same user selected in the User Access Setup window.

I’ve included a zip file here with the SmartList Builder 2013 and Extender 2013 solutions to this blog article so you can download them to user and learn from.

Best Regards,
Patrick Roth

Leave a Comment





RECENT POSTS


Happy Thanksgiving from eOne! - US Office Closed November 25 & 26
Popdock: What is your Locale?
Q4 2021 Partner All Hands Call - Recording Now Available
An Announcement regarding SmartList Builder and SmartView from eOne Solutions
Join us for the Q4 2021 Partner All Hands Call!

POPULAR POSTS


2016 SmartConnect Integration Bootcamps
Tech Tues: Automatically refreshing Pivot Tables in Excel Refreshable Reports
Happy Thanksgiving from the eOne team!
2017 SmartConnect Integration Bootcamps
New Releases of Extender and SmartList Builder

CATEGORIES

TAGS

Business Central CRM D365 Business Central Dynamics 365 dynamics crm Dynamics GP Dynamics NAV Econnect Employee Spotlight eone eOne News error Error Message Events Excel Excel Report Builder Extender Flexicoder GP integration Map Meet the Team Microsoft dynamics crm Microsoft Dynamics GP Navigation List Builder Office Relationships partners Popdock release Reporting SalesForce SalesForce.com SmartConnect SmartConnect.com SmartConnect Bootcamp SmartConnect Maps SmartConnect Office Hours SmartList SmartList Builder SmartPost SmartView SQL Tech Tuesday Templates training

Integrate & Automate without Any Code.

SmartList Data has Never Been Faster.

The Easiest Way to Report on GP Data.