• Yash Sadeghi
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 1
    Replies
Hi, 
I am trying to create an apex class as a lookup for a mobile application.
For that I wanted to include a part of a java script which should deliver a barcode to me.

This is the part I want to incorporate into my apex class:

p2spro://scan?formats=EAN13,EAN8,UPCE,ITF,CODE39,CODE128,CODE93,STD2OF5,CODABAR,QR &callback=CALLBACK_URL

I would appreciate any kind of advice, thank you.
Hello,
currently I am creating a barcode scanner on SF1 through the application pic2shop.
For this I have created a Visualforce Page.
So far I am able to scan but for some reason after the scan has been executed the barcode is not properly returned on my SF1 application so that I could use. I would be grateful for any advice.

The code: 

<apex:page standardController="Furniture__c">
     <div style="width: 30%">
        <a id="link" href="#" style="text-decoration: none">
            <img style="background: blue; display: block; margin: auto;" width="80%" src="/img/icon/t4v35/standard/product.svg"/>
            <br/>
        </a>
        
        <div style="font-family: sans-serif; text-align: center">
            Tap icon above to scan a piece of furniture
        </div>
    </div>    
    <script>
  


   //// var furnitureRedirectUrl = "pic2shop://scan?callback="+encodeURIComponent("salesforce1://furniture__c/view?furniture__cid=a0D58000004LIbK");


      var furnitureRedirectUrl = "com.salesforce.salesforce1://furniture__c/view?furniture__cid=a0D58000004LIbK";  
      var a = document.getElementById("link");  
      a.href = "pic2shop://scan?callback // EAN =" + encodeURIComponent(furnitureRedirectUrl);  
        
    </script>
 
</apex:page>



Thank you
Hello,
currently I am creating a barcode scanner on SF1 through the application pic2shop.
For this I have created a Visualforce Page.
So far I am able to scan but for some reason after the scan has been executed the barcode is not properly returned on my SF1 application so that I could use. I would be grateful for any advice.

The code: 

<apex:page standardController="Furniture__c">
     <div style="width: 30%">
        <a id="link" href="#" style="text-decoration: none">
            <img style="background: blue; display: block; margin: auto;" width="80%" src="/img/icon/t4v35/standard/product.svg"/>
            <br/>
        </a>
        
        <div style="font-family: sans-serif; text-align: center">
            Tap icon above to scan a piece of furniture
        </div>
    </div>    
    <script>
  


   //// var furnitureRedirectUrl = "pic2shop://scan?callback="+encodeURIComponent("salesforce1://furniture__c/view?furniture__cid=a0D58000004LIbK");


      var furnitureRedirectUrl = "com.salesforce.salesforce1://furniture__c/view?furniture__cid=a0D58000004LIbK";  
      var a = document.getElementById("link");  
      a.href = "pic2shop://scan?callback // EAN =" + encodeURIComponent(furnitureRedirectUrl);  
        
    </script>
 
</apex:page>



Thank you
Hello, I wanted to make sure that when I take a picture of a barcode, its going to appear on my Salesforce1 app. I am using pic2shop in order to achieve that.
I created a Visualforce Page with an icon which you can click on in order to use the scanner. 

User-added image

I want the barcode to remain in my Salesforce1 application after the picture (code) has been taken by the camera via pic2shop, which looks like that:
User-added image



The only problem is after the code has been scanned it simply returns to the previous page with the icon:

User-added image


For this function I created a button with a Visualforce Page, this is the code, I feel like it might be a navigating problem:

<apex:page standardController="Furniture__c">
     <div style="width: 30%">
        <a id="link" href="#" style="text-decoration: none">
            <img style="background: blue; display: block; margin: auto;" width="80%" src="/img/icon/t4v35/standard/product.svg"/>
            <br/>
        </a>
        
        <div style="font-family: sans-serif; text-align: center">
            Tap icon above to scan a piece of furniture
        </div>
    </div>    
    <script>
  


        var furnitureRedirectUrl = "com.salesforce.salesforce1://furniture__c/view?furniture__cid=a0D58000004LIbK";     //Ref to Application, Object/Record (Furniture__c/a0D58000004LIbK/edit)
        var a = document.getElementById("link");  
        a.href = "pic2shop://scan?callback=" + encodeURIComponent(furnitureRedirectUrl);         
           
    </script>



