• Soene Ibanibo
  • NEWBIE
  • -1 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
I am unable to download app in AppExchange. How do I obtain permission for both “Create AppExchange packages” and “Upload AppExchange packages”? Thanks!
Hello
I am new to writing test class. I need help in writing test class for the following code.
scenairo: when I create a new account from UI, a nee opportunity record gets created under the account.
public class CreateNewOpportunity
{
   public List<Opportunity> oppList=new List<Opportunity>();
   
   public void CreateOpportunity(List<Account> accList)
   {
     for(Account a:accList)
     {
       Opportunity o = new Opportunity();
       o.AccountID=a.ID;
       
       o.Name=a.Name;
       o.CloseDate=System.Today().addDays(3);
       
       o.StageName='Prospecting';
       
       oppList.add(o);
     }
     
     if (oppList.size() > 0)
         Database.Insert(oppList);
   }
}

trigger trg_createnewoppor on Account (after Insert,after update)
{
  if ((Trigger.isInsert) || (Trigger.IsBefore))
  {
    CreateNewOpportunity o = new CreateNewOpportunity();
    o.CreateOpportunity(Trigger.New);
  }
}


Thanks
smita
Hi
I have university as parent object & college as child object.
There is a master-detail relationship defined on child object i.e college

I have a parent-child soql as follows
List<University__c> univList=[select Name,(select Name from colleges__r) from university__c];
system.debug(univList);

Also I have a child-parent soql as follows
List<college__c> univList=[select Name,university__r.Name from college__c
system.debug(univList);

when I execute the parent-child query I do not get any child related records .
Also when I execute child-parent query I do get the name of the college but the university ID I get but I want the university name also not the ID

please let me know.

Thanks
pooja
 
Hi Everyone,

My Scenario is create two fields
product category” as the first lookup(Product2) and then the “Product Name/Code” as the second lookup(Product2) into Child Object (Request__c).

Note:  here main problem is reffering same Parent Object(Product2) in Child Object

Here my client expecting first lookup user going to select perticuler Category 

Product Category 
Samsung
IPHONE
SONY

Samsung :(user Clicks First lookup values is Samsung in second lookup need to display some dependeny mentioned below )

Product  Name/code(Lookup)
S-3652
S-2564
S-1234

IPHONE:(user Clicks First lookup values is IPHONE in second lookup need to display some dependeny mentioned below )

Product name/code(Lookup)
I6
I7
I8

Sony:(user Clicks First lookup values is Sony in second lookup need to display some dependeny mentioned below )

Product Name/code(Lookup)
Sony-1234
Sony-5664
Sony-4568

I'm implemented same functionlity using picklist dependency its working fine but my client expecting above scenario. 

Can you please guide me how to achive this scenrion in Salesforce .


PFA

User-added image