• mukesh gupta
  • SMARTIE
  • 515 Points
  • Member since 2015
  • 4X Salesforce Certified

  • Chatter
    Feed
  • 12
    Best Answers
  • 2
    Likes Received
  • 1
    Likes Given
  • 92
    Questions
  • 133
    Replies
Hi All,

Am very new to API.In my salesforce org, somebody implemented the API. I don't know whether its REST/SOAP.

Now I want to do some changes in that. Kindly let me know, where I to find the respective API details in my Org.

 

From VF Page:
<div style="float: left; width: 20%;">

<apex:outputField value="{!d.Company__c}" />

</div>

In the controller, if the Company__c is null, I want to set its value to '<div class="spacer" />' so that the div tag is rendered correctly on the page.  My output at the moment is literally <div class="spacer" />.

The goal is to have 5 static columns on the page but if one of the custom fields for the custom object is null, I just want a placeholder there in the HTML so that everything continues to line up correctly.

Hi,

How to access apex class method form process builder, I want to access apex class function by process builder but ,i am not able to access my class function.

Please suggest.

Thanks
Deepak 
Hi,

I am not aware about omni channel and where it's used.  Can you please benefit of this.


Thanks
Romash
Hi everybody,
I'm trying to render a VF Page which contains JavaScript to Generate a QR Code like so:
VF Page:
User-added image
But PDF after the renderAs is all messed up:
User-added image
Anyone knows how to render Javascript to PDF?
Hi

We have a visualforce section on all of our Opportortunity page layouts.
This section shows a particular image depending on what has been selected within the stage field.
Below is a sample of the code that we have in place.
Is it possible to split it up so that depending on which Opportunity Record Type is selected different images can be displayed against each stage?

For example if record type = X and the stage is Closed Won then show image A
If record type = Y and the Stage is closed Won then show image B

Thank you
 
<apex:page standardController="Opportunity" showHeader="true" sidebar="true">

<div align="center">

></apex:image> <apex:image id="won" value="{!$Resource.stageWon}" height="60" rendered="{!Opportunity.stageName = 'Closed Won'}"

 ></apex:image> <apex:image id="lost" value="{!$Resource.stageLost}" height="60" rendered="{!Opportunity.stageName = 'Closed Lost'}" 

</div>

</apex:page>

 
Hello,

I have following error:
System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out

My usecase:
I am calling a webservice in a future handler. 

Other workaround i tried:
I tried to call the webservice without a future handler, but as i am calling in trigger it is giving me error.

Can someone please tell me any workaroud ?

thank you
Hi all,

I'm using VisualForce for an intake survey. The first part of it is relatively easy. This is the code for First Name.

<apex:inputfield value="{!Contact.FirstName}" />

However, I can't find any guidance on how to ask a yes or no question in the intake. I would want to limit it to yes or no. Not allow anything else like "working on it" or "almost."

Anyone know of a possible answer?
Hi Expert,

I have a account with oppertunities. now  i want to add GrossTotal custom field in Account and all opertunity Amount will be add in Gross total.

Please suggest.

Regards
Romesh
  


 
Hello Friends,
I am new to visualforce development,
I want to create a visualforce form in which i want a picklist field and values for picklist will be : DOC, RAR, ZIP
and a TextArea Field in which we can give comment or description
and a Save Button which will save all data of the form to the Activity Object Inside Salesforce
I have picklist field 'Filetype' with values DOC, RAR, ZIP and a TextArea Field 'Description' on Activity Object

and please do not provide any link or reference, if possible, then help me with an example,

Any help would be greatly appreciated
Thanks in Advance
Hi Expert,

I want no convert this custom button into Lightning. Please suggest

User-added image 
Thanks
Mukesh
Hi, 

I am using window.load() in visualforce page, but in lightning readiness report , window.load() does not support in Lightning. Message is  below:- 

"JavaScript included in this page uses window. methods. Included JavaScript uses window. methods for navigation, which are not supported in Lightning Experience."

Can you please suggest , what substitute i can use instead of window.load() for Lightning;

Thanks
Mukesh
 
Hi Expert

I want to update Lead object field by child object of Lead, but i am not able to get relation.

Please suggesy
I am creating Lightning componant. but not able to save this componant.

User-added image

Thanks
Mukesh
Hi Expert,

I am using partner portal in salesforce. but i want to define the roles.  sothat 

1. CEO   --- see all manager records
2. Manager --- see all gm records
3. GM--- see self records

Please  suggest abuot this because partner have a seprate roles.

Thanks
 



 
Hi Expert,

I need to create a Label type field on opportunity page layout:
As per below image i need "Security 4" Label in stanard page layout.

 User-added image

Please confirm

Regard
Mukesh
Hello sir,


I have approx 56,000 members in subscriber list in campaign monitor and I want to send an email to all subscriber automatically.  Is there a way in campaign monitor to send email 300 member per day automatically?

means 300 member get email today and next 300 member will get email tomorrow and so on..



thanks.
Hi Epxert,

I have create a third party(.net) login page with username and password. user can login in salesforce by .net login page to salesforce by Existing user name and password. But i am not able to match password by SOQL in salesforce.

