• anil jadhav 8
  • NEWBIE
  • 15 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 12
    Replies
Hello guys, 
There is a requirement of field update, these would have done with workflow but the criteria on which the field update takes place is changed frequently and with same we have to open or give access to client wherever the criteria changed, they should have changed thereself not creating any tickets to support team.

Is there any way to achieve this?
Any kind of help appreciated.
Thank you
Code here
<apex:page > <apex:form >
<html> <head>
<apex:stylesheet value="{!URLFOR($Resource.jqueryMenu, 'styles.css')}"/>
</head>
<body >
<h1>CSS3 Minimalistic Navigation Menu</h1>
<div id="main"> <ul id="navigationMenu"> <li> <a class="home" href="#"> <span>Home</span> </a> </li> <li> <a class="about" href="#"> <span>About</span> </a> </li> <li> <a class="services" href="#"> <span>Services</span> </a> </li> <li> <a class="portfolio" href="#"> <span>Portfolio</span> </a> </li> <li> <a class="contact" href="#"> <span>Contact us</span> </a> </li> </ul> </div> </body> </html> </apex:form> </apex:page>


 
I am trying to get the profile id but without making any SOQL in trigger
Hi All,

 Could anyone please help on this will be appreciate

  How can i restrict the users for deleting the opportunity team members in opportunity related list except the Admin?

Thanks in Advance..
Basha
This should be simple, but I can't figure it out. How do I add a second to a date and time field in a formula? I have a 'end' date and time field. I want my formula field to show 'next' available date and time. The next available should be one second from end date and time.
Hello,

I am currently trying to automate our loan process at work within Salesforce.
We use two seperate objects to manage loans and loan assets - Contract Loans (manages the actual loan) and Contract Loan Assets (manages the assets themselves).
One of the fields within the Contract Loan object is "Loan Status", which is a picklist field, consisting of the following options:
  • New
  • Pending Approval
  • Approved
  • Rejected
  • Closed
As you can probably assume from the options, this object (Contract Loan) utilises the approvals process.
When a loan is created, it's loan status is automatically set to "New", whilst the loan owner makes any changes to the record prior to submitting it for approval.
At this point, I want the loan asset (which is a related object to the contract loan), which also has a "status" field, to set the asset status to "pending approval" so that it no longer shows in the asset view for our support staff, so that they don't request loan assets that already have contract loan's open/open pending approval.
In an attempt to make this work, within the approval process, I set one of the initial actions to change the contract loan status field to Pending Approval once submitted for approval, which works.
I then thought to use process builder to make the second part happen, i.e. update the loan asset to say "pending approval" also, which worked.

After I got the first part working, I thought I'd try and make it so that when the loan itself is approved, the loan asset changes to "on loan", again using process builder, but at this point, it stopped working and wouldn't update the contract loan asset object further than pending approval, which I don't understand.

Any suggestions/help would be greatly appreciated!

Thank you!
How to export results from an SOQL query to CSV?
Currently I'm using workbench.developerforce.com, having 11500 records,view as: bulk csv, and here also its fail : Failed: InvalidBatch : Failed to process query: FUNCTIONALITY_NOT_ENABLED: Foreign Key Relationships not supported in Bulk Query. 
I downloaded FuseIT SFDC Explorer its shows that Failed to create an instance of FuseIT.G4S.SalesforceConnector.Entities.GenericSalesforceEnt‌​ity from htm__Organization_Assignment__c -> result.Id is required for an existing object. Parameter name : result.
How could I export results to CSV?
I have a method written which is been called inside a visualforce page table if there are less rows there is no issue. when table has more rows it is throwing error as mentioned below 

Too many SOQL queries: 101​
 
/* calculate disti discount */  
  public static Decimal reCalRslrDisc(Decimal listprice,String productcat, Decimal reslrdistdiscount){
        Boolean isService = false;
        
        system.debug('listprice = ' + listprice);
        system.debug('productcat = ' + productcat);
        system.debug('reslrdistdiscount = ' + reslrdistdiscount);
        
        if ( reslrdistdiscount == null || reslrdistdiscount < 1 ){
            reslrdistdiscount = 0;
         } 
        
        if ( productcat=='C' || productcat=='E'|| productcat=='D'|| productcat=='H'|| productcat=='I'|| productcat=='J' ){
            isService = true;
          }
        
        if ( isService == true ) { 
            NSP_Margin_Schedule__c NMS =  [ Select Distributor_Discount__c From NSP_Margin_Schedule__c 
                                           where  Reseller_Discount__c = :reslrdistdiscount and 
                                           Service__c = :isService and 
                                           createddate < 2015-01-17T00:00:00-08:00 ];
            
            return NMS.Distributor_Discount__c;
        }
        else {
            return 0;
        }      
        
  }

Error is happening in above code while returning query return NMS.Distributor_Discount__c;

Please suggest me a way how to avoid this error can we use map to over come this if so please suggest me with an example 

Thanks
Sudhir
  • October 21, 2016
  • Like
  • 0
How to write trigger to  add duplicate Account name with number ?
Hi Iam trying attach a document which is uploaded in chatter to the email and send that email but iam getting the system.query exception:list has no rows for assignment to sobject.
Trigger:
trigger SendEmailOnFileUploadTrigger2 on ContentDocumentLink (after insert,after update) {
    Set<Id> fieldIds = new Set<Id>();
    Set<Id> docIdSet = new Set<Id>();
    for(ContentDocumentLink content :trigger.new){
        fieldIds.add(content.LinkedEntityId);
        docIdSet.add(content.ContentDocumentId);
    }
    system.debug('@@@ Linked Entity Id:'+fieldIds);
    system.debug('@@@ Content Document Id:'+docIdSet);
    if(trigger.isAfter)
    EmailHandler.sendUploadNotificationEmail(docIdSet);
}

Class:
public without sharing class EmailHandler {
    public static void sendUploadNotificationEmail(set<Id> docIds){
         system.debug('@@@@Document Ids:'+docIds);
         Document doc = [select id, name, body, contenttype, developername, type from Document where Id IN :docIds]; 
         Messaging.EmailFileAttachment attach = new Messaging.EmailFileAttachment();
            attach.setContentType(doc.contentType);
         attach.setFileName(doc.developerName+'.'+doc.type);
         attach.setInline(false);
         attach.Body = doc.Body; */
         Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
         String[] toAddresses = new String[] {'test@xyz.com'};
         String[] ccAddresses = new String[] {'kirankumar.punuru@xyz.com'};
         mail.setUseSignature(false);
         mail.setToAddresses(toAddresses);
         mail.setCcAddresses(ccAddresses);
         mail.setReplyTo('kirankumar.punuru@eclerx.com');
         mail.setSenderDisplayName('Kiran Kumar reddy Punuru');
         mail.setSubject('The Below File Has been uploaded : ');
         //mail.setHtmlBody('Here is the email you requested: '+doc.name);
         //mail.setFileAttachments(new Messaging.EmailFileAttachment[] { attach }); 
         mail.setBccSender(false);
         Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail }); 
      }
  }

Please correct the above if iam doing in correct.

Thanks
kiran
Hi , 

I need to get the primary contacts email address on Account. I need this throught configuration. Is it possible ?

Thanks
  • June 24, 2016
  • Like
  • 0
can anyone please give the realtime scenarios on future apex please?