• om sai 10
  • NEWBIE
  • -1 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 9
    Likes Given
  • 7
    Questions
  • 4
    Replies
@RestResource(urlMapping='/Merchandise/*')
global with sharing class MerchandiseManager {

@HttpPost
global static String createMerchandise(String  firstname)
{
Merchandise__c m = new Merchandise__c( Name=firstname); 
insert m;
return m.Id;
}
)
I wants to know how this api be called by somebody from outside salesforce,i have tried workbench but that does not give me much idea.so if the json body is something like 
{
"firstname":'james"
}

How will this information be passed by calling the above method from outside salesforce.How will i call above given method.please help
 
 
Hi All,

I have outer and inner class and I am trying to execute below given code from anonymous block but i am not able to access the value of the variable   in the for loop,Can someody please help and let m know how to specifically access the value of variable i which is in the inner class.


public class Fridge 
{
public String modelNumber='g-20';
public Integer numberInStock;
    
public list<RareFridge>g;
    
    public list<Fridge.RareFridge>ftr;
    
    public fridge(integer numberInStock)
    {
        
        modelNumber='g-20';
        ftr=new list<fridge.RareFridge>();
    this.numberInStock=numberInStock;    
        
        
    }
    
public list<Fridge.RareFridge> updateStock(Integer justSold) 
{
    
numberInStock = numberInStock - justSold;
    
System.debug('The number in stock r es'+numberInStock);
    
ftr.add(new Rarefridge(20,'Gret'));
      
   return ftr; 
    
    
    
}
   
  public class RareFridge
        {
         //publi items {get;set;}   
            
            Integer i;
            String str;
           public RareFridge(integer g,String str)
           
               
               
           {
               
               
               
               This.i=g;
               this.str=str;
               
             
               
               
               
           }
            
            
            
        
    
      
        
    
    
    
    
}
}   
        

running from annonymous block
for(integer h=0;h<10;h++)
{
Fridge f=new Fridge(200);
}
public List<fridge.rarefridge>t;


 t=f.updateStock(50); 

for(fridge.Rarefridge m:t)
{
    
  
   
    
    //System.debug('The vlue of is'+m.i);
    
    
}



 
Hi All,

I have few questions.

1)I have heard about Node.js,Angular .js and Now Aura.I am wondering if javascript is specific to these frameworks or we learn javascript language and then use it with any of the frameworks .Can somebody please guide
2)Can we use Jquery instead of Javascript with Aura compoenents or it has to be be specifically javascript?

Thanks in Advance.

 
Hi All,

I have few questions.

1)I have heard about Node.js,Angular .js and Now Aura.I am wondering if javascript is specific to these frameworks or we learn javascript language and then use it with any of the frameworks .Can somebody please guide
2)Can we use Jquery instead of Javascript with Aura compoenents or it has to be be specifically javascript?

Thanks in Advance.

 
 
Hi Guys,

I am not able to use Visual code for doing development for the lighting platform as I don't see those Command line interface commands and I have deleted and reloaded salesforce  libraries several times but to no effect So I want to know , can I use Eclipse for doing development for lightning platform?Will i be able to everything that people can do using Visual studio.

Thanks,
hi,

Is visual force stll used to develop applications or it has been replaced by  salesforce lighning application development?.i  am not sure so please advice .

Thanks
Hi All,

I have outer and inner class and I am trying to execute below given code from anonymous block but i am not able to access the value of the variable   in the for loop,Can someody please help and let m know how to specifically access the value of variable i which is in the inner class.


public class Fridge 
{
public String modelNumber='g-20';
public Integer numberInStock;
    
public list<RareFridge>g;
    
    public list<Fridge.RareFridge>ftr;
    
    public fridge(integer numberInStock)
    {
        
        modelNumber='g-20';
        ftr=new list<fridge.RareFridge>();
    this.numberInStock=numberInStock;    
        
        
    }
    
public list<Fridge.RareFridge> updateStock(Integer justSold) 
{
    
numberInStock = numberInStock - justSold;
    
System.debug('The number in stock r es'+numberInStock);
    
ftr.add(new Rarefridge(20,'Gret'));
      
   return ftr; 
    
    
    
}
   
  public class RareFridge
        {
         //publi items {get;set;}   
            
            Integer i;
            String str;
           public RareFridge(integer g,String str)
           
               
               
