cancel
Showing results for 
Search instead for 
Did you mean: 

defining and calling (shared) parameters in addons/extensions

Former Member
0 Kudos

Hello everyone,

I've been looking into (shared) parameters for extensions/add-ons lately.

I've seen it's possible to define (shared) parameters in the ExtensionPackage tool that comes with SAP 9.1.

i've tested deploying the package and the parameters and they show up fine and are adjustable in SAPs new extensionManager.

How do I declare (shared) parameters in the add-on itself and how do I retrieve and use those values in my add-on/extension?

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member336669
Discoverer
0 Kudos

I would like also to know how to use it?

Company.GetExtensionProperty(ConnectionString, SAPbouiCOM.BoExtensionLCMStageType.lcm_deployment, "SQL_PWD")

What is ConnectionString?

By the way what is the best practice to store some add-on settings across all clients (user specific, company specific)? I can image to store settings.ini in b1_shr folder, but it is not elegant.

Former Member
0 Kudos

Connection string is the string you use to connect to your SAP B1 instance. It's required for many methods to get information about the B1 client itself.

As far as settings goes, I think it's a good idea to only have connection settings within the application/ini files. Once you're connected to the company object, you can then store the rest of the settings within the database itself by using your own tables. You can do so on both the company level and the user level if you wish from there.

former_member336669
Discoverer
0 Kudos

Thank You for both answers.

I'll try with connection string and let You know if it works.

Those native method (GetExtensionProperty, SetExtensionProperty) seems to be more convenience.

If I use my own tables each time addon is loaded I have to check if table exist, create, etc.

By the way, how do you think it is better to be user defined tables or just simple create table outside SAP logic?

former_member336669
Discoverer
0 Kudos

I just tried to use GetExtensionProperty but return "" (SAP B1 9.1 PL06)

Former Member
0 Kudos

Hi Pawel,

I got the same results as you on SAP B1 9.1 PL5.

What's the version of SAP B1 on the system you're using to test this?

former_member336669
Discoverer
0 Kudos

SAP Business One 9.1 (9.10.160) PL: 06 HOTFIX1 (64-bit) and (32-bit) also

Former Member
0 Kudos

Have you already found a way to make this work? I'm going to do a new test on 9.2 soon. I'll let you know how it went.