I would appreciate any kind of help or advice on this code, I tried several approaches,I even tried the Pro Version of pic2shop but I'm not getting anywhere.



Thank you in advance !
Hello, I wanted to make sure that when I take a picture of a barcode, its going to appear on a referenced field on my Salesforce1 app. I am using pic2shop in order to achieve that. So far I want the barcode to remain in my Salesforce1 application after the picture has been taken by the camera via pictoshop,

Barcode Scanner

The only problem is after the code has been scanned I simply return to this page

User-added image

This is the icon we click on before we can perform a scan. 


For this function I created a button with a Visualforce Page:

<apex:page standardController="Furniture__c">
     <div style="width: 30%">
        <a id="link" href="#" style="text-decoration: none">
            <img style="background: blue; display: block; margin: auto;" width="80%" src="/img/icon/t4v35/standard/product.svg"/>
            <br/>
        </a>
        
        <div style="font-family: sans-serif; text-align: center">
            Tap icon above to scan a piece of furniture
        </div>
    </div>    
    <script>
  


        var furnitureRedirectUrl = "com.salesforce.salesforce1://furniture__c/view?furniture__cid=a0D58000004LIbK";     //Ref to Application, Object/Record (Furniture__c/a0D58000004LIbK/edit)
        var a = document.getElementById("link");  
        a.href = "pic2shop://scan?callback=" + encodeURIComponent(furnitureRedirectUrl);         
           
    </script>



I would appreciate any kind of help, I tried several approaches, even tried the Pro Version of pic2shop but I'm not getting anywhere.



Thank you !
Hello, I wanted to make sure that when I take a picture of a barcode, its going to appear on a referenced field on my Salesforce1 app. I am using pic2shop in order to achieve that. So far I want the barcode to remain in my Salesforce1 application after the picture has been taken by the camera via pictoshop, for this I created a button with a Visualforce Page:

<apex:page standardController="Furniture__c">
     <div style="width: 30%">
        <a id="link" href="#" style="text-decoration: none">
            <img style="background: blue; display: block; margin: auto;" width="80%" src="/img/icon/t4v35/standard/product.svg"/>
            <br/>
        </a>
        
        <div style="font-family: sans-serif; text-align: center">
            Tap icon above to scan a piece of furniture
        </div>
    </div>    
    <script>
  


        var furnitureRedirectUrl = "salesforce1://Furniture__c/a0D58000004LIbK/view";     //Ref an Applikation bzw. Objekt/Record
        var a = document.getElementById("link");  
        a.href = 'pic2shop://scan?callback=' + encodeURIComponent(furnitureRedirectUrl);  
               
    </script>
</apex:page>

I used a sample record for thise code but I am not sure how to reference field in order for the code to appear in there. I would appriciate any advice/help.

Thanks in advance! :)
Hello,

I created a Visualforce Page for a button on my Salesforce1 app in order to navigate me to a record after a barcode has been identified by my camera. In saying so, I want the barcode to be referenced to a SF ID in order to compare if a barcode (record) like that already exists.

Everything has been set up and I started out like this for my Visualforce page, but I am not sure how to properly navigate to a record, I would appreciate any help and advice: 

<apex:page standardController="Furniture__c">
     <div style="width: 30%">
        <a id="link" href="#" style="text-decoration: none">
            <img style="background: blue; display: block; margin: auto;" width="80%" src="/img/icon/t4v35/standard/product.svg"/>
            <br/>
        </a>
        
        <div style="font-family: sans-serif; text-align: center">
            Tap icon above to scan a piece of furniture
        </div>
    </div>    
    <script>

        var furnitureRedirectUrl = "sforce.one.navigateToSObject(a0D58000004LFMm, detail)";
        var a = document.getElementById("link");
        a.href = 'pic2shop://scan?callback=' + encodeURIComponent(furnitureRedirectUrl);        
        
    </script>
 