Please suggest.

Thanks
Mukesh 
hi Expert,

When i create a Notes in oppertunity then this notes will Rollup in Account object. but when i use same process in Enterprise edition then Oppertunity Related list notes not Rollup in Account object.

Can you please suggest about this process.

Thanks
Mukesh
Hi exprt, 

I have two datetime field d1(10/12/2017 : 10:40 pm)  and d2(10/12/2017 : 11:40 pm)  now i want to get 2 hours, so i am using business hours formula,
5day in week and 8 hours per day but get only 0.00 by use below formula

ROUND( 8 * ( ( 5 * FLOOR( ( DATEVALUE( First_Activity_Date_Time__c) - DATE( 1900, 1, 8) ) / 7) + MIN(5, MOD( DATEVALUE( First_Activity_Date_Time__c ) - DATE( 1900, 1, 8), 7) + MIN( 1, 24 / 8 * ( MOD( First_Activity_Date_Time__c - DATETIMEVALUE( '1900-01-08 16:00:00' ), 1 ) ) ) ) ) - ( 5 * FLOOR( ( DATEVALUE( Last_Assignment_Date__c ) - DATE( 1900, 1, 8) ) / 7) + MIN( 5, MOD( DATEVALUE( Last_Assignment_Date__c ) - DATE( 1996, 1, 1), 7 ) + MIN( 1, 24 / 8 * ( MOD( Last_Assignment_Date__c - DATETIMEVALUE( '1900-01-08 16:00:00' ), 1) ) ) ) ) ), 0 )
Hi Expert,

When i send Email from Case and add attachment,  this attachment show in only Email page related list in "Google Docs & Attachments". but not showing case related list "Google Docs & Attachments".

User-added image
User-added image
Please suggest, How to able to add email attachment in to the "Google Docs & Attachments" on case .

Thanks
​Mukesh

 
Hi Expert,

i have a one user with Role "Manager", Now this user(manager role) not able to edit "Contract object fields". Can you please suggest how this user will able to edit the contract object fields.

Thanks
Mukesh 



 
Hi Expert,

I have a more then one user in salesforce, i need a functionality sothat all account manager of company will able to see the oppertunity List view. Now when another user try to access opertunity then facing error.
"Insufficient Privileges Errors"

Please suggest.

Thanks
​Mukesh

 
Hi Expert,

I need to create custom webTab by apex code just Like Custom object, Can you please suggest how to achive this.

Thanks
mukesh
Hi Expert,

I have internal chatter for case object. but i dont want to email notification by chatter on case. How to disable chatter email notification.
User-added image
 
Hi Expert,

I need to logout salesforce by another website. Can you please confirm about this.

Many Thanks
Mueksh


 
Hi Expert,

I have a two object "Account" and "Project". both have a picklist. When i add new option in "Account" object picklist the "Project"  object picklist auto upate by "Account" object picklist. For Example 

Object(Account)                    Object(Project)

Picklist(State)                       Picklist(State)
                                          
option A, B ,C                       option A,B,C

Means when i delete 'A' from  project object picklist then  Account Object will have only "B, C" now "A" will delete, Same apply if i delete Account object picklist.

Please suggest about any process.

Thanksa
Mukesh 



 
Hi exprt, 

I have a standard plicklist name is  status on case object. Now i want to use same picklist on customer portal, but only few status picklist option not all. Means in salesforce csae status plicklist have 4 option, but in customer portal same picklist will have only 2 options

Please suggest 
Hi Expert,

I have a Status picklist on Case object with 4 options in salesforce, but now i need same Status picklist display only 2 option on customer portal.

Please give any idea.

Thanks
Mukesh 
 
Hi exprt 

Any chatter seething, so that clients should not see the chatter. 

Please suggest 
Hi Expert,

I want to create some demo on marketing cloud  journey builder. Can any one share about how to acces journey builder in markeing cloud.

Thanks
Mukesh
Hi Expert,

I need to create an application for me to send SMS directly from Salesforce. Please suggest.

User-added image
Hi Expert,

I am using a test class for coverage 75% code, but few things are not covered. Can any one suggest what is going wrong.

this my test Class: --
@isTest
public class TestProfessorSelectCourse {
    @isTest static void ProfessorCourse(){
       
        
        Professor__c prof = new Professor__c(Name ='JP',Email__c='jp@gmail.com');
        insert prof;
        
        Class__c cls = new Class__c(name='12G', Class_Teacher__c = prof.id);
        insert cls;
        
        Course__c cors = new Course__c(Professor__c=prof.id,Class__c =cls.id, name='Ruby', Start_Date__c= Date.today() , End_date__c= Date.newInstance(2017,03,20));
       	//Professor__c prof = new Professor__c(Name ='JP');
        //cors.Professor__c = prof.Name;
        insert cors;
    }
}

and below is my main class


User-added image

Thanks 
Mukesh
I only get sales and service cloud options and so am missing certain features/options when I follow the NPSP trailhead. How do enable it in my playground please?
Dears,

