• Venkat Nithin
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 8
    Replies

 

Hi, 
I wanted to get rid of Private Check box on the notes & attachments section, As this list is not customizable i know that it can be hidden on the UI using javascript by entering the DOM of the page.
For this I created a home page component - html area - narrow left and added the following js code:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>  
<script type="text/javascript">
<script type="text/javascript">
function hidePrvChkbx() {
    if(document.getElementById('IsPrivate')!=null) {
       document.getElementById('IsPrivate').diabled='true';
    }
}
window.onload = function() {
    window.setTimeout(hidePrvChkbx,0);
}
</script>
 


And added this to the home page layout, And that is working fine.
 
The problem is, We have another JavaScript component called - PostcodeAnywhere which helps in finding the postcode. This is getting affected by the above code.
Out of my research I noticed that, Even Postcode JS is using Window.Onload function to transeverse through the DOM. And I have another onload() function in my code. Which to my knowledge seems to be they both are conflicting.
 
Is there any other Event Objcet that I can make use of to execute my piece of code in JavaScript without affecting the Postcode finder??
Postcode anywhere is a Managed pakcage.. FYI..!!
 
Would really be a great help if this could be solved.
Thanks in advance


Ven

In our org we have some piece of apex code which allows users to create a related contact to an existing contact. It can be done by clicking a button on the custom related list situated at the bottom of the contact record.

 

The problem I am facing is, users are able to create multiple relationships with same contact. And also a contact can be linked to itself as well. I solved the second part saying if the Ids of two records are same, dont create the relation.

 

But the tricky one is the first part. There is a junction object called Contact_connector in between them. which is inserted everytime the relation is created. If there is a way to put in both the existing record Id and duplicated record and tranverse through the Contact_connectorID and check if thats existing then I can say dont create.

 

But am not finding a way to check whether the Contact_connectorId exists between them.

Would be a great help if any one can come up with a solution..

 

Hi, 
I wanted to get rid of Private Check box on the notes & attachments section, As this list is not customizable i know that it can be hidden on the UI using javascript by entering the DOM of the page.
For this I created a home page component - html area - narrow left and added the following js code:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>  
<script type="text/javascript">
<script type="text/javascript">
function hidePrvChkbx() {
    if(document.getElementById('IsPrivate')!=null) {
       document.getElementById('IsPrivate').diabled='true';
    }
}
window.onload = function() {
    window.setTimeout(hidePrvChkbx,0);
}
</script>
 


And added this to the home page layout, And that is working fine.
 
The problem is, We have another JavaScript component called - PostcodeAnywhere which helps in finding the postcode. This is getting affected by the above code.
Out of my research I noticed that, Even Postcode JS is using Window.Onload function to transeverse through the DOM. And I have another onload() function in my code. Which to my knowledge seems to be they both are conflicting.
 
Is there any other Event Objcet that I can make use of to execute my piece of code in JavaScript without affecting the Postcode finder??
Postcode anywhere is a Managed pakcage.. FYI..!!
 
Would really be a great help if this could be solved.
Thanks in advance


Ven

In our org we have some piece of apex code which allows users to create a related contact to an existing contact. It can be done by clicking a button on the custom related list situated at the bottom of the contact record.

 

The problem I am facing is, users are able to create multiple relationships with same contact. And also a contact can be linked to itself as well. I solved the second part saying if the Ids of two records are same, dont create the relation.

 

But the tricky one is the first part. There is a junction object called Contact_connector in between them. which is inserted everytime the relation is created. If there is a way to put in both the existing record Id and duplicated record and tranverse through the Contact_connectorID and check if thats existing then I can say dont create.

 

But am not finding a way to check whether the Contact_connectorId exists between them.

Would be a great help if any one can come up with a solution..