• Mojtaba Nasiri
  • NEWBIE
  • 0 Points
  • Member since 2010

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

Hi Pros.

 

i have a VF Page in which i have set standardController="account".

i would like to remove Some of the related list from the current Account object.

if i use the syntax of <apex:detail relatedList="false"/>, all the related list will be removed an i dont want that to happen.

i would like to use the default list of related lists and only remove some of the related lists and not all.

 

can anybody help me for this?

any comments is more than welcome

 

Mojtaba

Hi Pros,

 

i have been trying to auto Populate a field from another field value based on Ajax Triggers, but i get error.

here is the scenario:

Under accounts standard Object i have a custom  field called as Control Location.

Under User standard object i have a custom field also called as Control Location.

 Account and Users are connected based on a lookup of sales Representative (renamed Account Owner field).

i would like to auto populate the account's Control Location based on the value of Control Location in the user Object.

 

here is my Query:

 

 trigger populatecontrolLocation on Account(before insert, before update)

{

    // for each account, create a new trigger

    for(Account a : Trigger.new)

    {

        // Create a list of user records from a SOQL query  

        List <User> accusr = [SELECT Control_Location__c FROM User WHERE id = : a.Ownerid]; 


        // for each account user 

        

        a.Control_Location__c = accusr.get(0);

       

       

    }

        

}

 

 

and here is the error i receive:

 error : Illegal assignment from SOBJECT:User to String

 

 

any suggestions would be more than welcome.

 

best regards,

Mojtaba

 

Hi Pros.

 

i have created too record Types of Customer and Prospect on  Customer (renamed Account) Standard Object.

when ever i create a new record, i have the option of selecting either Prospect or Customer.

i was wondering if i can reflect the same title and field label when when ever i create different record type.

for example, when ever i select the prospect record type, i would like the field label to be prospect name (Currently customer name) and i would like the title to be New Prospect (Currently New Customer).

 

i appreciate if anybody can help me regarding this.

any coding or non coding suggestions are more than welcome.

 

best regards,

Mojtaba 

Hi Pros.

 

i have created too record Types of Customer and Prospect on  Customer (renamed Account) Standard Object.

when ever i create a new record, i have the option of selecting either Prospect or Customer.

i was wondering if i can reflect the same title and field label when when ever i create different record type.

for example, when ever i select the prospect record type, i would like the field label to be prospect name (Currently customer name) and i would like the title to be New Prospect (Currently New Customer).

 

i appreciate if anybody can help me regarding this.

any coding or non coding suggestions are more than welcome.

 

best regards,

Mojtaba 

Hello

I am using bulk api to insert object instance in Force.com

I have defined a trigger on before insert, update

 

Map<String, Visite__c> myorgalist = new Map<String, Visite__c>();

for (Visite__c evt : Trigger.new) {
        myorgalist.put(evt.Organization__c,evt);
}

 

for (FAI_Blind__c myorga: [Select Name__c from FAI_Blind__c where Name__c IN :myorgalist.keySet()] )
    {
        Visite__c myvisit=myorgalist.get(myorga.Name__c);
         myvisit.Type__c='FAI BLIND';
         myvisit.Finished__c=true;
     }

 

Insertion works perfectly (job with batches with 100 insert) but when I look at the result in SF, I have some visit that should have been found in my loop and trigger did not found it (TYPE is NOT FOUND : default value).

If I edit the visit and save it, trigger work wells and visit is found in the loop -> Type is changed to FAI BLIND

Do you have any idea of what is going wrong ? Bad script ? Performance issue ?

Do you know a workaround ?

Thanks for your help

Regards