Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
Populate dynamics CRM Activity Type sender from field using custom JavaScript?

I am trying to populate the "From" look up field using custom JavaScript in Dynamics CRM.

I'm new to JavaScript and Dynamics really struggling to do this.

Below is a screenshot of my code and solution.

The "From" field apparently this is Activity party type Sender

function PopulateFromLookUpField(executionContext) {

var formContext = executionContext.getFormContext();

var value = new Array(); //create a new object array
value[0] = new Object();
value[0].id = ; // set ID to ID
value[0].name = "new_name"; //set name to name
value[0].entityType = "sender"; //optional
formContext.getAttribute("sender").setValue(value);

}

I also tried the solution below it doesn't work.

function PopulateFromLookUpField(executionContext) {


 var lookUpObject.id = ;
   lookUpObject.name = "Joe CRM";
   lookUpObject.entityType = "sender";               
   formContext.getAttribute("sender").setValue(value);
   
}

Please advise and help.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I tried and this worked for me. Make sure to pass the correct field schema name, record GUID, record Name and entity Type properly.

var lookUpObject = new Array();
lookUpObject[0] = new Object();
lookUpObject[0].id = "7108f4e7-ac2b-eb11-a814-000d3a378f1b";
lookUpObject[0].name = "Arun Vinoth";
lookUpObject[0].entityType = "systemuser";               
formContext.getAttribute("from").setValue(lookUpObject);
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!