bezlio / bezlio-gallery

Collection of bezls that you can import and use in your Bezlio account
MIT License
3 stars 0 forks source link

Common - Geocoder #54

Open aellis opened 6 years ago

aellis commented 6 years ago

We do not yet have the Geocoder added to gallery. This needs to be copied in and possibly made to conform to standard installation steps. My suggestion is that we have a primary data subscription for Accounts that is pulling back all accounts not having Geocode data. When you hit the button to perform the geocoding reference that data subscriptions properties like so:

      bezl.dataService.add(
        'CleanPreview_' + a.Id
        ,'brdb'
        ,'Salesforce'
        ,'ExecuteQuery'
        , 
          {
            Context: bezl.dataService.dataSubscriptions.getValue().Accounts.args.Context
            , Connection: bezl.dataService.dataSubscriptions.getValue().Accounts.args.Connection
            , QueryName: 'SetGeocodeOnAddress'
            , Parameters: [
              { Key: 'CustNum', Value: a.CustNum },
              { Key: 'Geocode_Location', Value: WHATEVER_THE_VALUE_IS }
            ]
          }
        , 0);
aellis commented 6 years ago

Small revision to my suggestion here - I think we might be able to make it pull even more from bezl.dataService.dataSubscriptions.getValue().Accounts.args so that it works correctly whether you are pointing to a plugin instance or plugin directly.