</apex:page>

 
Hello,

I created a Visualforce Page for a button on my Salesforce1 app in order to navigate me to a record after a barcode has been identified by my camera. In saying so, I want the barcode to be referenced to a SF ID in order to compare if a barcode (record) like that already exists.

Everything has been set up and I started out like this for my Visualforce page, but I am not sure how to properly navigate to a record, I would appreciate any help and advice: 

<apex:page standardController="Furniture__c">
     <div style="width: 30%">
        <a id="link" href="#" style="text-decoration: none">
            <img style="background: blue; display: block; margin: auto;" width="80%" src="/img/icon/t4v35/standard/product.svg"/>
            <br/>
        </a>
        
        <div style="font-family: sans-serif; text-align: center">
            Tap icon above to scan a piece of furniture
        </div>
    </div>    
    <script>

        var furnitureRedirectUrl = "sforce.one.navigateToSObject(a0D58000004LFMm, detail)";
        var a = document.getElementById("link");
        a.href = 'pic2shop://scan?callback=' + encodeURIComponent(furnitureRedirectUrl);        
        
    </script>
 
</apex:page>

thanks in advance !
Whenever I'm trying saving this into my visualforce page it won't let me based on erros, even when I correct them it won't stop there. I'd appreciate any kind of help.

This is the we-to-lead form

<apex:page >
<form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">

<input type="hidden name"="oid" value="00D58000000bQkZ">
<input type="hidden name"="retURL" value="http://cognizant-interest.com/form">

<!--  ----------------------------------------------------------------------  -->
<!--  NOTE: These fields are optional debugging elements. Please uncomment    -->
<!--  these lines if you wish to test in debug mode.                          -->
<!--  <input type="hidden" name="debug" value=1>                              -->
<!--  <input type="hidden" name="debugEmail"                                  -->
<!--  value="yashar.sadeghi@cognizant.com">                                   -->
<!--  ----------------------------------------------------------------------  -->

<label for="first_name">First Name</label><input  id="first_name" maxlength="40" name="first_name" size="20" type="text" /><br>

<label for="last_name">Last Name</label><input  id="last_name" maxlength="80" name="last_name" size="20" type="text" /><br>

<label for="email">Email</label><input  id="email" maxlength="80" name="email" size="20" type="text" /><br>

<label for="phone">Phone</label><input  id="phone" maxlength="40" name="phone" size="20" type="text" /><br>

<input type="submit" name="submit">

</form>
</apex:page>

thanks
Whenever I'm trying saving this into my visualforce page it won't let me based on erros, even when I correct them it won't stop there. I'd appreciate any kind of help.

This is the we-to-lead form

<apex:page >
<form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">

<input type="hidden name"="oid" value="00D58000000bQkZ">
<input type="hidden name"="retURL" value="http://cognizant-interest.com/form">

<!--  ----------------------------------------------------------------------  -->
<!--  NOTE: These fields are optional debugging elements. Please uncomment    -->
<!--  these lines if you wish to test in debug mode.                          -->
<!--  <input type="hidden" name="debug" value=1>                              -->
<!--  <input type="hidden" name="debugEmail"                                  -->
<!--  value="yashar.sadeghi@cognizant.com">                                   -->
<!--  ----------------------------------------------------------------------  -->

<label for="first_name">First Name</label><input  id="first_name" maxlength="40" name="first_name" size="20" type="text" /><br>

<label for="last_name">Last Name</label><input  id="last_name" maxlength="80" name="last_name" size="20" type="text" /><br>

<label for="email">Email</label><input  id="email" maxlength="80" name="email" size="20" type="text" /><br>

<label for="phone">Phone</label><input  id="phone" maxlength="40" name="phone" size="20" type="text" /><br>

<input type="submit" name="submit">

</form>
</apex:page>

thanks