Not getting the options for Option model for standard Whatid field of Task

edited June 25, 2020 in Questions
I have a table for Task(Standard Object) and I am displaying the WhatId (Standard field for Task) on the same. I need to have the What Id reference to Account Object. When I select Option Source for the field to be Model, it doesn't give me any option for the models for Account.

Comments

  • Pat VachonPat Vachon 💎💎💎
    edited June 25, 2020
    Is this what you want?

    image

  • edited June 25, 2020
    Nope. We have 'option source' in the Search properties of the fields. When I select the Option source as Model, I should get options to select the model. But I don't see any option for Account Models
  • Pat VachonPat Vachon 💎💎💎
    edited January 5, 2016
    Oh I see. You want to limit to only Accounts for the whatid?
  • edited July 24, 2015
    yes.
  • Pat VachonPat Vachon 💎💎💎
    edited January 5, 2016
    Here's the snippet you need for this for this as to be custom rendered.
    // Define the possible target objects  var targetObjects = ['Account'];  // Render as a Picklist instead of an Autocomplete?  var renderAsPicklist = false;  var field = arguments[0],      value = skuid.utils.decodeHTML(arguments[1]),      metadata = field.metadata,      $ = skuid.$;  if (field.mode == 'edit') {      // Limit the set of target objects      var targets = [],          uniqueTargets = {};      $.each(metadata.referenceTo,function(i,r){         if (($.inArray(r.objectName,targetObjects) != -1) && (!uniqueTargets[r.objectName])) {            targets.push(r);            uniqueTargets[r.objectName] = 1;            if (targets.length == targetObjects.length) return false;          }      });      if (targets.length) {         // Make this field render as a picklist?         if (renderAsPicklist) field.options.type = 'REFPICK';         // Override the current referenceTo         metadata.referenceTo.length = 0;         metadata.ref = $.map(targets,function(targ){return targ.objectName;}).join();        metadata.referenceTo = targets;      }  }  // Run the standard renderer  skuid.ui.fieldRenderers[metadata.displaytype][field.mode](field,value);
    image
    image
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!