• RobinHood
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies

Hi, 

 

Below is my object structure

Custom Object: Preview_List_Property__c

 

Custom Fields      Data Type

Importance           PickList

MLSProperty        Master-Detail(MLSProperty)

Preview_List        Master-Detail(Preview List)

 

I want to make the field MLSProperty to be unique, but i don't see any option for doing that in the custom field definition details page. Do I need to use trigger or is there any other option ? 

 

Thanks,

 

SR

Hi,

 

I want to delete the record returned from the following query, how do I delete it ?

 

 //To remove property from the database
    function removePropertyFromDB(propertyId, PreviewListId){
           var unWantedPropSql = sforce.connection.query("Select Importance__c, MLSProperty__r.Name, Preview_List__c  From Preview_List_Property__c p where MLSProperty__r.Name = '" + propertyId + "' and Preview_List__r.id = '" + PreviewListId + "'");
        }

//the above query returns 5 rows of record, how do I delete these rows ? pls help me out !

 

Thanks,

 

Suresh

Hi,

 

I'm trying to delete a record from the object Preview_List_Property__c by passing the parameter (propertyId)

below is my function, but the record corresponding to the propertyId is not getting deleted.

 

Any thoughts on this ?

 

function removeFromTheDB(propertyId){
    var unWantedPropSql = "Select Importance__c, MLSProperty__r.ID, Preview_List__c  From Preview_List_Property__c p where MLSProperty__r.ID = '" + propertyId +"'";
    var unWantedPropResult = sforce.connection.query(unWantedPropSql);   
    var unWantedPropResultArray = unWantedPropResult.getArray("unWantedPropResultArray");
    sforce.connection.deleteIds([unWantedPropResultArray]);    
    }


Thanks,

 

Suresh  

Hi,

 

I'm trying to select a address from the database and displaying them in the Visual Force page by using a add button.

 

Say if I add

 

1870 Fair Oaks West Sunnyvale 94086 CA address to my list, I can again add the same address to my list which is causing duplicate records, how do I prevent this duplicate record from being added again ?

 

Hi,

 

I want to delete the record returned from the following query, how do I delete it ?

 

 //To remove property from the database
    function removePropertyFromDB(propertyId, PreviewListId){
           var unWantedPropSql = sforce.connection.query("Select Importance__c, MLSProperty__r.Name, Preview_List__c  From Preview_List_Property__c p where MLSProperty__r.Name = '" + propertyId + "' and Preview_List__r.id = '" + PreviewListId + "'");
        }

//the above query returns 5 rows of record, how do I delete these rows ? pls help me out !

 

Thanks,

 

Suresh

Hi,

 

I'm trying to select a address from the database and displaying them in the Visual Force page by using a add button.

 

Say if I add

 

1870 Fair Oaks West Sunnyvale 94086 CA address to my list, I can again add the same address to my list which is causing duplicate records, how do I prevent this duplicate record from being added again ?