Can Anyone give me a good solution !!

Example:- 

Person A and Person B Working in Same company , Person A Will not continue his job hereafter. Suddenly he leaves his job without give any information. So Person B need to handle him record as well. How it's Possible ???

1. Person A Using Different Profile .

2. Person A Records OWD is Private.

3. How person B can access that records ???


Thanks In Advance !

Regards,
Soundar P
Hi Expert

I want to update Lead object field by child object of Lead, but i am not able to get relation.

Please suggesy
I am creating Lightning componant. but not able to save this componant.

User-added image

Thanks
Mukesh
Hi Expert,

I need to create a Label type field on opportunity page layout:
As per below image i need "Security 4" Label in stanard page layout.

 User-added image

Please confirm

Regard
Mukesh
Hi All,

Am very new to API.In my salesforce org, somebody implemented the API. I don't know whether its REST/SOAP.

Now I want to do some changes in that. Kindly let me know, where I to find the respective API details in my Org.

 
global class batch_example implements Database.Batchable<sobject> {
    global Database.QueryLocator start (Database.BatchableContext bc){
       return Database.getQueryLocator('select id,closeDate,StageName from Opportunity where StageName!=:closed Won'); 
    } 
    global void execute(Database.BatchableContext bc,list<opportunity>scope){
        for(opportunity op:scope){
            op.closeDate=system.today();
        }
        update scope;
    }
    global void finish (Database.batchableContext bc){
        Messaging.SingleEmailMessage email1=new Messaging.SingleEmailMessage();
        string[]toadd=new string[]{'ora0423.nallisetti@gmail.com'};
            email1.setToAddresses(toadd);
        email1.setSubject('batch completion Alert');
        email1.setplainTextBody('Batch job'+bc.getJobId()+ 'is processed successfully');
        Messaging.Email[]emails=new Messaging.Email[]{email1} ;
          Messaging.sendEmail(emails);
    
    }
}
Hi All,

Urgent help Needed!!
I need your help since i am new to salesforce.

Actually the issue is that i have written one trigger to validate the duplicate record creation for a perticular object but it is throwing the validation even when you are trying to edit the existing record.

Kindly sugest me the solution or please guide me if it is a valid scenario.

The trigger which i have written is
trigger duplicat on Ticket__c(before insert,before update)
 {
    list<string> cust = new list<string>();
    list<string> usernme =new list<string>();
    list<string> email= new list<string>();

for(Ticket__c a:Trigger.new)
    {
    cust.add(a.Customer);
   usernme.add(a.username);
    email.add(a.email-id);

    }

List<Work_Order_Rate__c> WOR =  List<Ticket__c> tickt1 =[select User_Name__c,Customer__c,Start_Date__c, End_Date__c from Ticket__c where User_Name__c=:usernme and Customer__c=:a.cust];

if(WOR.size()>0)   
for(Ticket__c a:Trigger.new)
        {
        for(Ticket__c b:WOR )
               {                
                 if(b.Start_Date__c  tickt1.Start_Date__c || b.Start_Date__c <=tickt1 .End_Date__c ||
                b.End_Date__c >=tickt1 .Start_Date__c || b.End_Date__c <=tickt1 .End_Date__c )

                a.adderror('You cannot create a duplicate Ticket.');
                }
        }
}

Regards,
Rohan

From VF Page:
<div style="float: left; width: 20%;">

<apex:outputField value="{!d.Company__c}" />

</div>

In the controller, if the Company__c is null, I want to set its value to '<div class="spacer" />' so that the div tag is rendered correctly on the page.  My output at the moment is literally <div class="spacer" />.

The goal is to have 5 static columns on the page but if one of the custom fields for the custom object is null, I just want a placeholder there in the HTML so that everything continues to line up correctly.

Hi,

How to access apex class method form process builder, I want to access apex class function by process builder but ,i am not able to access my class function.

Please suggest.

Thanks
Deepak 
Hi,

I am not aware about omni channel and where it's used.  Can you please benefit of this.


Thanks
Romash
Can you please provide some code
Hi,

Document says:
Methods defined with the @testSetup annotation are used for creating common test records that are available for all test methods in the class.

I am confused that the class means all test classes in org or only the test class which contains @testSetup if I run all test classes.

I didn't find the details.
Anyone can explain this to me?

Thanks.
Ying
please help me...
i have an one profile xyz that have an multiple users.xyz profile has full access permission.
my question is to restrict only one user to delete permission on that profile.
can i use trigger?then reply me code pls....

thanks.
select id,name,(select FirstName,LastName from Contacts) from Account.

this query will give the Account, along with corresponindg contacts. I want to disply the particular Contact along with Account in VF please, could anyone please help.
And I want to disply the Account which has the contacts only..some account have dont have contact associated with them. How to achieve this.. could anyone please guide me
Convert a Lead to an Opportunity using triger
Hi guys given two fields on the lead object:
FieldA__c
FieldB__c
 
I need to write a trigger to convert from Lead to opportunity every time a user fill out those two fields. Can anyone help me with the trigger?
 
Thanks in advance!