When looking to add a sync to a opportunity contact role I couldn't find it, then noticed that it's not available since the sfobject load function filters out non-triggerable objects. Is there a reason for this? Removing that filter let me do it but I don't want to keep having to hack it without knowing if there's justification for it that I'll run into later.

Comments

kostajh’s picture

Title: Limit on SF Objects » Allow non-triggerable objects in mappings
Assigned: Unassigned » levelos

@levelos I couldn't find a reference in the Salesforce REST API docs for this, do you know more about this issue?

cellar door’s picture

What I'm describing is in salesforce_mapping.admin.inc at line 100

  if (!$sfobjects) {
    // Note that we're filtering SF object types to a reasonable subset.
    $sfobjects = $sfapi->objects(array(
      'updateable' => TRUE,
      /* 'triggerable' => TRUE, */
    ));
    $form_state['sf_objects'] = $sfobjects;
  }

By commenting out triggerable I was able to get access to much more data within the system.

kostajh’s picture

It would seem ok to allow this. I'm not sure if we want to filter out 'updateable' items either, since someone might be implementing one-way sync from Salesforce to Drupal and would have no need for updating the Salesforce object.

cellar door’s picture

I can roll into a patch but for one liners I normally don't as it's just as easy to do yourself.

I haven't run into updatable but the only thing I would comment on there is it should have some indication that it's only a one way connection available (or remove the radios for the other two options.

manasiv’s picture

Issue summary: View changes

I am building a module to fetch knowledge articles from salesforce and they are not listed on the mapping page with updateable => true, triggerable => true conditions.

The following function does not return Salesforce KB objects
_salesforce_mapping_get_salesforce_object_type_options().

Hence I am planning to add a function to write a hook_form_salesforce_mapping_form_alter() and return a list of options with knowledge articles.
Should the conditions passed to $conditions array be made configurable instead?

tauno’s picture

yogaf’s picture

OK? and... can we get rid from the triggerable condition?

mariacha1’s picture

Status: Active » Needs review
StatusFileSize
new3.88 KB
new59.31 KB
new98.91 KB

Let's make this a setting that can be configured:

Settings page showing object filters

We can clue users into this setting on the form page:

Settings page showing object filters

patch attached to do this.

aaronbauman’s picture

Category: Support request » Feature request
Status: Needs review » Reviewed & tested by the community

looks good to me

  • mariacha1 committed 45974d3 on 7.x-3.x
    Issue #1961754 by mariacha1: Allow non-triggerable objects in mappings
    
mariacha1’s picture

Status: Reviewed & tested by the community » Fixed

Sweet. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.