• Anu Yadav
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 4
    Replies
I have a custom Label Address_State with Value "State *". I want to display "State" in black and "*" in Red color in Lightning page. Please suggest.
When I create a new record from the object tab (clicking the "New" button), any Duplicate Management warnings are displayed on the screen, together with a link to view the duplicate records.
"
 The record you are about to create looks like a duplicate.Open an existing record instead? View Duplicates."
But, if we create a new record from a Quick Action, the Duplicate Management warning is abbreviated and there is no option to see the duplicate records.

"Possible duplicate records found. you don't have access to any of the duplicates."

Though i am a system admin and the existing records were created by me. still I am getting above error message for quick Action.

Can anybody help me to find the reason behind it.

Thanks,
Anu Yadav

 
hi Guys,

i have two classes. I m querying Title and MiddleName of Contact object in subquery for a Map "RelatedAccounts". these two fields i am using in ManageCustomerHandler class for mapping purpose. but i m getting the below error.

ERROR: ContactTrigger: execution of AfterUpdate caused by: System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: Contact.Title

        list<Id> AccountIds = new list<Id>();
        for (Contact c : contacts){
            AccountIds.add(c.AccountId);
        }
        map<Id,Account> RelatedAccounts = new map<Id,Account>([SELECT Id,Name,Phone,Email__c,ABN__c,Fax,ACN__c,Website,FraudFlag__c,VIP_Customer__c,Account_UUID__c,Pref_Comm_Method__c,Data_Sovereign_Status__c,ABN_Overide__c,Type,Customer_ID__c,Ultimate_Parent_CIDN__c,Is_TCM_Fields_Changed__c,Business_Unit__c,Managed__c,Language_Preference__c,Market_Segment__c,Customer_Status__c,Legacy_SOU__c,CIDN__c,Parent_CIDN__c,Legacy_Ownership_Code__c,PriorityAssist__c,Churn_Propensity__c,Date_Started_Trading_with_Telstra__c,Description,Franchisee_Arrange__c,Retired_User_ID__c,Retirement_Reason__c,Time_Zone__c,Wriiten_Auth_Required__c,Effective_Retired_Date__c,Customer_Last_Verified_Date__c,Legacy_Created_date__c,Legacy_ROU__c,Customer_Potential_Revenue__c,Customer_Current_Revenue__c,Partners__c,Approve_Decline_Reason__c,Recommended_Payment_Method__c,Recommended_Billing_Frequency__c,Validation_Customer_Consent__c,Validation_Consent_Request_Date__c,Customer_Effective_Start_Date__c,Relationship_Type__c,Reporting_Point_Indicator__c,Customer_Effective_EndDate__c,Date_of_Application__c,Geographical_LocationCode__c,TCM_Master_ID__c,loc__c,TCM_Last_Updated__c,OLB_Online_Bill_Registered__c,Credit_Limit__c,Credit_Management_Status__c,Credit_Rating__c,Concession_Authority__c,Concession_Number__c,Concession_Type__c,Payment_Type__c,Payment_Status__c,Valid_Concession_Flag__c,Last_Validated_Date__c,Bypass_Concession_Validation__c,Validation_Result_Override__c,Portfolio_Code__c,Primary_Portfolio_Indicator__c ,(Select Id,Title,FirstName,MiddleName,LastName,Birthdate,Driver_License_Id__c,Driver_License_State__c,Contact_Type__c From Contacts) FROM Account WHERE Id IN :AccountIds]);
     
 if(c.Contact_Type__c == 'Legal Lessee' && RelatedAccount.Type == 'Sole Trader'){ 
                    System.debug('for sole trader customers contact' +c);
                    CustomermcReq = ManageCustomerHandler.generateManageCustomerRequest(RelatedAccount, event);
                }

class: ManageCustomerHandler
 ManageCustomerRequest.CustomerAccount customerAccountItem = new ManageCustomerRequest.CustomerAccount();
        if(cont != null && (a.Type =='Sole Trader' || a.Type =='Residential')){
            customerAccountItem.title = stripNulls(cont.Title);
             System.debug('Fistname++'+cont.FirstName);
            customerAccountItem.firstName = stripNulls(cont.FirstName + ' ' +cont.MiddleName);
            customerAccountItem.birthDate = '';
            if(cont.Birthdate != null){
              customerAccountItem.birthDate = String.valueOf(cont.Birthdate);     
            }
            customerAccountItem.driverLicenseNumber = cont.Driver_License_Id__c;
           customerAccountItem.driverLicenseState = cont.Driver_License_State__c;
               
            //customerAccountItem.phoneNumber = stripNulls(cont.Phone);
          }
I have checked User Interface for Middle Name. it is enabled. and Field permission is proper.

Thanks,
Anu
Hi,

I m trying write a test class in which i have to Assign the new user to one of the territories by inserting into the UserTerritory object .
I have created a dummy user and dummy territory. Unable to perform the same for UserTerritory.
i m getting error as DML not allowed on UserTerritory. It can be solved by applying (SeeAllData=true) but it os not the correct way.

Please help.
Thanks.
Hi,
I m using following query in my batch class where i m retrieving opportunity records whose account owner is not same as its owner.

Id EBPRecordTypeId = Schema.SObjectType.Opportunity.getRecordTypeInfosByName().get('Partner Opportunities').getRecordTypeId();
        return Database.getQueryLocator([Select Id,name,AccountId,StageName,OwnerId,Account.OwnerId From Opportunity WHERE  OwnerId!=:Account.OwnerId and StageName IN ('Chance identified','Chance qualified','First offer','Finale offer') and RecordTypeid =: EBPRecordTypeId]);

getting error : Invalid bind expression type of Schema.SObjectField for column of type Id

