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

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 18
    Replies
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

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?
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.
Hello,

What iss the use of custom settings in Salsforce, mainly with triggers and apex class

thanks for suggestions !
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'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();
    }
}
We have two standard objects  account(parent) and contact (child ). i want to write a trigger to populate the lastname field of contact with the name field of account
//the trigger below performs the same task but soql query is from child to parent .

i want the trigger which performs the same work but using soql query ( relationship query )   from parent to child .

 trigger trgSetLastName on Contact (after insert) {
    List<Contact> lstConUpdate = new List<Contact>();
    List<Contact> lstContact = [select id,Account.Name from Contact where id in: trigger.newmap.keyset()];
    for(Contact con: lstContact){
        con.LastName = con.Account.Name;
        lstConUpdate.add(con);
    }
    if(lstConUpdate.size() > 0){
        update lstConUpdate;
    }
}

i want a trigger for this .help

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.?

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