• Ankit Gupta SFDCLearner
  • NEWBIE
  • 10 Points
  • Member since 2017
  • SFDC Learner

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 23
    Replies
Below is an error which I am getting while testing my rest api on workbench
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.
Just want to fetch no of parents records who have no child records, I need it's SOQL. Below soql is running for standard object SELECT Id, Name FROM Account WHERE Id NOT IN (SELECT AccountId FROM Opportunity)

I need it for custom object. Please try to solve.
I have a object "xyz", and a user "U1", and a profile "p1".
xyz have all acess for user "U1" like to create/Edit/Delete/Viewall.
But user can't edit a record. why....
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
Get records from global picklist and display in a vf page using wrapper class
Cause or when "Apex CPU time limit exceeded" occured
Hello Friends, 
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.


User-added image
Hello Friends, I am learning SFDC by developer forum.
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.

User-added image
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.
Hello Friends, I am a SFDC Learner, I have a requirnment to save records in sObject Name student__c
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:
This is a sample VF Page
Thanks a lot

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

Why roll up summary is for master details fields not for lookup fields?
When to use chainset for deployment and when to use manage package for deployment?
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.

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

Hello,

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.
Get records from global picklist and display in a vf page using wrapper class
Hello Friends, 
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.


User-added image
Hello Friends, I am learning SFDC by developer forum.
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.

User-added image
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.

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

Why roll up summary is for master details fields not for lookup fields?
Hi,

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
Hi All,

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

 
  • July 11, 2016
  • Like
  • 0
Hi,
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!
Hi all.

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.
Hi All,

I am new to Salesforce Lightning.Can anyone give me an example of Carousel implementation through Salesforce lightning ? 
I was gong through the Apex code and found out a code line;

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
  • August 12, 2015
  • Like
  • 0
I'm learning Apex programming. WHile going through the guides I found this code. I'm confused that 'account' being a Final variable, how come it was successfully used in the update statement in the save() method?

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();
    }
}

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
 

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

please tell me about Encrypted Fields in brief? thanks in advanced.?

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

  • January 10, 2012
  • Like
  • 0

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