• Varun Pareek
  • NEWBIE
  • 210 Points
  • Member since 2012

  • Chatter
    Feed
  • 7
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 50
    Replies
I am working on a requirement to automate portal user creation based on user requests and sync it to downstream system real time. I have a problem creating contact and user in Same transaction due to setup non setup object. I cannot create user in a future method since I need to display the status of user creation on vf page for user. Appreciate if anyone has a workaround for this issue
I want to create visualforce template to approve/reject record when a record is submitted for approval. Approval manager travels and he wants an external link to approve rather than going into salesforce so i created text template and used {!ApprovalRequest.External_URL} but this merge field doesn't works and confirmed that it's salesforce bug so is it possible to create an visualforce template with comments box and approve/reject button?
Does anyone has idea about phone system integration with Salesforce? 
Please give me some insights into this.

Thank you.
Hi, 
I am pretty new to Salesforce development and for that matter development in general.  Can somebody help the rookie out?  I have a child object of the system object opportunity.  it is revenueProjection__c.  I want to create a page where the revenue projection can be easily edited by the sales folks.  I am trying to use the __r notation to traverse to the child relationship but no matter how i try it it doesn't work.  In reading all of the documentation i can find on the subject it seems like i am doing it correctly.  Of course it always does :)  Here is my code what am i doing wrong? 
 
<apex:page Standardcontroller="Opportunity" recordSetVar="Opp" standardStylesheets="True" showHeader="false"    >
    <apex:Form >
        <apex:pageBlock title="Revenue List" mode="inlineEdit">
        <apex:pageBlockButtons location="both">
            <apex:commandButton action="{!quickSave}" value="Save"/>
        </apex:pageBlockButtons>
        
            <apex:pageBlockTable value="{!Opp}" var="op" width="100%">
              <apex:Column width="100 (px)" >
                <apex:outputfield value="{!op.Name}"/>
                <apex:facet name="header">Opportunity</apex:facet>
              </apex:Column>
        </apex:pageBlockTable>
        </apex:pageBlock>
        <apex:pageBlock>
            <apex:pageBlockTable value="{!Opp.RevenueProjection__r}" var="re">
              <apex:Column width="50(px)" >
                  <apex:facet name="header">January</apex:facet>
                    <apex:outputfield value="{!re.January__c}"/>
              </apex:Column>
              <apex:Column width="50px" >
                  <apex:facet name="header">February</apex:facet>
                  <apex:inputfield value="{!re.February__c}"/>
              </apex:Column>
              <apex:Column width="50px" >
                  <apex:facet name="header">March</apex:facet>
                  <apex:inputfield value="{!re.March__c}"/>
              </apex:Column>
              <apex:Column width="50px" >
                  <apex:facet name="header">April</apex:facet>
                  <apex:inputfield value="{!re.April__c}"/>
              </apex:Column>
              <apex:Column width="50px" >
                  <apex:facet name="header">May</apex:facet>
                  <apex:inputfield value="{!re.May__c}"/>
              </apex:Column>
              <apex:Column width="50px" >
                  <apex:facet name="header">June</apex:facet>
                  <apex:inputfield value="{!re.June__c}"/>
              </apex:Column>
              <apex:Column width="50px" >
                  <apex:facet name="header">July</apex:facet>
                  <apex:inputfield value="{!re.July__c}"/>
              </apex:Column>
              <apex:Column width="50px" >
                  <apex:facet name="header">August</apex:facet>
                  <apex:inputfield value="{!re.August__c}"/>
              </apex:Column>
              <apex:Column width="50px" >
                  <apex:facet name="header">September</apex:facet>
                  <apex:inputfield value="{!re.September__c}"/>
              </apex:Column>
              <apex:Column width="50px" >
                  <apex:facet name="header">October</apex:facet>
                  <apex:inputfield value="{!re.October__c}"/>
              </apex:Column>
              <apex:Column width="50px" >
                  <apex:facet name="header">November</apex:facet>
                  <apex:inputfield value="{!re.November__c}"/>
              </apex:Column>
              <apex:Column width="50px" >
                  <apex:facet name="header">December</apex:facet>
                  <apex:inputfield value="{!re.August__c}"/>
              </apex:Column> 
          </apex:pageBlockTable>
       </apex:pageBlock>
    </apex:Form>
</apex:page>

 
So I worked out some code to invoke a rest service off of an event in SFDC. I wrote the code out in two parts, the trigger and a @Future Class. I'm scratching my had as to where to begin however with the test classes (What I've been trying out seems to not be working, much of the documentation suggests test methods which don't seem supported any longer).


The trigger
trigger ProductLicenseRestCall on ProductLicense__c (before update) {
    for (ProductLicense__c a : Trigger.new) {
        ProductLicense__c b=Trigger.oldMap.get(a.ID);
        // make the asynchronous web service callout
        if(a.License_Sent__c != b.License_Sent__c){
		if(a.License_Sent__c==TRUE){
        a.Requested_Date_Time__c=DateTime.now();
        WebServiceCallout.sendNotification(String.valueOf(a.Id));    
        }}
    }

}

And the class. Its very simple and minimal and in all my testing in our sandbox, is working just fine. 
public class WebServiceCallout {

