• mustapha L 1
  • NEWBIE
  • 70 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 12
    Replies
Hi all
title is not clear at all sorry for that.
i have a VF page renderas PDF.
i also have some static ressources (PDF documents)

i m looking to add the PDFwhich is static ressource into my VF (render as PDF) page ?

i have tried {! $resource.MyPDF} but this only display the URL of the PDF not the content.

Could you assist please?

Many thanks
Hi all,

looking for Apex syntax how to open a VisualForce page
ie :
 if (field==Case1)
{open visualForce1}
 if (field==Case2)
{open visualForce2}

Many thaks for your assistance.
Hi there !
I have created many layouts with VisualForce.
I have created a BUTTON which fired one of Layouts.

what i'm looking for is how to make kind of auto-select Layout.

idea is to create one customField where are listed some criteria and based on those criteria when we clic on Button automatically the most approproated page will be displayed.
I already have Layout, button, criteria...i just need assistance about how to fire one or another visual page 

exemple : we could image a custom Field named "language" and based on this field it will open the FR , UK...or SPANISH layout.

Many thanks for assistance you could provide.
Hi there !
I have created many layouts with VisualForce.
I have created a BUTTON which fired one of Layouts.

what i'm looking for is how to make kind of auto-select Layout.

idea is to create one customField where are listed some criteria and based on those criteria when we clic on Button automatically the most approproated page will be displayed.
I already have Layout, button, criteria...i just need assistance about how to fire one or another visual page 

Many thanks for assistance you could provide.
Hi All,

i'm totally new with API stuff, 
i had a look on guide (API REST, AJAX SOAP...etc) but i'm a bit lost.
i'm looking for a way to just "read" the SObject (REsult of Query) and inject result into our own Mysql databse for post process on our own Web App (PHP).

could you let me know the easiest way to to that please ?
notice that we just want to "copy" data, not do any changes on SF database.
and volume of data is really low.

Many thanks for all assistance you could provide.
Hi All,

how can we make Sections into PDF Quote ?
We do not want to mix services, Hardware and Software ... 
can we do that with the basic SF PDF Quote ?

​thnak you
Hi All,

how can we make Sections into PDF Quote ?
We do not want to mix services, Hardware and Software ... 
can we do that with the basic SF PDF Quote ?

thnak you
Hi All,
I did a Class/methods who seems to be working into Sand box.
I have started writting a test class, but i always have a fatal error :
FATAL_ERROR|System.QueryException: List has no rows for assignment to SObject
what cannot be true...

I explain myself.
My Trigger is supposed to fire after insert/update on Quotelineitem
So I have a created an Opportunity / Quote / quotelineItem on SAND box.

I have runned some SQL to extract the ID of the QuotelineItem.

into my test class i did a basic stuff as :

        // 3_Insert QLI SRV- professional Service (check costs calculation)
        QuoteLineItem testqli= new QuoteLineItem(Id='0QL250000000VXFGXX', Quantity=2);
        update testqli;


