• Brian Barrett 5
  • NEWBIE
  • 5 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
I have a requirement to use JavaScript to access opportunities over REST API. This will be done from an in house web-based application that only allows for custom code to be in JS. I am trying to authenticate with Oauth2

I have successfully been able to send the initial login request for a authorization code. i can take that out of the url and use it to attempt to authorize for an access token. I have tried two approaches

1) I made a hidden form to submit all required information as POST data, i successfully authenticate, however i land on a XML page that has the token and nothing else. it doesn't seem to redirect to my site, just open the xml page

2) I have tried to send an AJAX request, but I get pre-flight errors since it's trying to redirect my page

What do i need to do to receive the response in JavaScript? I'm assuming this is possible and that i do not need to use server side scripting.

thank you for your time and help,
-Brian
Hi Guys,

I have this code part:

IF( ISBLANK(Credit_Score_by_Exception__c),

IF(Pellenc_credit_score_FA__c =="1"  ,"50% downpayment for order confirmation payable at 5 days net, 50% for production completion payable at 5 days net",
IF(Pellenc_credit_score_FA__c =="2", "40% downpayment for order confirmation payable at 5 days net, 30 % for production completion payable at 5 days net, 20% for shipping payable at 30 days net, 10% for start-up payable at 30 days net",
IF(Pellenc_credit_score_FA__c =="3", "30% downpayment for order confirmation payable at 5 days net, 30% for production completion payable at 5 days net, 20 % for shipping payable at 30 days net, 10%, for start-up payable at 30 days net, 10% for final reception payable at 30 days net",
IF(Pellenc_credit_score_FA__c =="4", "30% downpayment for order confirmation payable at 5 days net, 10% for shipping payable at 30 days net, 30% for delivery payable at 30 days net, 20% for commissioning payable at 30 days net, 10% for final reception payable at 30 days net ", IF(Pellenc_credit_score_FA__c =="5", "20% Downpayment for order confirmation payable at 5 days net, 30 % for delivery payable at 30 days net, 40% for commissioning payable at 30 days net, 10 % for final reception payable at 30 days net", "NULL" ))))))

And its keep telling me "Error: Incorrect number of parameters for function 'IF()'. Expected 3, received 2"

Can you please help me ?

Thanks !
I have a requirement to use JavaScript to access opportunities over REST API. This will be done from an in house web-based application that only allows for custom code to be in JS. I am trying to authenticate with Oauth2

I have successfully been able to send the initial login request for a authorization code. i can take that out of the url and use it to attempt to authorize for an access token. I have tried two approaches

1) I made a hidden form to submit all required information as POST data, i successfully authenticate, however i land on a XML page that has the token and nothing else. it doesn't seem to redirect to my site, just open the xml page

2) I have tried to send an AJAX request, but I get pre-flight errors since it's trying to redirect my page

What do i need to do to receive the response in JavaScript? I'm assuming this is possible and that i do not need to use server side scripting.

thank you for your time and help,
-Brian