• chanchal_:)
  • NEWBIE
  • 215 Points
  • Member since 2018
  • Salesforce Developer


  • Chatter
    Feed
  • 7
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 36
    Replies
I have created a wrapper class to create an Object and send it as a request to a third party system. It was working well. But after I added a two new arguments of the Datatype Date, I am getting the below error.

    Constructor not defined: [SFDC_DataObject.CustomerAccountObject].<Constructor>(Id, String, Id, String, Id, String, Integer, NULL, String, String, Id, String, NULL, String, String, String, String)

The request that I am creating and sending is as below.

    SFDC_DataObject.CustomerAccountObject cusAccObj = new SFDC_DataObject.CustomerAccountObject(o.AccountId, o.Customer_Name__c, o.Agency_Name__r.Id,o.Agency_Name_OB__c, o.Opportunity.OwnerId, o.Opportunity.Owner.FederationIdentifier, PrimarySalesSplitPercent, null, secSOSalesforceId.get(o.OpportunityId), secSOSalesforceEmail.get(o.OpportunityId), o.Opportunity.Customer_Success_Manage__r.Id, o.Opportunity.Customer_Success_Manage__r.FederationIdentifier, null, o.Billing_Email__c, o.Billing_Phone__c, o.Bill_To_Name__c, o.Billing_Notes__c);

My wrapper class for the same object is as below.

    public class CustomerAccountObject {
            public String  sfCustomerId;
            public String  customerName;
            public String  sfAgencyId;
            public String  agencyName;
            public String  sfPrimarySalesOwnerId;
            public String  primarySalesOwnerEmail;
            public Integer primarySalesOwnerPercentage;
            public Date    primarySalesOwnerEffectiveFrom;
            public String  sfSecondarySalesOwnerId;
            public String  secondarySalesOwnerEmail;
            public Date    secondarySalesOwnerEffectiveFrom;
            public String  sfAccountManagerId;
            public String  accountManagerEmail;
            public String  billingEmail;
            public String  billingPhone;
            public String  billingName;
            public String  billingNotes;
    
            public CustomerAccountObject() {}
    
            public CustomerAccountObject(String sfCustomerId, String customerName, String sfAgencyId, String agencyName, String sfPrimarySalesOwnerId, String primarySalesOwnerEmail, Integer primarySalesOwnerPercentage, Date primarySalesOwnerEffectiveFrom, String sfSecondarySalesOwnerId, String secondarySalesOwnerEmail, Date secondarySalesOwnerEffectiveFrom, String sfAccountManagerId, String accountManagerEmail, String billingEmail, String billingPhone, String billingName, String billingNotes) {
                this.sfCustomerId                     = sfCustomerId;
                this.customerName                     = customerName;
                this.sfAgencyId                       = sfAgencyId;
                this.agencyName                       = agencyName;
                this.sfPrimarySalesOwnerId            = sfPrimarySalesOwnerId;
                this.primarySalesOwnerEmail           = primarySalesOwnerEmail;
                this.primarySalesOwnerPercentage      = primarySalesOwnerPercentage;
                this.primarySalesOwnerEffectiveFrom   = primarySalesOwnerEffectiveFrom;
                this.sfSecondarySalesOwnerId          = sfSecondarySalesOwnerId;
                this.secondarySalesOwnerEmail         = secondarySalesOwnerEmail;
                this.secondarySalesOwnerEffectiveFrom = secondarySalesOwnerEffectiveFrom;
                this.sfAccountManagerId               = sfAccountManagerId;
                this.accountManagerEmail              = accountManagerEmail;
                this.billingEmail                     = billingEmail;
                this.billingPhone                     = billingPhone;
                this.billingName                      = billingName;
                this.billingNotes                     = billingNotes;
            }
        }

I began getting the error after I added the null for the Date arguments I.e primarySalesOwnerEffectiveFrom and **secondarySalesOwnerEffectiveFrom** during the Object creation.

Can anyone please let me know what am I doing wrong here.
Hii Friends,'
When i was doing additon of two cutsom Field of type "Time" in formula field of type "Time".
X1__c  +  X2__c 
It shows error like
Error: Incorrect argument type for operator '+'.

Please Help me
Thank you
  • April 16, 2020
  • Like
  • 0
