• Pramitha Ayyappan Nair
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 3
    Replies
How do we check if the Multipicklist value field is blank or not in a Custom Button JScript?
I have an OnClick JScript as below for a Custom Button, where I need to make the checkbox Escalated_Call__c to true. 

What is wrong with the below code- No error, but do not make checkbox true.

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

var objCase = new sforce.SObject('Case');

objCase.Escalation_Reason_Details__c ='{!JSENCODE(Case.Escalation_Reason_Details__c)}';

if(objCase.Escalation_Reason_Details__c == '')
{
alert ('Please fill Escalation_Reason_Details__c');
}
else
{

objCase.Escalated_Call__c=true;

}
var result = sforce.connection.update([objCase]);
location.reload(true);
Hi,

I am using Sortable Grid App-and using e.force:createRecord . I would like to pass the RecordType ID which is stored in ChildRTID__c in the Event Payload- something like this:
{"entityApiName":"Contact", "defaultFieldValues" :{ "AccountId": "#parentrecordid#"},"recordTypeId": "#ChildRTID__c#"}

Is there a way I can achieve this?
Any help much appreciated.

 
Hi,

When I create a Child Case the Parent Case Number field gets populated with the Parent Case number. Is there a way, we can see the Parent Case as the Related Case in the Related Cases Related List?
We can see the Child Case as Related Case in Parent Case Page, but not vice versa. Please help.
Thanks,
Hi,
I'm getting the error while trying to submit a Web to Lead form.

XMLHttpRequest cannot load https://<>. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

CORS Setting has been enabled, but still receinving the error

Any help much appreciated.

Thanks,
Pramitha

 
I have an OnClick JScript as below for a Custom Button, where I need to make the checkbox Escalated_Call__c to true. 

What is wrong with the below code- No error, but do not make checkbox true.

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

var objCase = new sforce.SObject('Case');

objCase.Escalation_Reason_Details__c ='{!JSENCODE(Case.Escalation_Reason_Details__c)}';

if(objCase.Escalation_Reason_Details__c == '')
{
alert ('Please fill Escalation_Reason_Details__c');
}
else
{

objCase.Escalated_Call__c=true;

}
var result = sforce.connection.update([objCase]);
location.reload(true);
I am using the e.force:createRecord and want to know if I can use the name (rather than ID) to pass the record type.
I know its not good practive to hardcode the ID's but unsure about how else to pass them.  Currently, I'm using:

{"entityApiName":"Opportunity","defaultFieldValues" :{ "AccountId": "#parentrecordid#", "RecordTypeId":"01239000000HrXEAA0", "Name":"Temp Name", "Region__c":"Inernational"}}

Thanks!!!

Fred
  • August 20, 2018
  • Like
  • 0