• Ankit Arora
  • ALL STAR
  • 8383 Points
  • Member since 2010
  • Senior Architect
  • Briskminds Software Solutions - PDO


Badges

  • Chatter
    Feed
  • 285
    Best Answers
  • 2
    Likes Received
  • 10
    Likes Given
  • 17
    Questions
  • 2055
    Replies
I have account Detail Page custom button and Content Source is visual force page in the Button Setup.
VF page is used to call a controller method to execute and create Record in ERP system using REST API.
<apex:page standardcontroller="Account" extensions="CreateCustomerController" action="{!createCustomer}">
</apex:page>
When user double clicks it is creating duplicate customer records in our ERP system.

How can I prevent this happening.? 
Can I disable the button after first click? 
If you have asome other solution I can try. I have seen some post like below but I am using VF page as content source so don't want use this.
https://developer.salesforce.com/forums/?id=906F000000093GUIAY


 
HI all, 

Trying to figure this VR but no luck. 

Need a VR Rule where it applies to all profiles except system admin, when the Opportunity ID record type =
012d0000000XJyv, and StageName = Conversion, with any values selected from picklist ADO Type = Grow, Mix, or Share, and need to make sure that number field ADO Actual is not blank. 

These parameters should prompt the user to enter data in the ADO Actual field.

 
AND( 
NOT($Profile.Name ="System Administrator"), 
OR( 
RecordType.ID = "012d0000000XJyv"), 
OR(
(ISPICKVAL(StageName, "Convert
(ISPICKVAL( ADO_Type__c , "Grow")),
ISPICKVAL( ADO_Type__c , "Mix"),
ISPICKVAL( ADO_Type__c , "Share")),
AND( 
NOT(ISBLANK(ADO_Actual__c)),
)

 
Hi All,

In one of our orgs we are able to access the 'list view buttons', Case detail page buttons etc.. from visualforce Home page component through jquery. As per 'winter 16' this privilage has been stopped from salesforce, when we try the same in our any other orgs the cross domain error is popping, this happens when we try to access the parent page buttons from Vf home page component. Could any one can explain what might be the reason for this or is there a special permission or provision from salesforce which is allowing this behavior, i couldn't makeout any help is highly appreciated

Thanks,
Harshavardhan
I've created a few action buttons to update the current record which works fine - but my main concern is trying to rename each action. I've asked a Saslesforce rep but they have no idea. If anyone out there can help me, that'd be great! 
how to display the account details into the map which is shown in vf page please help me?
sir/mam,   i wrote a after trigger code for :-  if the amount is greater than 50,000 then the opportunity record should be shared with another user, so i in program at query i took the user-id  where euals to ALIAS name.   this is working fine.   But problem is if write the query for LASTNAME instead of ALIAS name, then i am getting error,, please help.....
 
trigger afterinsertTrigger on Opportunity (after insert) {
list share=new list();
     user u=[select id from user where lastname='pogiri'];
    for(Opportunity op:Trigger.New){
        if(op.amount>50000){
            Opportunityshare s=new Opportunityshare();
            s.OpportunityId=op.id;
            s.OpportunityAccessLevel='Edit';
            s.RowCause='Manual';
            s.UserOrGroupId=u.id;
            share.add(s);
        }
    }
      insert share;
}


User-added image
 
Hi 
is used to represent the report in Piechart,is there any way to represent the report in Bar chart???
Batch and Schedule apex runs Sychorously or Asynchronously?
 
I am having a scenario where I need to map the Text value to picklist like below. Can some one guide me how to do it

On VF page Picklist values Enter Color radio button option a and radio button option B

 but if they want to enter any other color than this we give them input text to enter manually and we want to map that input text to this picklist in database. How can I do that?
Hi,

When ever a CaseMilestone is updated, I want to Insert/Update the Milestone data into a Custom Object.

As far as i know we cannot write a Trigger on CaseMilestone object.

Please suggest some solution to acheive this.

Thanks
Hi,
What’s the maximum batch size in a single trigger execution ?
Hi,

How can I check a particular field's dependencyin the org.

To ensure dependency I have tried to delete the field but it is not the foolproof solution as some dependecies, like reports etc., are not getting covered in that.

SO what is method by which I can garuntee that a metadata (especially a field) is used /have dependency in all other metadata?

Eg: A field XYZ is used in a class, VF page, validation rule, report etc.
So I need the list wherever this XYZ field is used.


Hope my query is clear, but do let me know if any further information is required.


Thanks,
Ritik


 
hi i have a task when we deactivating a user,the ownership of all the records owned by this user has to changed to his manager by using trigger.can any body please help for the code that need to be write for the trigger
Hi.
I'm using function getContent(), to get blob of PDF page.

There are cases where the PDF is empty (blank page), and it's fine. The question how can I detect it.

-I cannot inspect the blob ,as the characters have no meaning....
-In the controller of the PDFpage I have such indication, but I cannot access it in the caller process.

Any suggestions?

PageReference page = new PageReference('/apex/PDFpage...');
blob bodyAttach=page.getContent();
Hi all,

Clone is a standard button or Custom button.If it is custom button can any one provide me code behind the clone button for cloning particular records.

thanks
Hello,

I want to merge 3 visualforce tabs in to one.
One solution is use radio buttons and let user select which data it should display.

But is there any better solution which will look better graphically like having tabs