    @future (callout=true)
    public static void sendNotification(String licenseId) {
        
     list<productkeylicense__c> Pass = [SELECT Key__c FROM ProductKeyLicense__c ORDER BY  CreatedDate LIMIT 1];
        HttpRequest req = new HttpRequest();
        HttpResponse res = new HttpResponse();
        Http http = new Http();
        req.setEndpoint('https://acmecorp.com/endpoint/'+ licenseId);
        req.setMethod('POST');
        
        req.setHeader('License-Client-Key', Pass[0].Key__c);     

        try {
            res = http.send(req);
        } catch(System.CalloutException e) {
            System.debug('Callout error: '+ e);
            System.debug(res.toString());
        }

    }



}

 
Hi,

I have a need to restrict a set of record owners (users) in a specific profile group from any records last edited on a a certain date in the past?  Pending spinoff.

Thanks
Hi All,

My requirement is to create a record for on object & its related attachment in salesforce from php. So for that i created one webservice class & method exposed it .From php side we can able to pass parameters(fields) & record aslo created in salesforce , But How could we pass files which will going to store in the attachment of that record? what should i do to accept that file in my class?

Hello!

I'm trying to access Salesforce from a web-service, hosted externally, say on the Amazon cloud or another web server. The web-service needs to login to Salesforce, query records, and update records periodically. The trigger mechanism is irrelevant. I have a Python script within the web-service, that uses simple-salesforce to login to Salesforce, query and update records. Now, the script works fine from my desktop, but when I upload to the cloud (say, Amazon web-servers), I get a "permission denied". Is my security token limited to my desktop? I am able to login to salesforce from external IP addresses (home), but not from this web-service hosted on the cloud.

Any ideas?

Thanks!
Sam
 
Long story short: I have made a workflow that updates a check box to true when certian  critia are met, I now want to make the opersite of it so that when the critia no longer matchs what I need it it then updates it to false (its importaint as I have a validation rule riding on this working).
This is the formula minus sensative info which is covered by asterisks: 
AND( OR( ISNEW(), ISNULL( ***_****__c), ISNULL( ****_****__c ) ), ISPICKVAL( Product2.Family, '****'), OR(Opportunity.Probability < 90, Opportunity.IsClosed = FALSE))
any ideas
I'm looking for the best way to accomplish assigning a permmision set when a new user is created without me having to manually do it. I'd like to do this via flow/process builder but I'm not having luck with that. Anyone have any insite or suggestions on how to do this task?
I am just hide my salesforce registered user name and mail id when sent the mail via email template for recevied mail.
We have a curstom object, case_Account, which contain an email field, I would like to have a formula field which tell whether this case account is a salesforce licensed user based on the email field. Is there a way to do this?
Hi,

I have to unable to reslove this situation. how to aviod  Unknown element: import error in generating proxy classes.
Develop-Apex classes-generate from wsdl-Upload a wsdl file-parse wsdl.
then i got the error message  Error: Failed to parse wsdl: Unknown element: import. 
pls can anyone help me.

Thanks 
Venkat
Hi,
Visualforce page gives unresponsive error while loading records around 2000+.
I added readOnly= true in the apex:Page tag but didn't help.

But still I am getting this error . Please help.
User-added image
I am working on a requirement to automate portal user creation based on user requests and sync it to downstream system real time. I have a problem creating contact and user in Same transaction due to setup non setup object. I cannot create user in a future method since I need to display the status of user creation on vf page for user. Appreciate if anyone has a workaround for this issue
Hii All,
why my developer console is not working ?
First this problem was with ap2 instance but now it's started happening with AP1 instance too.

When i click on devleoper console it prompt to open in new window but after opening it minimized and after that it become irresponsive so atlast browser give the option to kill the pages.

Any help will be appreciated.

Thanks
Rishav
  • April 09, 2015
  • Like
  • 0
Hi All,

Is there a way in Apex to see if the specified text passes the salesforce password policies. 

Use Case: In our customer portal, we are allowing new users to register for the portal. So we are inserting a new user and setting the password in the same call. Now if the password doesnt pass the password policies, than the user is created in sf, but the password is not set. (we are not using temporary password approach)

Thanks
Sid
Hi there,

I have the following situation:
- My Quote has a field that is updated on its afterUpdate trigger, based on a calculation involving its QuoteLineItems
- If I simply update one of the QuoteLineItems via UI (edit item, change value, save), it also does an update on the Quote, firing its triggers which ends up calculating the value of the field I mentioned above, works fine.
- However, If I just make an 'update item' on my test, it does not update the Quote, which ends up not calculating the mentioned field

I can't see a reason why the Quote is also being updated through the UI. So, before going deeper in debug logs, I'm just wandering if there is something very obvious that I might be missing. Any thoughts?

Thanks.
 
Hi all, I am new to salesforce. We have and external application that identifies and collects leads. We want to push that lead to salesforce. What would be the best way to do that? i reviewed the rest api docs and there is some info on creating new record. Is this equivalent to adding lead in the system? how would we define more fields like address info, phonenumber etc in the json? is there any format or naming convension? And example of adding updating users would be a big help. Thanks!
https://www.salesforce.com/us/developer/docs/api_rest/Content/dome_sobject_create.htm
Hi Guys,
I want to know which custom label/custom settings used in which  class/trigger/vf page/component.

How can we achive it. Please help me!!
Hi All,

Is there a way in Apex to see if the specified text passes the salesforce password policies. 

Use Case: In our customer portal, we are allowing new users to register for the portal. So we are inserting a new user and setting the password in the same call. Now if the password doesnt pass the password policies, than the user is created in sf, but the password is not set. (we are not using temporary password approach)

Thanks
Sid