• Elad Kaplan 3
  • NEWBIE
  • 25 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 12
    Replies
I have a javascript custom button I've created, and I want to go over an Opportunity standard page and get it's section names using a javascript.

Can it be done ? 
Hi,

I'm using a CSS to style one of my client's community.

I have a requirement, where they want to replace the text on the 'Attach File' button of the Notes and Attachments related list to 'ADD ATTACHMENT'.

I'm trying to do so but with no luck, here's my CSS code : 

 input[name="attachFile"] { 

    visibility: hidden;
    position: relative;
}

 input[name="attachFile"]:after{
      
      position: absolute;
      content: 'ADD ATTACHMENT';
      visibility: visible;
 }


Anyone ? 
I have a string with Parameters and their values that i need to send in a URL to a website.

How can I encrypt it where the other party writing in PHP can decrypt it? 
I'm trying to query for records, filtered by picklist values but can't do it.

I have a page where I have a search box, when the user insert a letter I have an apex:actionSupport that needs to get all the records where picklist values containing  this letter (or more than 1 letter) .

For example - If I have records of 'Case' where I'm looking for the field 'Status' and one of the values is 'New' and the user inserts 'Ne' to the search box, I want to query all the 'Case' records where their Status is 'New' ..

Can anybody help ?
I have a String and I'm trying to get it's characters by index.

For some reason the method string.charAt(index) , doesn't return a letter, but a number..

Any idea how can I get the characters ?
Does anybody know if it's possible to create a Case and set it's Record Type automatically from the Live Agent Pre Chat? 

I wanna do it without having the need to set a default Record Type for the Agent's profile.

When It's getting created on the consule, I'm getting the screen, where I have to choose a Record Type..
Hi,

I have a select list where  multiselect="true".

When the page loads, I can select a value and a JS function is executed and rerender part of the page, including the slect list, bringing back different results an re populating the select list.

The problem is that after re rendering, when I choose a value in the select list, nothing happens and the JS function doesn't get executed.

Anyone ?  
I have a trigger that in few situations throws an exception which are cought .

I want to display the error message when the exception is cought on the data loader.

Any idea how to do it ?

Thanks!
Hi guys,

I'm trying to diplay piece of HTML in a rich text area field.

The problem is that it dispayes it as a pure HTML with all the tags,

Here is the HTML I'm trying to insert :

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<p><strong>Related issues</strong></p>
<table class="list issues">
<tr class="issue hascontextmenu" id="relation-15556">
<td class="checkbox">*</td>
<td class="subject">
Related to
SX-IB -
<a href="/issues/20226" class="issue tracker-28 status-5 priority-6 priority-lowest closed assigned-to-my-group issue status-30 closed">Bug SW #20226</a>: error message in /var/log/messages: &quot;Failed to get port c...
</td>
<td class="status">Closed</td>
<td class="start_date">04/06/2012</td>
<td class="due_date"></td>
<td class="buttons"><a href="/relations/15556" data-confirm="Are you sure?" data-method="delete" data-remote="true" rel="nofollow" title="Delete relation"></a></td>
</tr>
<tr class="issue hascontextmenu" id="relation-15557">
<td class="checkbox">*</td>
<td class="subject">
Related to
SX-General -
<a href="/issues/365651" class="issue tracker-28 status-38 priority-6 priority-lowest closed assigned-to-my-group issue status-32 closed">Bug SW #365651</a>: [ibd.WARNING]: Failed to get port counters rcv_data MAD_...
</td>
<td class="status">Closed (Rejected)</td>
<td class="start_date">08/01/2014</td>
<td class="due_date"></td>
<td class="buttons"><a href="/relations/15557" data-confirm="Are you sure?" data-method="delete" data-remote="true" rel="nofollow" title="Delete relation"></a></td>
</tr>
</table>
</body>
</html>

Anybody ? 

Thanks !!
I'm trying to add a picture to a table column header, using an image located in my static resource.

Anybody got a chance to do it ?

Thanks!!
Does anybody has a working example that uses the connection.login.js ?

I'm trying to connect to salesforce from an exterior website using javascript and getting an Error.

Here is My code:

<!DOCTYPE HTML>
<HTML>
<HEAD>

<script src="https://na6.salesforce.com/soap/ajax/30.0/connection.js" ></script>

<script type="text/javascript" >

