Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

How to fix error 431 Request Header Fields Too Large . HTTP CODE[431] in Anonymous Window

Asked by Daniel Baker Apr 23, 2021 3.0K views 1 answer
Share

About this question

I'm getting http error 431 when I execute a query and call a method inside the anonimous window. It's strange because I've executed a code very similar in length before and I've never seen this error. I've got an object with more than 200 fields that I try to query (required to be like this because of the business logic).

enter image description here


===================

```PrivateFundRegistration__c fundRegistration = [SELECT Id, Name, CurrencyIsoCode, Account__r.Name, ALMCOCVResumeTitle__c, ALMCOCVResume__c, ALMCOCity__c, ALMCOCountryOfBirth__c, ALMCOCountry__c, ALMCODateOfBirth__c, ALMCOEmailAddress__c, ALMCOEmployer__c, ALMCOFacsimileNumber__c, ALMCOFirstName__c, ALMCOGender__c, ALMCOLastName__c, ALMCOMiddleName__c, ALMCOOccupationTitle__c, ALMCOOtherNames__c, ALMCOPOBox__c, ALMCOPhoneNumber__c, ALMCOPrefix__c, ALMCOStateProvince__c, ALMCOStreetAddress__c, ALMCOZipPostalCode__c, AMLCFTServiceProviderCountry__c, AMLCFTServiceProviderEmail__c, AMLCFTServiceProviderName__c, AccountingPrinciples__c, ActualOrExpectedSizeOfInvestorBase__c, AdministratorsConsentLetterTitle__c, AttachAuditorsConsentLetter__c, AttachCertOfIncorporationTitles__c, AttachCertificateOfIncorporation_Re__c, AttachConsFromRegAndTransfTitle__c, AttachConsentFromNAVCalcAgenTitle__c, AttachOfferingDocSummaryTitles__c, AttachStructureChartTitles__c, AttachStructureChart__c, AttachTrustDeedDeclarationTitles__c, AuditingPrinciples__c, AuditorsConsentLetter__c, BaseCurrencyOfOffering__c, BuildingFloorSuiteB03a__c, BuildingFloorSuiteB05a__c, CIMAApplicationNumber__c, CIMAIDC06__c, CIMAID__c, CaymanAuditorLocalAuditSignOff__c, CityB03d__c, CityB05d__c, CompaniesRegistrationCORISNumber__c, CountryB03g__c, CountryB05g__c, CountryOfAdministrator__c, CountryOfDepositary__c, CountryOfFormation__c, CountryOfInvestmentManager__c, CountryOfNAVCalculationAgent__c, CountryOfOverseasAuditor__c, CountryOfPromoterSponsor__c, CountryOfRegistrarAndTransferAgent__c, DAMLCOCIMAID__c, DAMLCOCVResumeTitle__c, DAMLCOCVResume__c, DAMLCOCity__c, DAMLCOCountryOfBirth__c, DAMLCOCountry__c, DAMLCODateOfBirth__c, DAMLCOEmailAddress__c, DAMLCOEmployer__c, DAMLCOFacsimileNumber__c, DAMLCOFirstName__c, DAMLCOGender__c, DAMLCOLastName__c, DAMLCOMiddleName__c, DAMLCOOccupationTitle__c, DAMLCOOtherNamesAliases__c, DAMLCOPOBox__c, DAMLCOPhoneNumber__c, DAMLCOPrefix__c, DAMLCOStateProvince__c, DAMLCOStreetAddress__c, DAMLCOZipPostalCode__c, DMLROCIMAID__c, DMLROCVResumeTitle__c, DMLROCVResume__c, DMLROCity__c, DMLROCountryOfBirth__c, DMLROCountry__c, DMLRODateOfBirth__c, DMLROEmailAddress__c, DMLROEmployer__c, DMLROFacsimileNumber__c, DMLROFirstName__c, DMLROGender__c, DMLROLastName__c, DMLROMiddleName__c, DMLROOccupationTitle__c, DMLROOtherNamesAliases__c, DMLROPOBox__c, DMLROPhoneNumber__c, DMLROPrefix__c, DMLROStateProvince__c, DMLROStreetAddress__c, DMLROZipPostalCode__c, DateOfFormationIncorporation__c, EmailAddressB03i__c, EmailAddressB05i__c, EmailAddress__c, Engagement__c, FYEDay__c, FYEMonth__c, FirstName__c, FrequencyOfValuations__c, GPCountry__c, GPLegalEntityIdentifierLEI__c, GeneralPartnerGP__c, IfInCaymanNotRegisteredProvideIM__c, IfInCaymanSelectAdministratorName__c, IfInCaymanSelectInvestmentManager__c, IfNoProvideFreePayments__c, IfNoProvideNameOfNAVCalcAgent__c, IfNoProvideNameOfRegistrarAndTra__c, IfNoProvideOngoingQueries__c, IfNotInCaymanProvideAdministrator__c, IfNotInCaymanProvideIM__c, IfNotInCaymanSelectNameOfRegulat__c, IfRegulatorIsNotOnTheListInB19__c, IfRegulatorIsNotOnTheListInB24__c, IfRegulatorisNotOnTheListInB09__c, IndustryReference__c, InitialTermDurationOfFundInYears__c, InvestmentRestrictionsCategory__c, InvestmentRestrictionsDetails__c, LastName__c, LegalCounselInCayman__c, LegalEntityIdentifierLEI__c, LegalStructure__c, MLROCIMAID__c, MLROCVResumeTitle__c, MLROCVResume__c, MLROCity__c, MLROCountryOfBirth__c, MLROCountry__c, MLRODateOfBirth__c, MLROEmailAddress__c, MLROEmployer__c, MLROFacsimileNumber__c, MLROFirstName__c, MLROGender__c, MLROLastName__c, MLROMiddleName__c, MLROOccupationTitle__c, MLROOtherNamesAliases__c, MLROPOBox__c, MLROPhoneNumber__c, MLROPrefix__c, MLROStateProvince__c, MLROStreetAddress__c, MLROZipPostalCode__c, MaximumTermDurationOfFundInYears__c, MinimumInitialInvestmentForInvestor__c, NameC04__c, NameOfDepositary__c, NameOfDistributorIfApplicable__c, NameOfFund__c, NameOfOverseasAuditor__c, NameOfPromoterSponsor__c, NameOfRegisteredOffice__c, NameOfRegulatorForAdministratorContB15__c, NameOfRegulatorForAdministratorCont__c, NameOfRegulatorForNAVCalculationAg__c, NameOfRegulatorForRegistrarAndTran__c, NewInvestmentManagerApplicationRef__c, OfferingDocTermsSummaryMarketingMat__c, POBoxB03c__c, POBoxB05c__c, PrimaryInvestmentStrategyOther__c, PrimaryInvestmentStrategy__c, PrimaryStockExchangeOfFund__c, ProvinceStateB03e__c, ProvinceStateB05e__c, RequestedDateOfRegistration__c, RiskFactors__c, SecondaryInvestmentStrategyOther__c, SecondaryInvestmentStrategy__c, SingleFundMultiFund__c, Status__c, StreetNameAndNumberB03b__c, StreetNameAndNumberB05b__c, TelephoneNumberB03h__c, TelephoneNumberB05h__c, TrustDeedPartnDeclMemAndAssArt__c, Trustee__c, ZIPPostalCodeB03f__c, ZIPPostalCodeB05f__c, FeePaymentsRegisteredOff__c, FundProvideItsAdministrationServices__c, HasNomineeInvestors__c, InvestmentManagerIndependent__c, IsTheAMLFunctionOutsourced__c, IsTheNAVCalculationAgentIndependent__c, IsTheRegistrarAndTransferAgent__c, NAVCalculationAgentSameAdmin__c, OngoingQueriesRegisteredOff__c, RegisterAndTransferAgentSameAdmin__c FROM PrivateFundRegistration__c WHERE Id = 'a4Q17000000UFpREAW']; String result = PrivateFundRegistrationsJSONBuilder.convertToJSON(fundRegistration); System.debug(result); System.debug('FINISHED');```

================

I've tried deleting the cookies and cache of my browser (google chrome) and doing logout and login again but that didn't work.

If someone can help me or give me some advice I would appreciate it very much. Thanks for the time, regards. apex

Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.