web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Set Partylist Using Javascript

(0) ShareShare
ReportReport
Posted on by

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 ?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Set Partylist Using Javascript

    hi,

    hope this might help, walkthrough the link

    rajeevpentyala.com/.../get-and-set-partylist-fields-using-jscript

  • Community Member Profile Picture
    on at
    RE: Set Partylist Using Javascript

    i edit my code as your suggestion.  but the result is same

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans