• Sharankumar Desai
  • NEWBIE
  • 34 Points
  • Member since 2016


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 20
    Replies
Hi All,

I am using Metadata WSDL along with Partner WSDl to work on metadata API to create fields.

I am able to create fields of type text,checkbox etc, but i am facing using to create a picklist field and add picklist values to it.
Below is the cource code i have written i am not able to understand where to add the picklist values
 
CustomField customField = new CustomField();
customField.setFullName("Account.customPickField__c");
customField.setLabel("customPickField");
customField.setType(FieldType.Picklist);

SaveResult[] results = metadataConnection.createMetadata(new Metadata[] {customField});

I have seen forums where people says to use 
customField.setPicklist();
But this method is not available .

SALESFORCE VERSION : 39.0
NOTE: I am using Java appilcation for doing this job

Appreciate your help !!
I am trying to build a report on Lead object with below basic data (Custom Date Field on Lead object  : Last_Contacted_Date__c)

Need a report which displays No of leads contacted over period of <=7days,<=14 and ..... Should be something like below

User-added image
Hi All,

I am looking for an Apex code which can get me a list of all current logged In users.

Let me know if this is feasible.

Thanks
Sharan Desai
+91 966 33 11 740
Hi Folks,

I am bit confused between Custom Controller and Custom List Controller difference.

The reason being ,In Cunstomer controller i can create a method to return list of accounts which i can use in Visualforce page then what is the use case for me to opt Custom List controller (account).?

What is that i can do with Custom List controller which cannot be achieved with Custom Controller.
Hi Folks,

Can anyone share on how to add search icon to an text field in the Lightning Component.

All i am using currentlty is below code. I want to make it as a search box with an icon in it
<ui:inputText value="" updateOn="keyup"/>

Thanks
Sharan Desai
I need to write trigger on contact to update owner of contact using this conditions

I just give example:

In contact:
Account number__c=12345;

In Account :
AccounNumber= 12345;
A__c=112-bobby; 
Here A__c is text data type. 
112 is the employee number field value in user object; 
Bobby is username of 112 of employee number; 

Once trigger is applied what we have to show

Which user has 112 of employee number that user should come as contact owner. 

112 is part of A__c field value. 

In user:
Employee number =112;

Finally 
First condition is when contact. Account number=account.account number; 
Based on this we will get account
Based on that account we have A__c field. 
In this field we have employee number -user name. 
Like this
112-bobby

Please let me know if you have any queries 

Thanks
Hello,

I have the same question.
Our company is intending to use Salesforce, but i don't know if it is possible to link Salesforce with our Accountancy tool Quadra ?
Does anybody know if it is possible ?

Thanks in advance.

Mehdi
Hi All,

I have a simple question. Based on the development documents, helper class of lightning should be described common methods. However, I can't find out the way to use a helper class from other lightning components. Anyone know how we should call a helper class from other lightning components or appropriate structure of lightning component?

Thanks in advance.
Hi,
I am getting this error while I am trying to update contact which are associated to user objects.
trigger CommunityLoginOnContactTrigger on User (after update) {
    
    for(User u: trigger.new)
    {
        system.debug('USer trigger got triggered');
        if(system.isFuture()) return;
        if(u.ContactId != null)
        {
            if(u.LastLoginDate__c != null)
            {
                UpdateContactFromTestUser.updateContacts(u.ContactId, u.LastLoginDate__c);                
            }
        }
        
    }

}
global class UpdateContactFromTestUser {
    @future
    public static void updateContacts(String userId, Datetime Lastlogin) {
        if (userId!=null && userId != '') {
            Contact c = [ Select Last_Community_Login__c,Community_Category__c from Contact where id =:userId];
            
            if(c.Last_Community_Login__c != Lastlogin)
            {
                c.Last_Community_Login__c = Lastlogin;
                update c; 
            }
        }
    }
}
Hi,

I am having issues with the rendering of images in a Visualforce PDF.

ll my product images are stored on a server and are accessible at the URL http://images.metropuzzle.com/IMG2/[PRODUCT CODE]_IMG2_L.jpg
E.g. http://images.metropuzzle.com/IMG2/NPZPD1703_IMG2_L.jpg
When I try to use those URL in <apex:image> it does not render the image in the PDF...

User-added image


As I am trying to track down the issue, I found something very odd.
For this simple test I am using one of my product image, and an image I found online, the URL is http://investor.salesforce.com/files/design/newlogo-company.png -- This URL seems to redirect to the URL http://s1.q4cdn.com/454432842/files/design/newlogo-company.png

I am building the PDF with the Visualforce code below: 
<apex:page renderAs="PDF">
    <div class="productGridContainer">
            <div class="productGridItem">
                <div>
                    <apex:image value="http://images.metropuzzle.com/IMG2/NPZPD1703_IMG2_L.jpg"/>
                    <apex:image value="http://investor.salesforce.com/files/design/newlogo-company.png"/>
                    <apex:image value="http://s1.q4cdn.com/454432842/files/design/newlogo-company.png"/> 
                </div>
            </div>
    </div>
</apex:page>

It does not render my product image, and for the image I found online it only renders the first one, not the second one. But it is the same image!
User-added image

Would someone have any idea why this is not working?

Thanks a lot!
Hi All,

I am using Metadata WSDL along with Partner WSDl to work on metadata API to create fields.

I am able to create fields of type text,checkbox etc, but i am facing using to create a picklist field and add picklist values to it.
Below is the cource code i have written i am not able to understand where to add the picklist values
 
CustomField customField = new CustomField();
customField.setFullName("Account.customPickField__c");
customField.setLabel("customPickField");
customField.setType(FieldType.Picklist);

SaveResult[] results = metadataConnection.createMetadata(new Metadata[] {customField});

I have seen forums where people says to use 
customField.setPicklist();
But this method is not available .

SALESFORCE VERSION : 39.0
NOTE: I am using Java appilcation for doing this job

Appreciate your help !!
Hi All,

I am looking for an Apex code which can get me a list of all current logged In users.

Let me know if this is feasible.

Thanks
Sharan Desai
+91 966 33 11 740
<apex:page standardController="Lead">
<apex:form >
<apex:pageBlock title="New Lead">
   <apex:pageBlockSection columns="2">
     <apex:inputtext value="{!Lead.Name}" label="Name"/>
     <apex:inputfield value="{!Lead.Email}" label="Email"/>
     <apex:inputfield value="{!Lead.Status}" label="Status"/>
     <apex:inputfield value="{!Lead.MobilePhone}" label="Mobile Phone"/>
     <apex:inputfield value="{!Lead.Company}" label="Company Name"/>
     <apex:inputfield value="{!Lead.AnnualRevenue}" label="Annual Revenue"/>
     <apex:inputfield value="{!Lead.Fax}" label="Fax"/>
     <apex:inputfield value="{!Lead.Title}" label="Title"/>
     <apex:inputfield value="{!Lead.Website}" label="Website"/>
   </apex:pageBlockSection>
   
   <apex:pageBlockButtons >
      <apex:commandButton action="{!Save}" value="Save"/>
      <apex:commandButton action="{!Cancel}" value="Cancel"/>
      <apex:commandButton action="{!Edit}" value="Edit"/>
      <apex:commandButton action="{!View}" value="View"/>
      <apex:commandButton action="{!Delete}" value="Delete"/>
   </apex:pageBlockButtons>
   
</apex:pageBlock>
<apex:detail relatedList="true"/>
 </apex:form>
</apex:page>

Hi,

 

Can someone help me out with Metadata API ? I need to figure out a way to change values for a picklist field using apex. I thought that an update() call using the Metadata API should be the right direction, but having a hard time putting together the format of the request.

Also, can we do picklist value changes in Production using the update() call? Based on the post at
http://boards.developerforce.com/t5/Apex-Code-Development/CRUD-based-development-Metadata-API/m-p/193777#M32258
I believe we will need a deploy() call for any deployment to production.