Getting Project Server Custom Field Value In Javascript

Sometimes you may need to capture custom field value in a Javascript code, and use that in your logic.  




 $(document).ready(function() {

$( "div" ).each(function() {
  var HideCR = $(this).attr("guid");
  if(HideCR == "ddf1fbf7-826f-e611-940d-005056b8333d") //guid of custom field
    alert($(this).text());

  if(HideCR == "ab91c49b-0674-e611-940d-005056b8333d") //guid of custom field
    alert($(this).text());
});

 });

<span id="ms-rterangecursor-start"></span>
<span id="ms-rterangecursor-end"></span>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s