• Pedro Garcia 32
  • NEWBIE
  • 10 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies
Hi...

As an Administrator, I want to access the REST resource once I submit the serial key.

The administrator (any user with permission) submits the serial key (config__c custom object), before storing it in the database I want to confirm that the serial key is OK and show the response from the callout.

How could I make a callout before saving the serial key record? If this is not possible, what other workflow do you recommend for this business model?

Thanks
 
Hi... I got an error when I try to create a Scratch org;

 sfdx force:org:create -f config\project-scratch-def.json --setalias sdev07 --durationdays 7 --setdefaultusername --json --loglevel fatal

error: location is not defined

I can open any other sandbox and DEV HUB.

I appreciate your help

Thanks,
Pedro
Hi,

I'm creating a Unit Test for a method that calls to another callout method.

I got the following error: Methods defined as TestMethod do not support Web service callouts

I've already created the Unit Test for the callout method and everything works OK.

How could I do it?

cass a{

public mycalloutmethod(url){ return Response.body}

public mymethodfortesting(){
String a = mycalloutmethod('myurl');
do something else
}
}

Thanks,
Pedro

 
Hi... I got an error when I try to create a Scratch org;

 sfdx force:org:create -f config\project-scratch-def.json --setalias sdev07 --durationdays 7 --setdefaultusername --json --loglevel fatal

error: location is not defined

I can open any other sandbox and DEV HUB.

I appreciate your help

Thanks,
Pedro
Hi... I got an error when I try to create a Scratch org;

 sfdx force:org:create -f config\project-scratch-def.json --setalias sdev07 --durationdays 7 --setdefaultusername --json --loglevel fatal

error: location is not defined

I can open any other sandbox and DEV HUB.

I appreciate your help

Thanks,
Pedro
Hi,

I'm creating a Unit Test for a method that calls to another callout method.

I got the following error: Methods defined as TestMethod do not support Web service callouts

I've already created the Unit Test for the callout method and everything works OK.

How could I do it?

cass a{

public mycalloutmethod(url){ return Response.body}

public mymethodfortesting(){
String a = mycalloutmethod('myurl');
do something else
}
}

Thanks,
Pedro