Write a program to get the total number of records present in an object(Object should be passed as an argument).Problem dML
how to list profiles to disable/enable triggers for profiles like in a custom configuration page
Hello,
I am actually writing a code that helps to get automatically the dependencies between Object.
While writing my code, I faced an issue. I cannot find a way to know when an object doesn't have a parent object.
How can I find that in apex ?
Hi , I am trying to write a trigger for the following scenario :

I have a custom metadata set named xyz_mdt which has custom field Hub__c(custom field for hubs like state names) and the MasterLabel field contains the corresponding cities.

There is picklist Origin__c field on OpportunityLineItem object which will contain the name of the Hub to be selected by the user. A text field OriginCIty__c  will be entered by the user, and based on the corresponding Hub name from the custom metadata, if the entered Origin City doesn't matches Hub, trigger will stop the user to do so, by prompting an error.

Please help!
  • August 16, 2019
  • Like
  • 0
Hi  
I am new in salesforce  i am beginner so please help me


Thanks in advance
 
I have two custom objects say custobj1 and custobj2. In custobj1, In custobj1, I have a date/time field say date_time_custobj1__C and in custobj2 I have another  field but its only date field say date__custobj2__c. Now I need to compare values in these two fields If One Field value is greater then another filed value thats the condition is i enter less value compare to other filed then its throughs the error using trigger   So Please Help me How to use trigger for this what i do write in trigger for this Scenario 
global class Batch_AddConToAcc implements Database.Batchable <sObject> {
    
    
    global Database.QueryLocator start(Database.BatchableContext bc) {
        String query = 'SELECT Id, Name FROM Account WHERE Id NOT IN(SELECT AccountId FROM Contact)';
        return Database.getQueryLocator(query);
    }
    
    global void execute(Database.BatchableContext bc,List<Account> batch) {
        List<contact> lstCon = new List<Contact>();

        for (Account a : batch) {
            Contact c =  new Contact();
            c.LastName = a.Name;
            c.AccountId = a.Id;
            lstCon.add(c);
        }
        Database.SaveResult[] conList = Database.insert(lstCon, false);
            for (Database.SaveResult sr : conList) {
                if (sr.isSuccess()) {
                    // Operation was successful, so get the ID of the record that was processed
                    System.debug('Successfully inserted contact. contact ID: ' + sr.getId());
                }
                else {
                    // Operation failed, so get all errors                
                    for(Database.Error err : sr.getErrors()) {
                        System.debug('The following error has occurred.');                    
                        System.debug(err.getStatusCode() + ': ' + err.getMessage());
                        System.debug('contact fields that affected this error: ' + err.getFields());
                    }
                }
            }
    }
    
    global void finish(Database.BatchableContext bc) {
        //Do Nothing.
    }
}

how do I create opportunities for only success full inserted contacts ? one opportunity for each successfully inserted contact. 
I have created a wrapper class to create an Object and send it as a request to a third party system. It was working well. But after I added a two new arguments of the Datatype Date, I am getting the below error.

    Constructor not defined: [SFDC_DataObject.CustomerAccountObject].<Constructor>(Id, String, Id, String, Id, String, Integer, NULL, String, String, Id, String, NULL, String, String, String, String)

The request that I am creating and sending is as below.

    SFDC_DataObject.CustomerAccountObject cusAccObj = new SFDC_DataObject.CustomerAccountObject(o.AccountId, o.Customer_Name__c, o.Agency_Name__r.Id,o.Agency_Name_OB__c, o.Opportunity.OwnerId, o.Opportunity.Owner.FederationIdentifier, PrimarySalesSplitPercent, null, secSOSalesforceId.get(o.OpportunityId), secSOSalesforceEmail.get(o.OpportunityId), o.Opportunity.Customer_Success_Manage__r.Id, o.Opportunity.Customer_Success_Manage__r.FederationIdentifier, null, o.Billing_Email__c, o.Billing_Phone__c, o.Bill_To_Name__c, o.Billing_Notes__c);

