• jOseMC
  • NEWBIE
  • 30 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 4
    Replies
Hey guys, I need to do the following, check if the banco__c fields
 and digito_da_conta return null and if they do I have a method that updates this field directly from another object
if(opp.Conta__c = null && opp.Banco__c = null && opp.Agencia__c = null ){
            CheckBankDataOfTheOpportunity(ssi,opp);
        }

   
private void CheckBankDataOfTheOpportunity(SelfSignIn__c ssi, Opportunity opp){
        opp.Agencia__c = ssi.Agencia__c;
        opp.Banco__c = ssi.Banco__c;
        opp.Conta__c = ssi.Conta__c;
    }

 
Hey guys, I need to use System.assert with the following condition: if the ContractChangeRequest__c object created is linked to the Test's ServiceContract. So the ServiceContract needs to look for the CCR to make this assert.
how to mention more than one field after a where and informally that they are different from null?  in my developer console I wrote as follows
ServiceContract scQuery = [SELECT BankId__c, Agencia__c, Conta__c, CNPJ__c, Digito_Conta__c,Tipo_de_Conta_Bancaria__c, Conta_Poupanca__c
                                   from ServiceContract where BankId__c != null, Agencia__c != null, Conta__c != null,CNPJ__c != null, Digito_Conta__c != null,Tipo_de_Conta_Bancaria__c != null  ];
        System.assert(scQuery != null , 'Bank account should be equals from Service Contract');
but the following errors are showing​​​​​​​

User-added image
Hey guys, I need some help, in my code line the following error appears: "System.QueryException: List has no rows for assignment to SObject." the line that the error refers to
ServiceContract scQuery = [SELECT BankId__c, Agencia__c, Conta__c, CNPJ__c, Digito_Conta__c,Type_de_Conta_Bancaria__c, Conta_Savings__c from ServiceContract limit 1 ];

how do i fix it?
Hey guys, I need to use the BankId__c field in the account object, but it is not available in the account object, but in the serviceContract, how do I solve this problem?
in the code below if I receive the Account Source with the value of SELF_SIGNIN and the value that I had defined in this field is that the type of Account source with this value SELF_SIGNIN has a null bankId and it has to receive the values ​​of contractChangeRequest.BankId from
if (account.AccountSource == AccountSource.SELF_SIGNIN.toString(){
            Account.BankId__c  =  contractChangeRequest.BankId__c;
             Database.update(newContractChangeRequest);

when I search for the bankId it does not appear
 
Hey guys, I need to do the following, check if the banco__c fields
 and digito_da_conta return null and if they do I have a method that updates this field directly from another object
if(opp.Conta__c = null && opp.Banco__c = null && opp.Agencia__c = null ){
            CheckBankDataOfTheOpportunity(ssi,opp);
        }

   
private void CheckBankDataOfTheOpportunity(SelfSignIn__c ssi, Opportunity opp){
        opp.Agencia__c = ssi.Agencia__c;
        opp.Banco__c = ssi.Banco__c;
        opp.Conta__c = ssi.Conta__c;
    }

 
Hey guys, I need to use the BankId__c field in the account object, but it is not available in the account object, but in the serviceContract, how do I solve this problem?
in the code below if I receive the Account Source with the value of SELF_SIGNIN and the value that I had defined in this field is that the type of Account source with this value SELF_SIGNIN has a null bankId and it has to receive the values ​​of contractChangeRequest.BankId from
if (account.AccountSource == AccountSource.SELF_SIGNIN.toString(){
            Account.BankId__c  =  contractChangeRequest.BankId__c;
             Database.update(newContractChangeRequest);

when I search for the bankId it does not appear