- Ankit Gupta SFDCLearner
- NEWBIE
- 10 Points
- Member since 2017
- SFDC Learner
-
ChatterFeed
-
0Best Answers
-
1Likes Received
-
0Likes Given
-
15Questions
-
23Replies
Raw Response HTTP/1.1 404 Not Found
Error:
Raw Response
HTTP/1.1 404 Not Found
Below is my rest class.
/* selflearning is a namespace of my org*/
@RestResource(urlMapping='/selflearning__/accessPobject/*')
global class restServicePObj
{
@HttpGet
global Static List<selflearning__Pobject__c> getPobjectDetails()
{
return[select id,Name from selflearning__Pobject__c];
}
}
Please help me/guide me how I can do this in a right way.
- Ankit Gupta SFDCLearner
- July 19, 2020
- Like
- 0
- Continue reading or reply
SOQL not working for custom object
I need it for custom object. Please try to solve.
- Ankit Gupta SFDCLearner
- May 10, 2019
- Like
- 0
- Continue reading or reply
object have all permission
xyz have all acess for user "U1" like to create/Edit/Delete/Viewall.
But user can't edit a record. why....
- Ankit Gupta SFDCLearner
- April 05, 2019
- Like
- 0
- Continue reading or reply
I add a new values in a picklist (Industry standard filed) of a Lead object, now want to deploy it via change set. Any Idea
- Ankit Gupta SFDCLearner
- June 26, 2018
- Like
- 0
- Continue reading or reply
Get records from global picklist and display in a vf page using wrapper class
- Ankit Gupta SFDCLearner
- June 20, 2018
- Like
- 0
- Continue reading or reply
Cause or when "Apex CPU time limit exceeded" occured
- Ankit Gupta SFDCLearner
- June 06, 2018
- Like
- 0
- Continue reading or reply
withsharing and without sharing
I have 3 Classes in attached Image
a) abc() Normal,
b) Efg() is with sharing
c) xyz() is without sharing
What happened if we are calling other class methods in any class, will all methods run in the calling class mode or it will run accordingly to it’s own class behavior.
- Ankit Gupta SFDCLearner
- May 29, 2018
- Like
- 0
- Continue reading or reply
Queston related to Role and Profile
I have a query regards Roles and Profiles.
Case1:
Suppose we have a LogedIn User "U1", having a profile "P1" and one custom sObject "obj__c"
* U1 haven't a Role. (No role is assigned to User U1)
* P1 have the permissions of Create, Delete, Edit and View for sObject obj__c
* OWD Settings for "obj__c" is Private with Unchecked Grant Access CheckBox.
So for above case only user U1 will be able to view the records. Yes / No
Case 2: For this case please see the attached Image first.
so, now system administrator assign a Role "Associate" to a user U1, and assigned Role Associate have all Roles in a Hirarchey. And Hopefully all assigned role's user have a different profile. User U1 have old Profile with same permissions, and OWD settings are Public Read Only now.
So in this case who will be able to view the records after creation by user U1, Will any one will be able to edit the records or not.
- Ankit Gupta SFDCLearner
- May 28, 2018
- Like
- 0
- Continue reading or reply
Question regards Save records in a sObject
My VF page looks like attached image, I have to write the login on a class, so End user can save records when he or she clicks on a Save Button. All Fields are in custom sObject (student__c).
Please post the class code here, Please do it with Wrapper class, so I can also learn a functionility of a wraper class.
Attachment of a sample VF Page:
Thanks a lot
- Ankit Gupta SFDCLearner
- May 28, 2018
- Like
- 0
- Continue reading or reply
Share profile to multiple users with different permitions
My Question is this
I have a sObject name "object1", having one profile name "profile1" which have all permitionss (create, edit, delete, view, viewAll, modifyAll) for sObject (object1), now I assigned that profile to User1, user2. Now I wants to assign same profile (profile1) to user3, but the condition is this user3 only have a create permition, how would I achive this. I know by permition set we can add new permitions but we can not degrade permitions.
Please reply
- Ankit Gupta SFDCLearner
- May 24, 2018
- Like
- 1
- Continue reading or reply
Why roll up summary is for master details fields not for lookup fields?
- Ankit Gupta SFDCLearner
- May 19, 2018
- Like
- 0
- Continue reading or reply
When to use chainset for deployment and when to use manage package for deployment?
- Ankit Gupta SFDCLearner
- May 19, 2018
- Like
- 0
- Continue reading or reply
Any one please elaborate, how we can run a trigger according to a user. I heard it from some friends, that we can call trigger in respect to users with the help of Custom settings, could any one will give an example in Simple | Understandable language.
- Ankit Gupta SFDCLearner
- February 16, 2018
- Like
- 0
- Continue reading or reply
Share profile to multiple users with different permitions
My Question is this
I have a sObject name "object1", having one profile name "profile1" which have all permitionss (create, edit, delete, view, viewAll, modifyAll) for sObject (object1), now I assigned that profile to User1, user2. Now I wants to assign same profile (profile1) to user3, but the condition is this user3 only have a create permition, how would I achive this. I know by permition set we can add new permitions but we can not degrade permitions.
Please reply
- Ankit Gupta SFDCLearner
- May 24, 2018
- Like
- 1
- Continue reading or reply
Dynamic SOQL query with IN clause
I am passing List<String> (it contains list of ids) to my dynamic SOQL query from the apex code and I am getting query in debug log as,
SELECT Id, Colour__c, Show_Hide_in_Table__c, OwnerId, Owner.UserRoleId, Owner.Name, StageName, Status__c, LastActivityDate, CreatedDate FROM Opportunity WHERE Id IN ('0065w000025xUyVAAU', '0065w000025xUyZAAU', '0065w000025xUx7AAE', '0065w000025xUw9AAE', '0065w000025xUy5AAE', '0065w000025xUykAAE', '0065w000025xUuLAAU', '0065w000025xUyQAAU', '0065w000025xUvcAAE', '0065w000025xUKfAAM', ...) AND Show_Hide_in_Table__c = 'Show' ORDER BY StageName
So my question is that,
1) What is that ... (three dots) at the end of ids?
Note: I did not add that ... from my apex code
2) Is it necessary to pass : (Colon) when used IN clause in dynamic soql?
Thanx in advance.
- Nikita Yadav 17
- June 16, 2021
- Like
- 0
- Continue reading or reply
- Manogna Kovi
- August 28, 2018
- Like
- 0
- Continue reading or reply
Get records from global picklist and display in a vf page using wrapper class
- Ankit Gupta SFDCLearner
- June 20, 2018
- Like
- 0
- Continue reading or reply
withsharing and without sharing
I have 3 Classes in attached Image
a) abc() Normal,
b) Efg() is with sharing
c) xyz() is without sharing
What happened if we are calling other class methods in any class, will all methods run in the calling class mode or it will run accordingly to it’s own class behavior.
- Ankit Gupta SFDCLearner
- May 29, 2018
- Like
- 0
- Continue reading or reply
Queston related to Role and Profile
I have a query regards Roles and Profiles.
Case1:
Suppose we have a LogedIn User "U1", having a profile "P1" and one custom sObject "obj__c"
* U1 haven't a Role. (No role is assigned to User U1)
* P1 have the permissions of Create, Delete, Edit and View for sObject obj__c
* OWD Settings for "obj__c" is Private with Unchecked Grant Access CheckBox.
So for above case only user U1 will be able to view the records. Yes / No
Case 2: For this case please see the attached Image first.
so, now system administrator assign a Role "Associate" to a user U1, and assigned Role Associate have all Roles in a Hirarchey. And Hopefully all assigned role's user have a different profile. User U1 have old Profile with same permissions, and OWD settings are Public Read Only now.
So in this case who will be able to view the records after creation by user U1, Will any one will be able to edit the records or not.
- Ankit Gupta SFDCLearner
- May 28, 2018
- Like
- 0
- Continue reading or reply
Share profile to multiple users with different permitions
My Question is this
I have a sObject name "object1", having one profile name "profile1" which have all permitionss (create, edit, delete, view, viewAll, modifyAll) for sObject (object1), now I assigned that profile to User1, user2. Now I wants to assign same profile (profile1) to user3, but the condition is this user3 only have a create permition, how would I achive this. I know by permition set we can add new permitions but we can not degrade permitions.
Please reply
- Ankit Gupta SFDCLearner
- May 24, 2018
- Like
- 1
- Continue reading or reply
Why roll up summary is for master details fields not for lookup fields?
- Ankit Gupta SFDCLearner
- May 19, 2018
- Like
- 0
- Continue reading or reply
related contacts in pageblocktable for selected account
I'm new salesforce and i have Requirement like...
I have all Account Names in Dropdown(using Apex:selectList i have done this), if select any of the Account Name from the Dropdown and after clicking on commandButton ,i need to Display all related contacts for the particular Account in pageBlockTable.Do i need to write inner Class for this? if yes please give me some sample code to achieve this.
Thanks in Advance
shan
- shan jakkula
- October 24, 2016
- Like
- 0
- Continue reading or reply
how to get standard date picker custom VF ?
In custom VF page have to display date fields with date picker, how can i write code for this ?
there is no standard controller, on custom controller is there for page.
Thanks
- Royal
- July 11, 2016
- Like
- 0
- Continue reading or reply
SOQL error on enabling namespace
I have enabled namespace in my dev org. Namespace name - LightningMyth.
When I write the following query in any class/trigger, I get the error : : Illegal assignment from List<Account> to List<LightningMyth.Account>
List<Account> acc=[SELECT ID FROM ACCOUNT limit 1];
but the same query works fine in workbench and QueryEditor.
When I changed the query to List<LightningMyth.Account> acc=[select id from LightningMyth.Account limit 1];
I get this error - Compile Error: First SObject of the FROM statement must be a valid SObject type.
I get this issue after enabling namespace and this issue is only with Account object, the SOQL with other standard and custom objects works just fine.
Any help is appreciated!
- Mythili
- June 21, 2016
- Like
- 0
- Continue reading or reply
String to DateTime conversion ?
i am getting the time formate as "2016-03-03T01:09:36.933" from external system, its EST time.
i need to convert as local time.
ex: MM/DD/YYYY HH:MM
note time should be exactly shown in the formate no changes like Zeros should come.
Thanks in Advance.
- karthikeya 2
- March 04, 2016
- Like
- 0
- Continue reading or reply
Carousel Implementation through Salesforce Lightining
I am new to Salesforce Lightning.Can anyone give me an example of Carousel implementation through Salesforce lightning ?
- Nitin kumar 64
- January 11, 2016
- Like
- 0
- Continue reading or reply
Map<ID, List<Contacts>> what is the rationale of using list in maps?
Map<ID, List<Contacts>> mapCntList1 = new Map<ID, List<Contacts>>();
I was wondering this statement could have been written like this also;
Map<ID, Contacts> mapCntList2 = new Map<ID, Contacts>();
If the list declaration in "mapCntList1" is correct, can anyone tell when this should be used and when "mapCntList2" should be used?
Thanks
- #DD
- August 12, 2015
- Like
- 0
- Continue reading or reply
Final keyword usage
public class MyCustomController {
private final Account account;
public MyCustomController() {
account = [SELECT Id, Name, Site FROM Account
WHERE Id = :ApexPages.currentPage().getParameters().get('id')];
}
public Account getAccount() {
return account;
}
public PageReference save() {
update account;
return (new ApexPages.StandardController(account)).view();
}
}
- shankar anand
- June 16, 2015
- Like
- 0
- Continue reading or reply
More than one @HttpGet and/or @HttpPost per class
I'd like to set up an API for an Enterprise Integration Service consisting of many Get and Post methods.
It would be nice if I could put them all in one class. Is there anyone to put multiple @HttpGet and @HttpPost in the same class and have the last part of the path be different for each?
Otherwise, I'd need to define a class for each method.
The only other alternative would be to have just one get/post and have the input define what operation to perform and have the get post method act as a dispatcher to call the proper inner method. I'd rather not do it that way.
-Ken
- Ken Koellner
- January 13, 2014
- Like
- 1
- Continue reading or reply
SOQL: How to find parent records with no associated child?
Is there a way to get a list of Account records (parent) with no child records associated (Opportunity) via SOQL?
I am trying to avoid doinf this in Apex, like getting the AccountId values from Opportunity and then query accounts where id not in this list.
Is it possible to get this list through SQOL?
Here is my query (I need only the accounts that have no associated Opportunity records):
SELECT a.Id, a.Name, (Select id from Opportunities) from Account a order by a.Name
Thanks,
Rodrigo
- rodrigor
- June 27, 2013
- Like
- 0
- Continue reading or reply
- Gourav Jain
- July 06, 2012
- Like
- 0
- Continue reading or reply
404 Apex REST
Hello,
I'm working with calling APEX REST classes outside of salesforce. 2 month ago I got APEX REST class with long logic which worked perfectly, I called that logic by python script with authorizarion (oAuth 2.0). And now it doesn't work, even when I'm trying to call simple APEX REST like:
@RestResource(urlMapping = '/test_yury/*')
global with sharing class SAP_BOMclass_Yury_test {
@HttpGet
global static string BOMtest(RestRequest req, RestResponse res)
{
return 'hello there';
}
@HttpPost
global static string BOMtest1(RestRequest req, RestResponse res)
{
return 'hello there';
}
}
I'm calling it by url https://<instance>.salesforce.com/services/apexrest/test_yury with headers 'Authorization' : 'OAuth '+<access_token>(https://<instance>.salesforce.com/services/apexrest/test_yury ws implemented in Remote Access tab).
Also tryed HTTP POST/GET at https://apigee.com , which I saw salesforce used it in some webinar..
But still I'm getting 404 error :
HTTP/1.1 404 Not Found
Date: Mon, 09 Jan 2012 09:44:22 GMT Content-Length: 98 Content-Type: application/json; charset=UTF-8 Connection: close Server: [ { "message": "Could not find a match for URL /test_yury","errorCode": "NOT_FOUND} ]
Any ideas why this error started poping up?
Thanks
- Yury.K
- January 10, 2012
- Like
- 0
- Continue reading or reply
SOQL to find Accounts with no contacts
I'd like to run a query to find all Accounts without Contacts. I'm not sure how to form the SOQL query to acheive that.
Can anyone make any suggestions?
TIA
- benwrigley
- June 27, 2009
- Like
- 0
- Continue reading or reply