• Naresh Altokk
  • NEWBIE
  • 35 Points
  • Member since 2021

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 6
    Replies
Hi! 
I'm trying to implement the REST callout of this superbadge, but I'm receiving the error 400 "Bad Request. Your JSON does not contain the correct case-sensitive keys. Please reference the sample JSON."
I've already checked each of the keys case, even copied the exact same sample from trailhead, but this message keeps coming. Does anyone have a clue of what could be the problem here?

Here's what I'm trying: (the same behavior happens on both Apex/Postman)


Request/Response:
User-added image

Headers:
User-added image

Auth:User-added image

Thank you!
// Create the case record sObject 
Case acct = new Case(type='Sample'                
RecordTypeID='0122o000000tZzcAAE'
origin='Web',
optinemail__c=TRUE,
optinperson__c=TRUE,
webcountry__c='GB',
description='test David ',
websiteorigin__c='service.nl');
// Insert the account by using DML
insert acct;
// Get the new ID on the inserted sObject argument
ID acctID = acct.Id;
// Display this ID in the debug log
System.debug('ID = ' + acctID);
All, I would like to create 1 case record using a DML statement, but I keep getting errors, can you see what is wrong with my code?

Some of the fields are picklist fields and some are boolean, maybe this is the issue.

There is also a standard field 'type' but when I add it too the code, the text is always purple.

Error is line 2 unexpected token 'acct'
 
HI,
I am new to Salesforce Devlopment and would appricate your help.

I have two custom objects, 
1. Commission line
2. Commission rate

commission rate object captures,
cateogory, commission rate, startdate, enddate.

I would like to populate "Rate" field in "commission line" object, based on the "category" field value in "Commission line" object.

for e.g. when Commission_line.Category =  hardware AND Commission_line.CloseDate field = 04/15/21

Comission rate object
CategoryRatesStart periodEnd period
hardware2.51/1/202112/31/2021
Software41/1/202112/31/2021
SMA31/1/202112/31/2021
hardware2.51/1/202212/31/2022

based on "Commission_line.Category"  and "Commission_line.closedate", I want to poulate the Commission_line.rate from the Rate value form the Commmission rate object. 
in this case, rate =  2.5. category falls within the date range
 
 
Hi! 
I'm trying to implement the REST callout of this superbadge, but I'm receiving the error 400 "Bad Request. Your JSON does not contain the correct case-sensitive keys. Please reference the sample JSON."
I've already checked each of the keys case, even copied the exact same sample from trailhead, but this message keeps coming. Does anyone have a clue of what could be the problem here?

Here's what I'm trying: (the same behavior happens on both Apex/Postman)


Request/Response:
User-added image

Headers:
User-added image

Auth:User-added image

Thank you!
Hi,
I want query some account and assign it into map but it show the Illigle assignment from list to map?
here is code > Map<id,account> accountMap=[select id,name from Account limit 10000];
I have created lightning component and 6 fields there, one date field is also there
how can we do that if age is more than 18 years then 2 fields shoud be hide.
Can please someone help me on that...

Thanks in advance
Hi,

I want to create a Task after saving a customer Object.
In my Customer Object I give a User FIeld: Editor.
I try with this Code

Code:
task.WhatId = Object.id;
task.WhoId = Object.Editor__c;
task.Subject = 'Other';
task.priority= Object.Priority__c;
task.status = 'Not Started';
task.description = 'New  Work';
insert task;

 And I become this failure:

Attempt to de-reference a null object

Do you have an Idea to help me?

Thx

Magda




Message Edited by magda on 02-13-2008 12:32 AM
  • February 08, 2008
  • Like
  • 0