• softmain dotin
  • NEWBIE
  • 5 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 7
    Replies
I want to call a method which has a id as parameter. i want to call that method in constructor. how to do it ?
What is Sales Force? (Check all that apply)
 
  A. Sales Force Automation 
  B. Marketing Automation 
  C. Customer Support Management 
  D. Campaign Management

I think the answer should be all 4, i.e a,b,c,d . 

Can someone please confirm ? 

how do I create a free developers Account which is free for Lifetime...???

 

 

Thanks,

Hi i am creating visualforce pages and apex classes triggers etc for last some time.i want to know what is app in salesforce and how to publish it on AppExchange? Any requirement for publishing app on app exchange i went through this tutorial link

they teach how to create an app in developer org by default there are 6 tabs Home,Chatter,File,Your Tab ,Reports,DashBoard.i basically want to know what app contains? apex class,visualforce page these components or only standard tabs and some customization tab what we see when we select an app in developer org

hi,

 

 i m trying to create a custom field in to standard object  but it is creating in to standard fields  not in custom field.

 and second thing i m not able to create field type  exept Text and AutoNumber.   this is the code that i m using.

 

 

// create a new custom object
                String objectName = "Test4";
                String displayName = "Test4 Object";
                 
                CustomObject co = new CustomObject();
                co.setFullName(objectName+"__c");
                co.setDeploymentStatus(DeploymentStatus.Deployed);
                co.setDescription("Created by gaurav using the Metadata API");
                co.setLabel(displayName);
                co.setPluralLabel(displayName+"s");
                co.setSharingModel(SharingModel.ReadWrite);
                co.setEnableActivities(true);
                 
                // create the text id field
                String custom ="Test";
                CustomField field = new CustomField();
                field.setType(FieldType.Text);
                field.setDescription("The Gaurav");
                field.setLabel(displayName);
                field.setFullName(objectName+"__c");
                // add the field to the custom object
                co.setNameField(field);

 try {
                  // submit the custom object to salesforce
                  AsyncResult[] ars = metadataConnection.create(new CustomObject[] { co });
                  if (ars == null) {
                      System.out.println("The object was not created successfully");
                      return;
                  }
                   
                  String createdObjectId = ars[0].getId();
                  String[] ids = new String[] {createdObjectId};
                  boolean done = false;
                  long waitTimeMilliSecs = 1000;
                  AsyncResult[] arsStatus = null;
          /**
               * After the create() call completes, we must poll the results
               * of the checkStatus() call until it indicates that the create
               * operation is completed.
                   */
                  while (!done) {
                      arsStatus = metadataConnection.checkStatus(ids);
                      if (arsStatus == null) {
                          System.out.println("The object status cannot be retrieved");
                          return;
                      }
                      done = arsStatus[0].isDone();
                      if (arsStatus[0].getStatusCode() != null )  {
                          System.out.println("Error status code: "+arsStatus[0].getStatusCode());
                          System.out.println("Error message: "+arsStatus[0].getMessage());
                      }
                      Thread.sleep(waitTimeMilliSecs);
                      // double the wait time for the next iteration
                      waitTimeMilliSecs *= 2;
                      System.out.println("The object state is "+arsStatus[0].getState());
                  }
                   
              System.out.println("The ID for the created object is "+arsStatus[0].getId());
                }
                catch (Exception ex) {
                    System.out.println("\nFailed to create object, error message was: \n" +ex.getMessage());
                }
    
    }