My wrapper class for the same object is as below.

    public class CustomerAccountObject {
            public String  sfCustomerId;
            public String  customerName;
            public String  sfAgencyId;
            public String  agencyName;
            public String  sfPrimarySalesOwnerId;
            public String  primarySalesOwnerEmail;
            public Integer primarySalesOwnerPercentage;
            public Date    primarySalesOwnerEffectiveFrom;
            public String  sfSecondarySalesOwnerId;
            public String  secondarySalesOwnerEmail;
            public Date    secondarySalesOwnerEffectiveFrom;
            public String  sfAccountManagerId;
            public String  accountManagerEmail;
            public String  billingEmail;
            public String  billingPhone;
            public String  billingName;
            public String  billingNotes;
    
            public CustomerAccountObject() {}
    
            public CustomerAccountObject(String sfCustomerId, String customerName, String sfAgencyId, String agencyName, String sfPrimarySalesOwnerId, String primarySalesOwnerEmail, Integer primarySalesOwnerPercentage, Date primarySalesOwnerEffectiveFrom, String sfSecondarySalesOwnerId, String secondarySalesOwnerEmail, Date secondarySalesOwnerEffectiveFrom, String sfAccountManagerId, String accountManagerEmail, String billingEmail, String billingPhone, String billingName, String billingNotes) {
                this.sfCustomerId                     = sfCustomerId;
                this.customerName                     = customerName;
                this.sfAgencyId                       = sfAgencyId;
                this.agencyName                       = agencyName;
                this.sfPrimarySalesOwnerId            = sfPrimarySalesOwnerId;
                this.primarySalesOwnerEmail           = primarySalesOwnerEmail;
                this.primarySalesOwnerPercentage      = primarySalesOwnerPercentage;
                this.primarySalesOwnerEffectiveFrom   = primarySalesOwnerEffectiveFrom;
                this.sfSecondarySalesOwnerId          = sfSecondarySalesOwnerId;
                this.secondarySalesOwnerEmail         = secondarySalesOwnerEmail;
                this.secondarySalesOwnerEffectiveFrom = secondarySalesOwnerEffectiveFrom;
                this.sfAccountManagerId               = sfAccountManagerId;
                this.accountManagerEmail              = accountManagerEmail;
                this.billingEmail                     = billingEmail;
                this.billingPhone                     = billingPhone;
                this.billingName                      = billingName;
                this.billingNotes                     = billingNotes;
            }
        }

I began getting the error after I added the null for the Date arguments I.e primarySalesOwnerEffectiveFrom and **secondarySalesOwnerEffectiveFrom** during the Object creation.

Can anyone please let me know what am I doing wrong here.
global class Batch_AddConToAcc implements Database.Batchable <sObject> {
    
    
    global Database.QueryLocator start(Database.BatchableContext bc) {
        String query = 'SELECT Id, Name FROM Account WHERE Id NOT IN(SELECT AccountId FROM Contact)';
        return Database.getQueryLocator(query);
    }
    
    global void execute(Database.BatchableContext bc,List<Account> batch) {
        List<contact> lstCon = new List<Contact>();

        for (Account a : batch) {
            Contact c =  new Contact();
            c.LastName = a.Name;
            c.AccountId = a.Id;
            lstCon.add(c);
        }
        Database.SaveResult[] conList = Database.insert(lstCon, false);
            for (Database.SaveResult sr : conList) {
                if (sr.isSuccess()) {
                    // Operation was successful, so get the ID of the record that was processed
                    System.debug('Successfully inserted contact. contact ID: ' + sr.getId());
                }
                else {
                    // Operation failed, so get all errors                
                    for(Database.Error err : sr.getErrors()) {
                        System.debug('The following error has occurred.');                    
                        System.debug(err.getStatusCode() + ': ' + err.getMessage());
                        System.debug('contact fields that affected this error: ' + err.getFields());
                    }
                }
            }
    }
    
    global void finish(Database.BatchableContext bc) {
        //Do Nothing.
    }
}

how do I create opportunities for only success full inserted contacts ? one opportunity for each successfully inserted contact. 
Hii Friends,'
When i was doing additon of two cutsom Field of type "Time" in formula field of type "Time".
X1__c  +  X2__c 
It shows error like
Error: Incorrect argument type for operator '+'.

Please Help me
Thank you
  • April 16, 2020
  • Like
  • 0
I have written a test class to create orderline product once the order is created.



User-added image


@isTest
public class orderproductTestClass {
    