           {
               
               
               
               This.i=g;
               this.str=str;
               
             
               
               
               
           }
            
            
            
        
    
      
        
    
    
    
    
}
}   
        

running from annonymous block
for(integer h=0;h<10;h++)
{
Fridge f=new Fridge(200);
}
public List<fridge.rarefridge>t;


 t=f.updateStock(50); 

for(fridge.Rarefridge m:t)
{
    
  
   
    
    //System.debug('The vlue of is'+m.i);
    
    
}



 
Hi all,

I'd like to write a trigger which would send Order ana order item data after Order insert to a third party syshtem through http request post. Do you have any examples for this kind of request post?
hi,

Is visual force stll used to develop applications or it has been replaced by  salesforce lighning application development?.i  am not sure so please advice .

Thanks
Hi, I have two objects Parent__c and Child__c in Master-Detail relationship.
There is need that create a trigger on Child__c which can automatically create parent record when child records are insert or update.
Is that possible?
My understanding is a child record cannot be inserted without parent record ID.
I have a formula number field to calculate the business hours between 2 date/time fields.  I need to break this down to days, hours, and minutes.  I'm being told that this may require a trigger.  Can someone help me?  
I want to concatenate 5 picklist fields values on the Lead object. All are single pick fields. I am creating a formula field to do so (let me know if there is any other best approach, but wanted to achieve through configuration not code). 
Output format : Picklist1_Picklist2_Picklist3_Picklist4_Picklist5
condition :
1. underscore should skip if any value is null or blank.
2. For picklist 1 it should only add selected values (Eg : Pickvalues : a, b, c, d, e, f : it should only add to the formula when a or b or c is selected else it should be blank)

Can you someone help on this request?
I need to prevent a new case from skipping the Investigate status and going directly to resolved.  I want an error message to display with my validation rule, but the rule is not working at all.

AND( 
$Profile.Name <> "System Administrator", 
RecordType.Name = "Complaint ", 
ISCHANGED( Status ), 
OR( 
ISPICKVAL(PRIORVALUE( Status ), "New") 
), 
NOT( ISPICKVAL( Status, "Resolved")) 
)
Hi I need to show customer no besides each and every customer as shown in the figure caUser-added imagen any one help me please 
I want to query in Salesforce database for an inactive user to check if he is owning any records or not?
I tried to query in Salesforce data loader but it only queries on one entity at a time. Also, the same behavior is shown for Reports wherein one entity gets queried at a time. 

Please advise further. Thanks
Probably easy one.  I have a managed number field (used in calculation for term of renewal)  On my doument I need the display to be 01 instead of 1 and 02 instead of 2 so on up to the number 9,  I was just going to create a text field that says IF (Renewal_Term__c) = 1 then change it to 01 etc.
Hello All

  Can someone help me in calculating the number of days for the target date to be populated excluding weekends and public holidays

For Instance, if the prority is in the case object is high, then the target date should be populated with +2 days from the case created date but should exclude weekends and public holidays.

I wrote the formula for excluding weekend but not able to figure how to add holidays to it. Here is the formula i wrote how to exclude weekends and add +2 days for created date

CASE( MOD( DATEVALUE( [Case].LastModifiedDate ) - DATE( 1900, 1, 7 ), 7 ), 
0, [Case].LastModifiedDate + 0 + 1,  
4, [Case].LastModifiedDate +  0+ 1, 
5, [Case].LastModifiedDate + 2 + 1,  
6, [Case].LastModifiedDate + 1 + 1, 
[Case].LastModifiedDate + 1 
)

Thanks in Advance
So I am trying to validate time entrys in quarter hour increments. Ex, 1, 1.25 = 1:15, 1.5 = 1:30, 1.75 = 1:45.
I have everything figured out, but when I try to enter a whole number like 1 or 2 or 3, I get an error. Below is my VR and its the fourth line that needs fixing in order to allow me to enter in a whole number. 


AND( 
IF(VALUE(RIGHT(TEXT(project_cloud__Hours__c), 3)) <> 0.25, True, False), 
IF(VALUE(RIGHT(TEXT(project_cloud__Hours__c), 2)) <> 0.50, True, False), 
IF(VALUE(RIGHT(TEXT(project_cloud__Hours__c), 3)) <> 0.75, True, False), 
IF(VALUE(RIGHT(TEXT(project_cloud__Hours__c), 3)) <> 0.00, True, False) 
)