function logincall()
{

    try{
   
   
    var usrname = document.getElementById('userid').value;
    var passwrd = document.getElementById('passid').value;

    if(usrname == null || usrname == '' || passwrd == null || passwrd == '')
    {
        alert('Please enter Username AND Password');
        return;
    }
   
    var result = sforce.connection.login(usrname, passwrd);

    alert("Logged in with session id " + result.sessionId);
    }
    catch(error)
    {
        alert(error);
       
       
    }

}
</script>

</HEAD>

<BODY>

To test logging into a Salesforce Instance using the connection.js "login" call

<table>
        <tr>
            <td>Username</td>
            <td><input type="text" id="userid" value="" /></td>
        </tr>
        <tr>
            <td>Password</td>
            <td><input type="password" id="passid" value="" /></td>
        </tr>

</table>

    <input type="button" value="Login" onclick="logincall();" />

</BODY>

</HTML>


I'm getting an Error :  The requested url services/Soap/u/30.0 was not found on this server


Any idea anyone?

I want to update some fields on a case related to an email message, when the email message status changes, the problem is, that the status change doesn't triggers anything (trigger or workflow), I also can't create a custom object to look up to an Email message.

Anyone has a work around i can do ? 
Does anybody has a working example that uses the connection.login.js ?

I'm trying to connect to salesforce from an exterior website using javascript and getting an Error.

Here is My code:

<!DOCTYPE HTML>
<HTML>
<HEAD>

<script src="https://na6.salesforce.com/soap/ajax/30.0/connection.js" ></script>

<script type="text/javascript" >

function logincall()
{

    try{
   
   
    var usrname = document.getElementById('userid').value;
    var passwrd = document.getElementById('passid').value;

    if(usrname == null || usrname == '' || passwrd == null || passwrd == '')
    {
        alert('Please enter Username AND Password');
        return;
    }
   
    var result = sforce.connection.login(usrname, passwrd);

    alert("Logged in with session id " + result.sessionId);
    }
    catch(error)
    {
        alert(error);
       
       
    }

}
</script>

</HEAD>

<BODY>

To test logging into a Salesforce Instance using the connection.js "login" call

<table>
        <tr>
            <td>Username</td>
            <td><input type="text" id="userid" value="" /></td>
        </tr>
        <tr>
            <td>Password</td>
            <td><input type="password" id="passid" value="" /></td>
        </tr>

</table>

    <input type="button" value="Login" onclick="logincall();" />

</BODY>

</HTML>


I'm getting an Error :  The requested url services/Soap/u/30.0 was not found on this server


Any idea anyone?

Hi,

I'm using a CSS to style one of my client's community.

I have a requirement, where they want to replace the text on the 'Attach File' button of the Notes and Attachments related list to 'ADD ATTACHMENT'.

I'm trying to do so but with no luck, here's my CSS code : 

 input[name="attachFile"] { 

    visibility: hidden;
    position: relative;
}

 input[name="attachFile"]:after{
      
      position: absolute;
      content: 'ADD ATTACHMENT';
      visibility: visible;
 }


Anyone ? 
I have a string with Parameters and their values that i need to send in a URL to a website.

How can I encrypt it where the other party writing in PHP can decrypt it? 
I'm trying to query for records, filtered by picklist values but can't do it.

I have a page where I have a search box, when the user insert a letter I have an apex:actionSupport that needs to get all the records where picklist values containing  this letter (or more than 1 letter) .

For example - If I have records of 'Case' where I'm looking for the field 'Status' and one of the values is 'New' and the user inserts 'Ne' to the search box, I want to query all the 'Case' records where their Status is 'New' ..

Can anybody help ?
What are the pros and cons when using a Workflow Rule Field Update vs. a Formula Field?
Hi guys,

I'm trying to diplay piece of HTML in a rich text area field.

The problem is that it dispayes it as a pure HTML with all the tags,

