Any tips - Task Model, Who Id (Assigned To) field should render User, Partner User as pick list

Want to make Assigned To field on Task, should point Partner User, User instead of Lead, Contact.

We have followed the reference

https://community.skuid.com/t/can-i-limit-which-objects-are-possible-targets-of-polymo…”  _ as well followed the given proceedures such as

1) creating inline snippet
2) using that snippet for custom field renderer

But it doesn help us the way we expect.  Any help with this asap will be appreciated.  Thanks.

Vijay,

Can you post your snippet so we can take a look?

Hi Matt,

Thanks for your reply.  Please find the below snippet which i tried for custom field renderer.
-----------------------------------------------------------------------------------------------------------------------------

//// CONFIGURATION 
// 
// Define the possible target objects 
var targetObjects = [‘Account’, ‘Opportunity’]; 
// 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

Very first line.  You have not defined appropriate TargetObjects.  I think you need to use PartnerUser and User.  

What I don’t know is whether those two objects are allowed for the Assigned To polymorphic field. 

@Rob Hatch Just for testing i gave TargetObjects as Account, Opportunity.  Still even it is not changing from Contacts, Leads.  Thats what the problem.  I should have put in already, it s my mistake.

Any help would be appreciated.

@Rob Hatch Just for testing i gave TargetObjects as Account, Opportunity.  Still even it is not changing from Contacts, Leads.  Thats what the problem.  I should have put in already, it s my mistake.

Any help would be appreciated.

@Rob Hatch  in usual salesforce Task Assigned to would be users only, means users, partner users like that.  But in skuid task assigned to is challenge facing.  Thats where i required help

I’m now very confused.  You are correct that Assigned to field usually only allows you to assign users.  Is this a custom relationship field or just the standard one?  Does this specific field work correctly in a standard layout?  I think there is somthing more fundamental going on than what can be solved with the custom renderer. 

@Rob Hatch, yes you are right, it works fine with standard salesforce layout.  To get you more clarity in this.  Salesforce Set Up-> Activities -> Task Fields -> Assigned To (Who Id) look up with Contact. Lead.  This is what shows in the Skuid.  To Solve this, we have used above given skuid js script to render in Assigned To field.  But it wasnt wrk.

Could you please help me.

If the base configuration binds the Who Id to Contact and Lead,  Skuid will NOT be able to change that binding using Javascript.  You will have to change that in the core setup.  All Skuid can do is limit the options that have been detailed in setup.