• Nasif Hasnain
  • NEWBIE
  • 20 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 5
    Replies
  • I need to create a report of Account having Address of Type only shipping not billing. Can any oneone help me on thisUser-added image
I want to query those record which have only specific type of picklist value.
Example: suppose we have an object called Company and in this company we have a record SF, AB, DC.
SF has picklist value x
AB has picklist value x,y
DC has picklist value  x there are many record like this....
and some reord has not picklist value.

so i want to query only those record which has picklist value only x. Can anyone help on this.
for adress object if i am changing city automatically street is also getting change

 
I need to write a trigger for the below requirement:

If a record is inserted in an object phone with name iphone and colour red, then trigger should insert iphone with all the availaible colour- black blue orange and so on

There were 10 colour present in as metadata with name colour, so trigger should create iphone with all the remaining colour except red.
trigger trg1 on Account (after update){
list<Contact> cont = new list<contact> ();
List<Account> acc = new list<Account>();
        for(Account a : trigger.new){
        acc.add(a);
        }
if(trigger.oldmap.get(acc.id).billingstreet != acc.billingstreet){
    list<contact> con = [select id,name,accountid, otherstreet from contact
                        where accountid IN : acc.id];
                  for(contact c : con){
                      c.otherstreet = acc.billingstreet;
                             cont.add(c);
                            }
                        update cont;
                    }
        }
  • I need to create a report of Account having Address of Type only shipping not billing. Can any oneone help me on thisUser-added image
I want to query those record which have only specific type of picklist value.
Example: suppose we have an object called Company and in this company we have a record SF, AB, DC.
SF has picklist value x
AB has picklist value x,y
DC has picklist value  x there are many record like this....
and some reord has not picklist value.

so i want to query only those record which has picklist value only x. Can anyone help on this.
I need to write a trigger for the below requirement:

If a record is inserted in an object phone with name iphone and colour red, then trigger should insert iphone with all the availaible colour- black blue orange and so on

There were 10 colour present in as metadata with name colour, so trigger should create iphone with all the remaining colour except red.
trigger trg1 on Account (after update){
list<Contact> cont = new list<contact> ();
List<Account> acc = new list<Account>();
        for(Account a : trigger.new){
        acc.add(a);
        }
if(trigger.oldmap.get(acc.id).billingstreet != acc.billingstreet){
    list<contact> con = [select id,name,accountid, otherstreet from contact
                        where accountid IN : acc.id];
                  for(contact c : con){
                      c.otherstreet = acc.billingstreet;
                             cont.add(c);
                            }
                        update cont;
                    }
        }