• Pascal Le Clech
  • NEWBIE
  • 114 Points
  • Member since 2018
  • Master
  • Veganie

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 6
    Replies
Hello All,
I am getting above error, I have written a code in javascript button in Account, my query is not returning anything, I have a if condition like if it is null then do something else do something else. but it is not working properly and getting error. how to handle it. Thanks
 
var Acc = sforce.connection.qwery(select Id,name ,website, Industry from Account where website = 'www.test.com' );
var websiteVal = Acc.getArray("records").[0].website;

if(websiteVal.length >=1){
   // code
}

else{
  // code
}



 
  • August 27, 2018
  • Like
  • 0
    public static String getId(String Id){
        return [SELECT HCP_Affiliation__c.Id FROM HCP_Affiliation__c WHERE HCP_Affiliation__c.Patient__c =:Id LIMIT 1];
   
I am getting error msg with the above statement saying "illegal conversion from List to String " ... I am limiting to one record ..not sure what the issue is.
  • August 27, 2018
  • Like
  • 0
Currently I open develop window and go to debug and open execute anonymous window and I enter 

"Id batchJobId = Database.executeBatch(new BatchClass_Retrieve_Inventory_BL(), 1);"

I would like to create a button for this so I can let other people run it as well or schedule it to run once or twice per day. 

Any help would be greatly appreciated. 
I have followed the instructions for creating a sfdx project locally and converted all of my metadata to the sfdx format. Now I want to push my local meta data to my scratch org but I receive a huge list of errors. Most of them are that the objects are different and items don't exist, which I know because it's the first time I want to push my local version to the scratch org so my scratch org matches my production/sandbox metadata.Has anyone had this problem and have any advice to how to deploy my local set of metadata to a scratch org? I tried to use the --forceoverwrite parameter on sfdx push, but I still receive a LOT of errors such as invalid type, field does not exist, etc. I would think this command would overwrite what is on the scratch org with what I am pushing to it. Thanks for any advice
I have a lightning component that implements lightning:actionOverride how do I get the recordId of the parent when the action is triggered from a related list?