    public static testMethod void testorderproduct(){
       Map<Id,Id> mapof = new Map<Id,Id>();
       OpportunityLineItem__c pd = new OpportunityLineItem__c();
       OrderItem__c orderItemsForInsert = new OrderItem__c();
        
        OrderItem__c oi = new OrderItem__c();
        oi.OrderId__c = mapof.get(pd.OpportunityId__c);
        oi.Name = pd.Product2Id__r.name;
        oi.ListPrice__c = pd.ListPrice__c;
        oi.Sales_Price__c = pd.Sales_Price__c;
        oi.Quantity__c = pd.Quantity__c;
        insert orderItemsForInsert;
        Test.StopTest();
    } 
}

Apex class

trigger Createorderproduct on Order__c (after insert) {
    Set<Id> orderIdset= new Set<Id>();
    List<Order__c> orderList = new List<Order__c>();
    Map<Id,Id> opMap = new Map<Id,Id>();
    List<OrderItem__c> orderItemsForInsert = new List<OrderItem__c>();
    for(Order__c o : Trigger.new){
        if(o.Opportunity__c!= null){
            opMap.put(o.Opportunity__c ,o.Id);
        }
    }
    
    if(!opMap.isEmpty()){
        for(OpportunityLineItem__c oli: [Select id, name, OpportunityId__r.Stage__c, Product2Id__r.name, ListPrice__c, 
                                         OpportunityId__c, Sales_Price__c, Quantity__c 
                                         FROM OpportunityLineItem__c 
                                         WHERE OpportunityId__c IN: opMap.Keyset() 
                                         AND OpportunityId__r.Stage__c='Closed Won'])
        {
            OrderItem__c OrderItem = new OrderItem__c();
            OrderItem.OrderId__c = opMap.get(oli.OpportunityId__c);
            OrderItem.Name = oli.Product2Id__r.name;
            OrderItem.ListPrice__c = oli.ListPrice__c;
            OrderItem.Sales_Price__c = oli.Sales_Price__c;
            OrderItem.Quantity__c = oli.Quantity__c;
            orderItemsForInsert.add(OrderItem);                
        }
        if(orderItemsForInsert.size()>0)
        {
            insert orderItemsForInsert;
        } 
    }
}

User-added image
<aura:component controller="lookUpController" implements="force:appHostable,flexipage:availableForAllPageTypes,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global">
 
<!--Including lightning design system library-->
<ltng:require styles="/resource/SLDS222/assets/styles/salesforce-lightning-design-system.css" />
 
<!--declare attributes-->
<aura:attribute name="selectedRecord" type="Contact" default="{}" description="Use,for store SELECTED sObject Record"/>
<aura:attribute name="listOfSearchRecords" type="Contact[]" description="Use,for store the list of search records which returns from apex class"/>
<aura:attribute name="SearchKeyWord" type="string"/>
<aura:attribute name="Message" type="String" default="Search Result.."/>
<aura:attribute name="SearchedResult" type="Contact[]"/>
<aura:attribute name="Dropdownlist" type="Boolean" default="true"/>
 
<!--For applying CSS to/(Fixing the position of) Modal-Popup-->
<aura:attribute name="cssStyle" type="String" />
 
<!--For Hiding and showing the Spinner
<aura:attribute name="Showspinner" type="Boolean" default='true'/> -->
 
<!--declare events hendlers-->
<aura:handler name="oSelectedContactEvent" event="c:selectedContactEvent" action="{!c.handleComponentEvent}"/>
<aura:handler name="myEvent" event="c:selectedContactEvent" action="{!c.GetSelectedCont}" />
 