Here is the HTML I'm trying to insert :

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<p><strong>Related issues</strong></p>
<table class="list issues">
<tr class="issue hascontextmenu" id="relation-15556">
<td class="checkbox">*</td>
<td class="subject">
Related to
SX-IB -
<a href="/issues/20226" class="issue tracker-28 status-5 priority-6 priority-lowest closed assigned-to-my-group issue status-30 closed">Bug SW #20226</a>: error message in /var/log/messages: &quot;Failed to get port c...
</td>
<td class="status">Closed</td>
<td class="start_date">04/06/2012</td>
<td class="due_date"></td>
<td class="buttons"><a href="/relations/15556" data-confirm="Are you sure?" data-method="delete" data-remote="true" rel="nofollow" title="Delete relation"></a></td>
</tr>
<tr class="issue hascontextmenu" id="relation-15557">
<td class="checkbox">*</td>
<td class="subject">
Related to
SX-General -
<a href="/issues/365651" class="issue tracker-28 status-38 priority-6 priority-lowest closed assigned-to-my-group issue status-32 closed">Bug SW #365651</a>: [ibd.WARNING]: Failed to get port counters rcv_data MAD_...
</td>
<td class="status">Closed (Rejected)</td>
<td class="start_date">08/01/2014</td>
<td class="due_date"></td>
<td class="buttons"><a href="/relations/15557" data-confirm="Are you sure?" data-method="delete" data-remote="true" rel="nofollow" title="Delete relation"></a></td>
</tr>
</table>
</body>
</html>

Anybody ? 

Thanks !!
I'm trying to add a picture to a table column header, using an image located in my static resource.

Anybody got a chance to do it ?

Thanks!!
Hello all,

I have a scenario,where Business Development Manager(BDM) will conduct promotions on company's products. The members attened for that promotions are added as Promotion members(PMM)
Promotion is Master object
Promotion member is child.

Call centre guys verifies each promotion by calling PMM's on their Mobile No's.
If verification status(this is a picklist with Suggestion,Complaint,Others) is Complaint, then a task has to be created for concerned BDM and a task for his Manager.

I have this functionality built already, but the problem is, the tasks are getting created two times instead of one.
that is it is creating 4 tasks instead of 2(one for BDm , one for Manager)

i am posting my code here

Class:

public class PromotionmemberTaskHandler{
  
    Public static void createPromotionTasks(Map<Id,Promotion_Member__c> mapTriggerNew,Map<Id,Promotion_Member__c> mapTriggerOld){
        Map<id,Id> mapUserIdVsMgrId = new Map<id,Id>();
        List<Task> lstTask = new List<Task>();
         
        for(user u :[Select id,email,ManagersId__c from User where isActive = true and ManagersId__c <> null]){
            mapUserIdVsMgrId.put(u.id, u.ManagersId__c);  
        }
        
        for(Promotion_Member__c p: mapTriggerNew.Values()){
            if(p.Verified__c = true && p.Verification_Status__c == 'Complaint' && p.Verification_Status__c <> mapTriggerOld.get(p.Id).Verification_Status__c){
                if(mapUserIdVsMgrId.containsKey(p.CreatedById)){
                 Task t = new task();
                  t.ownerid = p.CreatedById;
                 t.Call_Center_Comments__c = p.Call_Center_Remarks__c;
                        t.WhatId = p.id;
                        t.Suggestion__c = p.Suggestion__c;
                        t.Complaint__c = p.Complaints__c;
                        t.ActivityDate = system.today();
                        t.Priority = 'Normal';
                        t.Subject = 'PromotionMember Complaint';
                      
                       insert t;
                       Task t1 = new task();
                 t1.Call_Center_Comments__c = p.Call_Center_Remarks__c;
                  t1.ownerid = mapUserIdVsMgrId.get(p.CreatedById);
                        t1.WhatId = p.id;
                        t1.Suggestion__c = p.Suggestion__c;
                        t1.Complaint__c = p.Complaints__c;
                        t1.ActivityDate = system.today();
                        t1.Priority = 'Normal';
                        t1.Subject = 'PromotionMember Complaint';
                      
                       insert t1;
              
                }
            }
        }
     
    }
}


Trigger:

Trigger TaskCreatepromotionmember on Promotion_Member__c (before update) {  
  if(Trigger.isUpdate && Trigger.isBefore){
      PromotionmemberTaskHandler.createPromotionTasks(trigger.newMap,trigger.oldMap);   
    }                                     
}


I am unable to traceout what the error in this code, so im posting here for your help

Thanks in advance.
I want to update some fields on a case related to an email message, when the email message status changes, the problem is, that the status change doesn't triggers anything (trigger or workflow), I also can't create a custom object to look up to an Email message.

Anyone has a work around i can do ? 

 

Hello Board,

 

Can we write Trigger on UserRole object?

 

Thanks,

Devendra