• Subhasini Bhosal 10
  • NEWBIE
  • 5 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies
I am trying to transfer an App from one developer org to the other. However I am getting the below failure messages:
User-added image

Any idea on how to overcome this. Is there any sequence in which App,objects,tabs,labels ,classes ,triggers need to be imported.

Thanks in advance!!
I have REST Service to create a Case in Salesforce:

@RestResource(urlMapping='/Case/*')

global with sharing class CaseCreater {
 @HttpGet
    global static Case getCaseById() {
        RestRequest req = RestContext.request;        
        String caseId = req.requestURI.substring(
                                  req.requestURI.lastIndexOf('/')+1);
        Case result = 
                       [SELECT  Status,Origin from Case where  Id = :caseId];
        return result;
    }
    @HttpPost
    global static String createCase(String priority,String type, String status,
        String origin,String reason, String subject, String description ) {
        Case c = new Case(
         
            Priority=priority,
            Type= type,            
            Status=status,
            Origin=origin,
            Reason=reason,
            Subject=subject,
            Description=description          
                         );
        insert c;
        return c.Id;
    }
}
//SELECT  Status,Origin,priority,Product__c,Type,Reason,
//Subject,Description,account.name,case.contact.name from Case where status='New'

----

I want to call this service from visualforce page written in HTML and Javascript on click of a button to create a case:

<apex:page sidebar="false" showHeader="false"  standardController="Case" extensions="abc">
    <h1> Welcome {!$User.FirstName}!!</h1>
    <html>
    <head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
        <script src="https://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
    
    </head>
   
<form id="form1" method="POST">
  Priority:
  <input type="text" name="priority" id="priority"></input><br></br>
  Type:
  <input type="text" name="type" id="type"></input><br></br>
   Status:
  <input type="text" name="status" id="status"></input><br></br>
   Origin:
  <input type="text" name="origin" id="origin"></input><br></br>
   Reason:
  <input type="text" name="reason" id="reason"></input><br></br>
   Subject:
  <input type="text" name="subject" id="subject"></input><br></br>
   Description :
  <input type="text" name="description" id="description"></input><br></br>
    <button type="button" onclick="callme();">Create Case</button>
    
    </form>
    <script>    
   
        
       function callme(){ 
      
   var data={
    "priority":document.getElementById("priority").value,
    "type":document.getElementById("type").value,
    "status":document.getElementById("status").value,
    "origin":document.getElementById("origin").value,
    "reason":document.getElementById("reason").value,
    "subject":document.getElementById("subject").value,
    "description":document.getElementById("description").value
        };           
        
    console.log(result);
        }
    
    </script>
</html>

</apex:page>
----------------

I am not sure how to call the service on click of a button. Can someone please help?
 
Hi,

I am new to Salesforce. I have created Service based on REST API to create a case. 

@RestResource(urlMapping='/Case/*')
global with sharing class CaseCreater {
 @HttpGet
    global static Case getCaseById() {
        RestRequest req = RestContext.request;       
            String caseId = req.requestURI.substring(
                                      req.requestURI.lastIndexOf('/')+1);
        Case result =
                       [SELECT  Status,Origin from Case where  Id = :caseId];
        return result;
    }

@HttpPost
  global static Boolean updateCase(String caseId, String priority){
  Case c= new Case(
  Id=caseId,
  Priority=priority);
  update c;
  return true;}

    @HttpPost
    global static String createCase(String priority,String type, String status,
        String origin,String reason, String subject, String description ) {
        Case c = new Case(
        
            Priority=priority,
            Type= type,           
            Status=status,
            Origin=origin,
          Reason=reason,
          Subject=subject,
          Description=description         
          );
        insert c;
        return c.Id;
    }
}
-----

I want to create VF page in Angular JS which will create a case in on passing the values in JSOn format:

{
  "priority" :"Low",
  "type" :"Mechanical",
  "status" : "New",
  "origin" : "Phone",
  "reason" : "Breakdown",
  "subject" : "Mechanical Breakdown",
  "description" : "Mechanical Breakdown"
  }

---

vf page:


<apex:page sidebar="false" showHeader="false" standardController="Case" extensions="abc">
<h1> Welcome {!$User.FirstName}!!</h1><br></br>
<html>
<head>
        <apex:includeScript value="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.js"/>
</head>
<script>

function submit(){
 var data= {
 priority: document.getElementById("priority").value,
 type: document.getElementById("type").value,
 status: document.getElementById("status").value,
 origin: document.getElementById("origin").value,
 reason: document.getElementById("reason").value,
 subject: document.getElementById("subject").value,
 description: document.getElementById("description").value
    }  
  //this is raw data need to passed to the service
}    
</script>
<body>
    <label> Priority</label>
        <input id= "priority" > </input><br></br>
     <label> Type</label>
        <input id= "type" > </input><br></br>
     <label> Status</label>
        <input id= "status" > </input><br></br>
     <label> Origin</label>
        <input id= "origin"></input><br></br>
      <label> Reason</label>
          <input id= "reason"></input><br></br>
      <label> Subject</label>
          <input id= "subject"></input><br></br>      
      <label> Description</label>
          <input id= "description"></input><br></br>
      <button type="button" onclick="submit()">Submit!</button>
    
