You need to sign in to do that
Don't have an account?
DoubleheadSoftware
force:inputField pre-populate Task WhoId field
I am trying to pre-populate the WhoId for a force:inputField field . I have the pre-poluation working for the WhatId but not the WhoId. The WhoId does not have "v.values" field. Is there a way to do this?
<div>
<label>Related To</label>
<force:inputField aura:id="whatId" value="{!v.newTask.WhatId}" />
</div>
<div class="whoId-field">
<label>Name</label>
<force:inputField aura:id="thewhoId" value="{!v.newTask.WhoId}" />
</div>
values = [{
type: 'Account',
id: '0016E000003vp1NQAQ',
label: 'ABC Company',
icon: {
url: '/img/icon/t4v35/standard/account_120.png',
backgroundColor: 'A094ED',
alt: 'Contact'
}
}];
cmp.find('whatId').get("v.body")[0].set('v.values', values);
<div>
<label>Related To</label>
<force:inputField aura:id="whatId" value="{!v.newTask.WhatId}" />
</div>
<div class="whoId-field">
<label>Name</label>
<force:inputField aura:id="thewhoId" value="{!v.newTask.WhoId}" />
</div>
values = [{
type: 'Account',
id: '0016E000003vp1NQAQ',
label: 'ABC Company',
icon: {
url: '/img/icon/t4v35/standard/account_120.png',
backgroundColor: 'A094ED',
alt: 'Contact'
}
}];
cmp.find('whatId').get("v.body")[0].set('v.values', values);
Admin Health Cloud
I have de same problem.