<aura:handler event="aura:waiting" action="{!c.showSpinner}"/>
<aura:handler event="aura:doneWaiting" action="{!c.hideSpinner}"/>
 
 
<style>
{!v.cssStyle}
</style>
<!-- https://www.lightningdesignsystem.com/components/lookups/ -->
<div class="slds-m-around--large ">
<div aura:id="searchRes" class="slds-form-element slds-lookup slds-is-close" data-select="single">
<label class="slds-form-element__label" for="lookup-348"> Contact Name </label>
<!--This part is for display search bar for lookup-->
<div class="slds-form-element__control">
<div class="slds-input-has-icon slds-input-has-icon--right">
<div onclick="{!c.SearchContact}">
<c:svg class="slds-input__icon slds-icon--large slds-show " xlinkHref="/resource/SLDS222/assets/icons/utility-sprite/svg/symbols.svg#search"/>
</div>
<!-- This markup is for when an record is selected -->
<div aura:id="lookup-pill" class="slds-pill-container slds-hide">
<span class="slds-pill">
<span class="slds-pill__label">
{!v.selectedRecord.Name}
</span>
<!--Button to remove the selection-->
<button class="slds-button slds-button--icon slds-pill__remove" onclick="{!c.clear}">
<c:svg class="slds-button__icon" xlinkHref="/resource/SLDS222/assets/icons/utility-sprite/svg/symbols.svg#close"/>
<span class="slds-assistive-text">Remove</span>
</button>
</span>
</div >
<div aura:id = "lookupField" class = "slds-grid">
<div style="width:100%">
<ui:inputText updateOn="keyup" keyup="{!c.keyPressController}" class="slds-lookup__search-input slds-input" value="{!v.SearchKeyWord}" placeholder="search contact.." >
</ui:inputText>
</div>
</div>
</div>
</div>
<!--This part is for Display typehead lookup result List-->
<div class="slds-lookup__menu slds" aura:id ="lookupmenu">
<div class="slds-lookup__item--label slds-text-body--small">{!v.Message}</div>
<center> <ui:spinner aura:id="spinner"/> </center>
<ul class="slds-lookup__list" role="listbox">
<aura:iteration items="{!v.listOfSearchRecords}" var="singleRec">
<!--Child Component for showing the searched result-->
<c:customLookupResult_Child1 oContact="{!singleRec}" />
</aura:iteration></ul>
</div>
</div>
</div>
&nbsp;
 
<!-- Moadal Popup for showing the search window on press of lookup icon -->
<div role="dialog" tabindex="-1" aura:id="ContactLookup" class="slds-modal slds-fade-in-open visibilityNO">
<div class="slds-modal__container">
<div class="slds-modal__header" style="padding-bottom:15px;">
<button class="slds-button slds-modal__close slds-button--icon-inverse" title="Close" onclick="{!c.HideContactPopup}">
<c:svg ariaHidden="true" class="slds-button__icon slds-button__icon--large" xlinkHref="/resource/SLDS222/assets/icons/utility-sprite/svg/symbols.svg#close"></c:svg>
<span class="slds-assistive-text">Close</span>
</button>
<ui:inputText updateOn="keyup" change="{!c.keyPressController}" class="slds-lookup__search-input slds-input" value="{!v.SearchKeyWord}" placeholder="search contact.." />
 
</div>
<div class="slds-modal__content slds-p-around--medium">
<div class="slds-lookup__item--label slds-text-body--small">{!v.Message}</div>
<table class="slds-table slds-table--bordered slds-table--cell-buffer slds-table_fixed-layout">
<thead>
<tr class="slds-text-heading--label">
<th scope="col"><span class="slds-truncate">Contact Name</span></th>
<th scope="col"><span class="slds-truncate">Account Name</span></th>
<th scope="col"><span class="slds-truncate">Email</span></th>
<th scope="col"><span class="slds-truncate">Phone</span></th>
</tr>
</thead>
<tbody>
 
<!--Child component for showing the searched result -->
<aura:iteration items="{!v.SearchedResult}" var="obj">
<c:customLookupResult_Child2 con="{!obj}" />
</aura:iteration></tbody>
</table>
</div>
<div class="slds-modal__footer">
<ui:button label="Cancel" class="slds-button slds-button--brand" labelClass="label" press="{!c.HideContactPopup}" />
</div>
</div>
</div>
<div class="slds-backdrop slds-backdrop--open visibilityNO" aura:id="popUpBackgroundId1"></div>
</aura:component>


Error: Field_Integrity_exception

 

Failed to save customLookup_Parent.cmp: Markup for markup://c:customLookup_Parent may not contain a <style> tag: Source

How can i resolve this please help me 

Thanks

Write a program to get the total number of records present in an object(Object should be passed as an argument).Problem dML
public List<Account> acclist = new List<Account>();
for(integer i =0; i<10; i++){
    Account acc = new Account();
    acc.name='Account'+i;
    acc.Industry = 'Agriculture';
    acclist.add(acc);
}
Database.SaveResult[] sr= database.insert(acc,false);
for(database.SaveResult srtest : sr){
    if(srtest.isSuccess()){
        system.debug('success');
    }
    else{
        for(database.error e : srtest.getErrors()){
            system.debug('**** '+e.getMessage());
        }
    }
}