</body>
</html>
</apex:page>
---------------
however I dont know how to call the service here. Can anyone please help?
Thanks,
Subhasini
I am trying deployment from VS Code project using Deploy to source org and it fails with below error. 
I tried reinstalling CLI, creating new project and also with new dev org - nothing seems to help. Could you please suggest how i can overcome this error. 

MissingMessageError: Missing message mdapi_deploy:mdDeployCommandCliCheckOnly for locale en_US.
    at Messages.getMessageWithMap (C:/Program Files/Salesforce CLI/client/node_modules/@salesforce/core/lib/messages.js:277:19)
    at Messages.getMessage (C:/Program Files/Salesforce CLI/client/node_modules/@salesforce/core/lib/messages.js:261:21)
    at Object.<anonymous> (C:/Program Files/Salesforce CLI/client/node_modules/salesforce-alm/dist/commands/force/source/deploy.js:38:36)
    at Module._compile (C:/Program Files/Salesforce CLI/client/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at LazyLoader.loadModule (C:/Program Files/Salesforce CLI/client/node_modules/@salesforce/lazy-require/lib/LazyLoader.js:139:21)
    at Function._load (C:/Program Files/Salesforce CLI/client/node_modules/@salesforce/lazy-require/lib/LazyLoader.js:115:29)
    at require (C:/Program Files/Salesforce CLI/client/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at fetch (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/config/lib/plugin.js:111:21)
    at Plugin.findCommand (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/config/lib/plugin.js:125:21)
    at Object.load (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/config/lib/plugin.js:58:72)

 
Hello, I would like to know if it's possible to populate an excel which is one of my static resources with Salesforce Data in Apex. Someone know? Thanks in advance
Hi,

I am new to Salesforce. I have created Service based on REST API to create a case. 

@RestResource(urlMapping='/Case/*')
global with sharing class CaseCreater {
 @HttpGet
    global static Case getCaseById() {
        RestRequest req = RestContext.request;       
            String caseId = req.requestURI.substring(
                                      req.requestURI.lastIndexOf('/')+1);
        Case result =
                       [SELECT  Status,Origin from Case where  Id = :caseId];
        return result;
    }

@HttpPost
  global static Boolean updateCase(String caseId, String priority){
  Case c= new Case(
  Id=caseId,
  Priority=priority);
  update c;
  return true;}

    @HttpPost
    global static String createCase(String priority,String type, String status,
        String origin,String reason, String subject, String description ) {
        Case c = new Case(
        
            Priority=priority,
            Type= type,           
            Status=status,
            Origin=origin,
          Reason=reason,
          Subject=subject,
          Description=description         
          );
        insert c;
        return c.Id;
    }
}
-----

I want to create VF page in Angular JS which will create a case in on passing the values in JSOn format:

{
  "priority" :"Low",
  "type" :"Mechanical",
  "status" : "New",
  "origin" : "Phone",
  "reason" : "Breakdown",
  "subject" : "Mechanical Breakdown",
  "description" : "Mechanical Breakdown"
  }

---

vf page:


<apex:page sidebar="false" showHeader="false" standardController="Case" extensions="abc">
<h1> Welcome {!$User.FirstName}!!</h1><br></br>
<html>
<head>
        <apex:includeScript value="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.js"/>
</head>
<script>

function submit(){
 var data= {
 priority: document.getElementById("priority").value,
 type: document.getElementById("type").value,
 status: document.getElementById("status").value,
 origin: document.getElementById("origin").value,
 reason: document.getElementById("reason").value,
 subject: document.getElementById("subject").value,
 description: document.getElementById("description").value
    }  
  //this is raw data need to passed to the service
}    
</script>
<body>
    <label> Priority</label>
        <input id= "priority" > </input><br></br>
     <label> Type</label>
        <input id= "type" > </input><br></br>
     <label> Status</label>
        <input id= "status" > </input><br></br>
     <label> Origin</label>
        <input id= "origin"></input><br></br>
      <label> Reason</label>
          <input id= "reason"></input><br></br>
      <label> Subject</label>
          <input id= "subject"></input><br></br>      
      <label> Description</label>
          <input id= "description"></input><br></br>
      <button type="button" onclick="submit()">Submit!</button>
    
</body>
</html>
</apex:page>
---------------
however I dont know how to call the service here. Can anyone please help?
Thanks,
Subhasini