Thanks,
Anu
Hi,

 I have a Custom Button "Refresh" on a related List. It is working fine in all browsers. But when i click it on IE , it disappears during  page load and comes back on complete. I should not happen. Please help.

Thanks,
Anu
Hi,
I am getting this error while deploying the change set.
Cannot find a user that matches any of the following usernames: abc.xyz@***.com, abcd.qwer@***.com,  remove the user from the component being deployed or create a matching user in the destination organization.

Thanks in advance.
I have a custom Label Address_State with Value "State *". I want to display "State" in black and "*" in Red color in Lightning page. Please suggest.
When I create a new record from the object tab (clicking the "New" button), any Duplicate Management warnings are displayed on the screen, together with a link to view the duplicate records.
"
 The record you are about to create looks like a duplicate.Open an existing record instead? View Duplicates."
But, if we create a new record from a Quick Action, the Duplicate Management warning is abbreviated and there is no option to see the duplicate records.

"Possible duplicate records found. you don't have access to any of the duplicates."

Though i am a system admin and the existing records were created by me. still I am getting above error message for quick Action.

Can anybody help me to find the reason behind it.

Thanks,
Anu Yadav

 
hi Guys,

i have two classes. I m querying Title and MiddleName of Contact object in subquery for a Map "RelatedAccounts". these two fields i am using in ManageCustomerHandler class for mapping purpose. but i m getting the below error.

ERROR: ContactTrigger: execution of AfterUpdate caused by: System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: Contact.Title

        list<Id> AccountIds = new list<Id>();
        for (Contact c : contacts){
            AccountIds.add(c.AccountId);
        }
        map<Id,Account> RelatedAccounts = new map<Id,Account>([SELECT Id,Name,Phone,Email__c,ABN__c,Fax,ACN__c,Website,FraudFlag__c,VIP_Customer__c,Account_UUID__c,Pref_Comm_Method__c,Data_Sovereign_Status__c,ABN_Overide__c,Type,Customer_ID__c,Ultimate_Parent_CIDN__c,Is_TCM_Fields_Changed__c,Business_Unit__c,Managed__c,Language_Preference__c,Market_Segment__c,Customer_Status__c,Legacy_SOU__c,CIDN__c,Parent_CIDN__c,Legacy_Ownership_Code__c,PriorityAssist__c,Churn_Propensity__c,Date_Started_Trading_with_Telstra__c,Description,Franchisee_Arrange__c,Retired_User_ID__c,Retirement_Reason__c,Time_Zone__c,Wriiten_Auth_Required__c,Effective_Retired_Date__c,Customer_Last_Verified_Date__c,Legacy_Created_date__c,Legacy_ROU__c,Customer_Potential_Revenue__c,Customer_Current_Revenue__c,Partners__c,Approve_Decline_Reason__c,Recommended_Payment_Method__c,Recommended_Billing_Frequency__c,Validation_Customer_Consent__c,Validation_Consent_Request_Date__c,Customer_Effective_Start_Date__c,Relationship_Type__c,Reporting_Point_Indicator__c,Customer_Effective_EndDate__c,Date_of_Application__c,Geographical_LocationCode__c,TCM_Master_ID__c,loc__c,TCM_Last_Updated__c,OLB_Online_Bill_Registered__c,Credit_Limit__c,Credit_Management_Status__c,Credit_Rating__c,Concession_Authority__c,Concession_Number__c,Concession_Type__c,Payment_Type__c,Payment_Status__c,Valid_Concession_Flag__c,Last_Validated_Date__c,Bypass_Concession_Validation__c,Validation_Result_Override__c,Portfolio_Code__c,Primary_Portfolio_Indicator__c ,(Select Id,Title,FirstName,MiddleName,LastName,Birthdate,Driver_License_Id__c,Driver_License_State__c,Contact_Type__c From Contacts) FROM Account WHERE Id IN :AccountIds]);
     
 if(c.Contact_Type__c == 'Legal Lessee' && RelatedAccount.Type == 'Sole Trader'){ 
                    System.debug('for sole trader customers contact' +c);
                    CustomermcReq = ManageCustomerHandler.generateManageCustomerRequest(RelatedAccount, event);
                }

class: ManageCustomerHandler
 ManageCustomerRequest.CustomerAccount customerAccountItem = new ManageCustomerRequest.CustomerAccount();
        if(cont != null && (a.Type =='Sole Trader' || a.Type =='Residential')){
            customerAccountItem.title = stripNulls(cont.Title);
             System.debug('Fistname++'+cont.FirstName);
            customerAccountItem.firstName = stripNulls(cont.FirstName + ' ' +cont.MiddleName);
            customerAccountItem.birthDate = '';
            if(cont.Birthdate != null){
              customerAccountItem.birthDate = String.valueOf(cont.Birthdate);     
            }
            customerAccountItem.driverLicenseNumber = cont.Driver_License_Id__c;
           customerAccountItem.driverLicenseState = cont.Driver_License_State__c;
               
            //customerAccountItem.phoneNumber = stripNulls(cont.Phone);
          }
I have checked User Interface for Middle Name. it is enabled. and Field permission is proper.

Thanks,
Anu
Hi,
I m using following query in my batch class where i m retrieving opportunity records whose account owner is not same as its owner.

Id EBPRecordTypeId = Schema.SObjectType.Opportunity.getRecordTypeInfosByName().get('Partner Opportunities').getRecordTypeId();
        return Database.getQueryLocator([Select Id,name,AccountId,StageName,OwnerId,Account.OwnerId From Opportunity WHERE  OwnerId!=:Account.OwnerId and StageName IN ('Chance identified','Chance qualified','First offer','Finale offer') and RecordTypeid =: EBPRecordTypeId]);

getting error : Invalid bind expression type of Schema.SObjectField for column of type Id

Thanks,
Anu