Get the text data or GUID value of a lookup field with javascript code

Hi ,

in this article we talk about "Get the text data or GUID value of a lookup field with javascript code"

Sometimes, we want to learn lookup guid value and text with javascript.

Question : How can we learn this values. 
Answer : with javascript code

<script>
function learnLookupValues()
{
var lookupObject = Xrm.Page.data.entity.attributes.get("vendorID").getValue();
if(lookupObject  != null ) 
{

alert("Lookup field text" + lookupObject[0].name);
alert("Lookup field Id" + lookupObject[0].id);

}
}
</script>

let's explain the code !

Firstly, we catch up lookup field 
"

Xrm.Page.data.entity.attributes.get("vendorID").getValue();

"

then, we have to control this value 

if(lookupObject  != null )

Finally. we will use these values

alert("Lookup field text" + lookupObject[0].name);
alert("Lookup field Id" + lookupObject[0].id);

thats all 
Have a good day

How can i use dynamics crm 365 trial version for development.

Hi, 

In this article we talk about how can i use dynamics crm 365 trial version for development. firstly, we need to have any company email address. Because the system is want to  company email address.

Step by step process

  1. Please visit https://trials.dynamics.com/ web site
  2. Find this word "Are you signing up on behalf of the customer or are you using this trial version for development purposes? Sign up here." then click "Sign up here" button
  3. when you click the submit button,one popup show you. Please select No, continue sign up
  4. Please fill in the "Welcome, let’s get to know you" form and click next button.
    important note : you have to write business email address and correct phone number.
  5. The system sends the phone verification sms sent. Please write sms code in website

thats all. You have a dynamics crm 365 for 30 days. You can use the dynamics crm 365. 

Get/Set field values in JavaScript for Dynamics CRM

Hi,

Sometimes we want to set or get field value from javascript . in this article we will learn it.
First we need to know dynamics crm field's name. Which field we want to set or get data.
As an example, we use the vs_customertaxno field.

we have to make javascript library on dynamics crm 2011.

javascript code for get data

Xrm.Page.data.entity.attributes.get("vs_customertaxno").getValue();

javascript code for set data

Xrm.Page.data.entity.attributes.get("vs_customertaxno").setValue(Value);

thats all
Have a good day

System user can not send email from workflow

Hi , 

If you are using the CRM 2011 system and system users can not send e-mails using workflows. You have to make these step your system

  1. Create new security role for example ( minimum system roles
  2. Business Management -> Miscellaneous Privileges - check the following fields
    1. Act on Behalf of Another User 
    2. Send Email as Another User 
  3. Assing the user new role ( minimum system roles

Thats all. 
Have a good day