Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Set Partylist Using Javascript

$
0
0

Hi, i'm trying to set email sender (from) using javascript. After learning a minute, i know that the field is not just a look up field. But a partylist field.  In order to set partylist field, i used this code:

function setParty()
{
var partyField= Xrm.Page.getAttribute("from");

var value = new Array();
var value[0] = new Object();
var value[0].id = 67cf851f-165a-e611-80bb-a4934caa8811;
var value[0].name = "Helpdesk";
var value[0].entityType = "systemuser";

partyField.setValue(value);
}


But i got this error message:

ReferenceError: setParty is not defined
    at eval (eval at RunHandlerInternal (10.123.6.179/.../ClientApiWrapper.aspx), <anonymous>:1:1)
    at RunHandlerInternal (10.123.6.179/.../ClientApiWrapper.aspx)
    at OnScriptTagLoaded (10.123.6.179/.../ClientApiWrapper.aspx)
I thought that i make a mistake while call the function (setParty). So i change the function name, and make sure that i didn't make a mistake. But it's give the same result.
Anybody know the solution ?

Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>