which fire the next :
 for (QuotelineItem qli :quoteLines)   {
            QuoteLineItem newqli = new QuoteLineItem();
                        //initializing the new List           
               newqli.Id=qli.Id;      
                       //Extract the Product informations
            String ProdId = qli.Product2Id;                              //system.debug shows that qli.product2Id is : "01t25000000V73gAXX"
Product2 prod = [SELECT Id, ProductCode, Provider__c, Purchase_Purchase_isP__c, Is_Maintenance__c, PurchaseP__c, Purchase_Price__c, Extra__c, CurrencyIsoCode FROM Product2 WHERE Id = :ProdId LIMIT 1];

which cause the Fatal Error as no row returned.

however in DEV console /SQL :

SELECT product2Id from quotelineItem where id ='0QL250000000VXFGXX'
result is : '01t25000000V73gAXX'                       //what is the expected result

SELECT Id, ProductCode, Provider__c, Purchase_Purchase_isP__c, Is_Maintenance__c, PurchaseP__c, Purchase_Price__c, Extra__c, CurrencyIsoCode FROM Product2 WHERE Id = 01t25000000V73gAXX LIMIT 1
result is the expected one (productCode : SRV-CTRK-D, Provider__s : Test, CurrencyIsoCode : GBP...etc)

Why developper console returns a Row, but TestClass doesn't ...for same SQL...no sense ???

could you help please ?
Many thanks

 
Hi,
I'm experiencing  this into SandBox...if i understand well, this is not an issue but an expecting behavior:

This is expected behavior. "Text/Image" fields on quote templates are not supported in developer and developer-pro sandboxes. They are only supported in Production and Full-copy sandboxes.

Ok, but how can i reset this ?
even with Admin right i cannot edit the Template to remove the "Text/Image" fields...

Many thanks for your assistance
Hi all,

Im looking on way to make code easier to write (and read).
for now if i have to work on Contract , based on an Opportunity, i have to extract data from Opportunity (ie: opp.ContractID)
and then run a SQL query to get the Contract object linked to this Opportunity.
then i'm able to edit editable Contract fields.

is there any other way as there is a relation chip between those 2 objects ?

hope all this make sense..
thanks

Many thanks
 
Hi there,

my project is the next i'm looking to AUTOmatically SYNC a quote (to its opportunity) as long as the status of the Quote is "Accepted"
i did Trigger for that which "in therorie" should answer to the need, but for unknown reason it seem that the fireld is "SyncedQuoteId " is readOnly:

trigger QuoteAutoSync on Quote (before update) {
    for (Quote q : Trigger.New) {
        //check if the Status of the quote is Accpted, if yes the quote is sync to opportunity
        if (q.Status == 'Accepted'){           
            Opportunity opp = new Opportunity();
            opp.id=q.OpportunityId;
            opp.SyncedQuoteId = q.Id;
            update opp;
        }
    }
}
is this something that we can change or it is a stuff fixed once for all by SalesForce ?

Thnaks
 
Hi All

i'm doing the following:


trigger AutoCreateMaint on QuoteLineItem (before insert) {
    for (QuoteLineItem quoteli : Trigger.new){
        Boolean IsMaintenance = False;
        //check if the product has Ismaintenance box Checked
        IsMaintenance = [OSQL request]
                if (isMaintenance)
                                         {Process}
}
}

I have a Problem with the FOR loop which is supposed to run ONCE but always run twice...of course the second time it runs the OSQL query fails and tigger fails !
i do not undesrtand reason why the LOOP run twice ?

to try to fix it, i have added a "break" but even like this the LOOP runs twice instead to exit

this is what i have each time it runs the second iteration:
"17:46:35:086 FATAL_ERROR System.QueryException: List has no rows for assignment to SObject"

could you assist please?

Many thanks
 
Hi all,

i did the following to add a QuoteLineItem into a specific QuoteID (in order to test syntax for Tirgger)
this was perfectly working...once !
the Line has been created exactly as i would, but since that, i have arror message not clear at all.

could you assit please?

QuoteLineItem qli = new QuoteLineItem();
   qli.QuoteId = '0Q0240000005p';
   qli.PricebookEntryId = '01u24000002Hzf';
   qli.Product2Id='01t24000002hY';
   qli.UnitPrice=30000.00;
   qli.Quantity = 5;
insert qli;

error :

Line: 7, Column: 1
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, EclipseMaintenance: execution of AfterInsert caused by: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, EclipseMaintenance: maximum trigger depth exceeded QuoteLineItem trigger event AfterInsert for [0QL240000006032] QuoteLineItem trigger event AfterInsert for [0QL240000006033] QuoteLineItem trigger event AfterInsert for [0QL240000006034] QuoteLineItem trigger event AfterInsert for [0QL240000006035] QuoteLineItem trigger event AfterInsert for [0QL240000006036] QuoteLineItem trigger event AfterInsert for [0QL240000006037] QuoteLineItem trigger event AfterInsert for [0QL240000006038] QuoteLineItem trigger event AfterInsert for [0QL240000006039] QuoteLineItem trigger event AfterInsert for [0QL24000000603A] QuoteLineItem trigger event AfterInsert for [0QL24000000603B] QuoteLineItem trigger event AfterInsert for [0QL24000000603C] QuoteLineItem trigger event AfterInsert for [0QL24000000603D] QuoteLineItem trigger event AfterInsert for [0QL24000000603E] QuoteLineItem trigger event AfterInsert for [0QL24000000603F] QuoteLineItem trigger event AfterInsert for [0QL24000000603G] QuoteLineItem trigger event AfterInsert for [0QL24000000603H]: [] Trigger.EclipseMaintenance: line 9, column 1: []
 
Hi all,

looking for Apex syntax how to open a VisualForce page
ie :
 if (field==Case1)
{open visualForce1}
 if (field==Case2)
{open visualForce2}

Many thaks for your assistance.
Hi All,

i'm totally new with API stuff, 
i had a look on guide (API REST, AJAX SOAP...etc) but i'm a bit lost.
i'm looking for a way to just "read" the SObject (REsult of Query) and inject result into our own Mysql databse for post process on our own Web App (PHP).

could you let me know the easiest way to to that please ?
notice that we just want to "copy" data, not do any changes on SF database.
and volume of data is really low.

Many thanks for all assistance you could provide.
Hi All,

how can we make Sections into PDF Quote ?
We do not want to mix services, Hardware and Software ... 
can we do that with the basic SF PDF Quote ?

​thnak you
Hi All,
I did a Class/methods who seems to be working into Sand box.
I have started writting a test class, but i always have a fatal error :
FATAL_ERROR|System.QueryException: List has no rows for assignment to SObject
what cannot be true...

I explain myself.
My Trigger is supposed to fire after insert/update on Quotelineitem
So I have a created an Opportunity / Quote / quotelineItem on SAND box.

I have runned some SQL to extract the ID of the QuotelineItem.

into my test class i did a basic stuff as :

        // 3_Insert QLI SRV- professional Service (check costs calculation)
        QuoteLineItem testqli= new QuoteLineItem(Id='0QL250000000VXFGXX', Quantity=2);
        update testqli;


which fire the next :
 for (QuotelineItem qli :quoteLines)   {
            QuoteLineItem newqli = new QuoteLineItem();
                        //initializing the new List           
               newqli.Id=qli.Id;      
                       //Extract the Product informations
            String ProdId = qli.Product2Id;                              //system.debug shows that qli.product2Id is : "01t25000000V73gAXX"
Product2 prod = [SELECT Id, ProductCode, Provider__c, Purchase_Purchase_isP__c, Is_Maintenance__c, PurchaseP__c, Purchase_Price__c, Extra__c, CurrencyIsoCode FROM Product2 WHERE Id = :ProdId LIMIT 1];

which cause the Fatal Error as no row returned.

however in DEV console /SQL :

SELECT product2Id from quotelineItem where id ='0QL250000000VXFGXX'
result is : '01t25000000V73gAXX'                       //what is the expected result

SELECT Id, ProductCode, Provider__c, Purchase_Purchase_isP__c, Is_Maintenance__c, PurchaseP__c, Purchase_Price__c, Extra__c, CurrencyIsoCode FROM Product2 WHERE Id = 01t25000000V73gAXX LIMIT 1
result is the expected one (productCode : SRV-CTRK-D, Provider__s : Test, CurrencyIsoCode : GBP...etc)

Why developper console returns a Row, but TestClass doesn't ...for same SQL...no sense ???

could you help please ?
Many thanks

 
Hi all,

Im looking on way to make code easier to write (and read).
for now if i have to work on Contract , based on an Opportunity, i have to extract data from Opportunity (ie: opp.ContractID)
and then run a SQL query to get the Contract object linked to this Opportunity.
then i'm able to edit editable Contract fields.

is there any other way as there is a relation chip between those 2 objects ?

hope all this make sense..
thanks

Many thanks
 
Hi there,

my project is the next i'm looking to AUTOmatically SYNC a quote (to its opportunity) as long as the status of the Quote is "Accepted"
i did Trigger for that which "in therorie" should answer to the need, but for unknown reason it seem that the fireld is "SyncedQuoteId " is readOnly:

trigger QuoteAutoSync on Quote (before update) {
    for (Quote q : Trigger.New) {
        //check if the Status of the quote is Accpted, if yes the quote is sync to opportunity
        if (q.Status == 'Accepted'){           
            Opportunity opp = new Opportunity();
            opp.id=q.OpportunityId;
            opp.SyncedQuoteId = q.Id;
            update opp;
        }
    }
}
is this something that we can change or it is a stuff fixed once for all by SalesForce ?

Thnaks
 
Hi All

i'm doing the following:


trigger AutoCreateMaint on QuoteLineItem (before insert) {
    for (QuoteLineItem quoteli : Trigger.new){
        Boolean IsMaintenance = False;
        //check if the product has Ismaintenance box Checked
        IsMaintenance = [OSQL request]
                if (isMaintenance)
                                         {Process}
}
}

I have a Problem with the FOR loop which is supposed to run ONCE but always run twice...of course the second time it runs the OSQL query fails and tigger fails !
i do not undesrtand reason why the LOOP run twice ?

to try to fix it, i have added a "break" but even like this the LOOP runs twice instead to exit

this is what i have each time it runs the second iteration:
"17:46:35:086 FATAL_ERROR System.QueryException: List has no rows for assignment to SObject"

could you assist please?

Many thanks
 
Hi all,

i did the following to add a QuoteLineItem into a specific QuoteID (in order to test syntax for Tirgger)
this was perfectly working...once !
the Line has been created exactly as i would, but since that, i have arror message not clear at all.

could you assit please?

QuoteLineItem qli = new QuoteLineItem();
   qli.QuoteId = '0Q0240000005p';
   qli.PricebookEntryId = '01u24000002Hzf';
   qli.Product2Id='01t24000002hY';
   qli.UnitPrice=30000.00;
   qli.Quantity = 5;
insert qli;

error :

Line: 7, Column: 1
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, EclipseMaintenance: execution of AfterInsert caused by: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, EclipseMaintenance: maximum trigger depth exceeded QuoteLineItem trigger event AfterInsert for [0QL240000006032] QuoteLineItem trigger event AfterInsert for [0QL240000006033] QuoteLineItem trigger event AfterInsert for [0QL240000006034] QuoteLineItem trigger event AfterInsert for [0QL240000006035] QuoteLineItem trigger event AfterInsert for [0QL240000006036] QuoteLineItem trigger event AfterInsert for [0QL240000006037] QuoteLineItem trigger event AfterInsert for [0QL240000006038] QuoteLineItem trigger event AfterInsert for [0QL240000006039] QuoteLineItem trigger event AfterInsert for [0QL24000000603A] QuoteLineItem trigger event AfterInsert for [0QL24000000603B] QuoteLineItem trigger event AfterInsert for [0QL24000000603C] QuoteLineItem trigger event AfterInsert for [0QL24000000603D] QuoteLineItem trigger event AfterInsert for [0QL24000000603E] QuoteLineItem trigger event AfterInsert for [0QL24000000603F] QuoteLineItem trigger event AfterInsert for [0QL24000000603G] QuoteLineItem trigger event AfterInsert for [0QL24000000603H]: [] Trigger.EclipseMaintenance: line 9, column 1: []
 

Hello,

 

Being a business that provides services, I need a third stage of the Salesforce process for when we have won the contract a the end of the Opportunity phase.  This will be for the period where we have won a contract for some business, and it would be great to have Salesforce workflow etc to ensure that we provide what we promised to provide to our customers.

 

It appears to me that Contracts would be the perfect tool, however there is apparently no way of transferring information such as quotations, sales notes, company names or contacts directly from a Salesforce Opportunity into a Salesforce Contract.

 

The people at Salesforce say this ought to be possible with some fairly simple Apex code, but I don't know where to start.  

 

This was clearly an issue back in 2010 - see http://boards.developerforce.com/t5/General-Development/New-to-Sales-force-Convert-Opportunity-to-Contract/td-p/163183 .Annoyingly, the link to the supposed "answer" no longer works.

 

Please help!

 

Best regards,

 

Alex.