• Kyriacos Theohari
  • NEWBIE
  • 35 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 4
    Replies
I have a button that when clicked returns a datetime and a user in a field. When this was setup it was working however it has now stopped working.

The following error message is now displayed:

A problem with the OnClick JavaScript for this button or link was encountered:

{faultcode:'soapenv:Client', faultstring:''NaN-NaN-NaNTNaN:NaN:NaN.NaN-NaN:NaN' is not a valid value for the type xsd:dateTime', }


This is the script used for the button:

{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}

// identify the record
var a = new sforce.SObject("Account");
a.id = "{!Account.Id}";

// Get the user Info
var user = sforce.connection.getUserInfo();
// make the field change
a.Customer_Contacted_Date__c = new Date(Date.parse( '{!NOW()}'));
a.Contacted_By__c = user.userId; 

// save the change
sforce.connection.update([a]);

//refresh the page
window.location.reload();
Hi I have tried to create a date button on the account object but receive the following error message:

A problem with the OnClick JavaScript for this button or link was encountered:

{faultcode:'soapenv:Client', faultstring:''Thu Nov 02 2017 16:12:12 GMT+0000 (GMT Standard Time)' is not a valid value for the type xsd:date', }


This is my button details:

{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}

// identify the record
var a = new sforce.SObject("Account");
a.id = "{!Account.Id}";

// Get the user Info
var user = sforce.connection.getUserInfo();
// make the field change
a.Plus_Chat_Customer_Contacted_Date__c = '{!DAY(TODAY())}';

// save the change
sforce.connection.update([a]);

//refresh the page
window.location.reload();
I need to create a button on the account object that adds the users name to a custom field which is a lookup field to the user object. This field is similar to the account owner field
I am adding a validation rule for a large text area within the Flow Designer however the validation rule doesnt seem to be consistant in triggering.

This is my valiadation rule:

LEN (Comment) < 256

I am not sure how what is wrong with the validation rule
In my URL I am currently passing the following value: id=001D000001t33et

What i would like to do is take the value of id and place it as a default value for a field. Any ideas how I can do this?

 
Hi I need to know if the below scenario is possible as everything i have read so far says no.

I have a case with a email linked to it. The email also has attachments that are linked to it. What I would like to do is export all the related information out of Salesforce.

Is this possible?
I have been looking into how I would be able to prioritise Live Chats and I cannot find a way to do this using standard Salesforce functionality.

Example: if I have 5 customers waiting in a queue a VIP customer would go to the front of the queue to be dealt with next.

Is there a way to develop this? If so do you have any examples?
 
Hi I have tried to create a date button on the account object but receive the following error message:

A problem with the OnClick JavaScript for this button or link was encountered:

{faultcode:'soapenv:Client', faultstring:''Thu Nov 02 2017 16:12:12 GMT+0000 (GMT Standard Time)' is not a valid value for the type xsd:date', }


This is my button details:

{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}

// identify the record
var a = new sforce.SObject("Account");
a.id = "{!Account.Id}";

// Get the user Info
var user = sforce.connection.getUserInfo();
// make the field change
a.Plus_Chat_Customer_Contacted_Date__c = '{!DAY(TODAY())}';

// save the change
sforce.connection.update([a]);

//refresh the page
window.location.reload();
I have a button that when clicked returns a datetime and a user in a field. When this was setup it was working however it has now stopped working.

The following error message is now displayed:

A problem with the OnClick JavaScript for this button or link was encountered:

{faultcode:'soapenv:Client', faultstring:''NaN-NaN-NaNTNaN:NaN:NaN.NaN-NaN:NaN' is not a valid value for the type xsd:dateTime', }


This is the script used for the button:

{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}

// identify the record
var a = new sforce.SObject("Account");
a.id = "{!Account.Id}";

// Get the user Info
var user = sforce.connection.getUserInfo();
// make the field change
a.Customer_Contacted_Date__c = new Date(Date.parse( '{!NOW()}'));
a.Contacted_By__c = user.userId; 

// save the change
sforce.connection.update([a]);

//refresh the page
window.location.reload();
I am adding a validation rule for a large text area within the Flow Designer however the validation rule doesnt seem to be consistant in triggering.

This is my valiadation rule:

LEN (Comment) < 256

I am not sure how what is wrong with the validation rule