I am getting -
variable doesnt exist : acc
error while executing this in anonymous window.

Hi,

I have an apex class method already written which gets called by a button in background,
 

I want a button on Accounts screen, which can call that lightning component and inturn the apex method.

So, I want a button on Accounts screen, which calls a component that calls the method written in Apex class.
Since the method makes the API call, do I need to write some extra code? Since the functionality for API is already written.


 

Hi,

I have a custom object as child to opportunity object. 

I want to delete opportuntity every night, when all the child records for it is 0.

I want to write a batch apex(schedulable), which deletes all such records at 12:00 in the night.

So lets say,

If an opportunity has 2 child records, and the Grand Total value on both child records is 0, I want to delete the opportunity along with its child record.

It should only happen, when both child records value is 0. In case where the child record value is there for one of the childs.. it shouldnt get deleted
Hi,
i want one validation rule like, there two fields is there 
1. Start Date  2. End date,  when useer enter start today and end date should be with in next 90 days only , if end date user select more then 90 days of the start date will get error message.
can you please hel me.

Thanks
 
  • January 20, 2020
  • Like
  • 0
Hi All,

I have a Apex Class which looks like this:
 
trigger FirstTouch on FeedComment (after insert, after update){
    List<Case> updates = new List<case>();
    List<Id> feedItemList = new List<id>();
    Map<Id, User> userMap = new Map<Id, User>([SELECT Id FROM User WHERE Support_Team_Member__c = true]);
    for(FeedComment fc: trigger.new){
        if(userMap.containsKey(fc.InsertedById)){
            feedItemList.add(fc.ParentID);
        }
    }
    
    for(Case c : [Select Id from Case where Id IN (Select ParentId FROM FeedItem WHERE Id IN: feedItemList)]){
        if(c.Support_First_response_minutes__c == null && c.Case_Assigned_To_Support__c != null){
            long totalMs =     DateTime.now().getTime() - c.Case_Assigned_To_Support__c.getTime();
            totalMs *= 60000;
            updates.add(new Case(
                id = c.Id,
                Support_First_response_minutes__c = totalMs
            ));
       }
     }    
    update updates;
}


 
My test looks like this:
 
@isTest
    private class firstTouch {
        private static testMethod void firstTouch(){
            //Create a new test case
            Account a = new Account(name='test acc',phone='7777777777');
            insert a;
            Contact con = new Contact(accountid=a.id,email='test@test.com');
            con.FirstName = 'Testy';
            con.LastName = 'mcTest';
            insert con;
            Case c = new Case(Status = 'New', Priority = 'Medium', Description = 'Test', Last_Updated_By_Support__c = System.now(), Contact = con,
                                     Case_Assigned_To_Support__c = System.now(),
                                     Support_First_response_minutes__c = null );
            insert c;
            if(c.Support_First_response_minutes__c == null && c.Case_Assigned_To_Support__c!= null ){
                //Create a new feed item (Post) on the test case
                Feeditem fi = new feeditem();
                fi.Body = 'test Post on case';
                fi.Type = 'TextPost';
                //Create a new comment on the post in the case
                fi.ParentId = c.Id;
                insert fi ;
                FeedComment fc = new FeedComment(CommentBody = 'test', FeedItemID = fi.Id);
                fc.CommentType = 'TextComment';
                insert fc ;
            }
        }
    }


I've tried adding in an else as well as a 2nd method -- and I can't seem to get my coverage above 53%  Can someone help with this?
Hi all,

There is an email field in Account and contact object.

If the value of Email Field on account is updated, then it should reflect the same on contact.

Can anyone help me, how to achieve this thorugh Apex

Thanks
L Vamsi
Hi ,

I am unable to complete testclass for PricebookEntry Object, which is failing because i need to populate PricebookEntry's ProductCode field(not writable field) in my test class. 
Condition in main class is :- "select id from PricebookEntry where productcode =:Productname"

I also checked with @isTest(seeAllData=True) in my test class. but no improvement.

Can anyone please help me on the above issue.

Thanks!!

KR,
Yash's.
 
Hello,
I am actually writing a code that helps to get automatically the dependencies between Object.
While writing my code, I faced an issue. I cannot find a way to know when an object doesn't have a parent object.
How can I find that in apex ?