-
ChatterFeed
-
1Best Answers
-
3Likes Received
-
0Likes Given
-
7Questions
-
43Replies
Lightning: How can I create Report and DashBoard Folders? How to schedule Reports?
Does anyone knows how to do that?
-
- brunol11
- February 21, 2016
- Like
- 0
- Continue reading or reply
CNPJ Validation Rules - Regras de Validação de CNPJ
IF( LEN(CPF_ou_CNPJ__c)= 14 , OR(AND(MOD((
( VALUE( MID( CPF_ou_CNPJ__c , 1, 1 ) ) * 6 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 2, 1 ) ) * 5 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 3, 1 ) ) * 4 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 4, 1 ) ) * 3 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 5, 1 ) ) * 2 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 6, 1 ) ) * 9 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 7, 1 ) ) * 8 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 8, 1 ) ) * 7 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 9, 1 ) ) * 6 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 10, 1 ) ) * 5 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 11, 1 ) ) * 4 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 12, 1 ) ) * 3 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 13, 1 ) ) * 2 )
), 11
) <= 1
, VALUE( MID( CPF_ou_CNPJ__c , 14, 1 ) ) != 0
)
, AND(MOD((
( VALUE( MID( CPF_ou_CNPJ__c , 1, 1 ) ) * 6 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 2, 1 ) ) * 5 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 3, 1 ) ) * 4 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 4, 1 ) ) * 3 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 5, 1 ) ) * 2 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 6, 1 ) ) * 9 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 7, 1 ) ) * 8 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 8, 1 ) ) * 7 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 9, 1 ) ) * 6 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 10, 1 ) ) * 5 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 11, 1 ) ) * 4 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 12, 1 ) ) * 3 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 13, 1 ) ) * 2 ))
, 11 ) > 1
, ( 11 - MOD((
( VALUE( MID( CPF_ou_CNPJ__c , 1, 1 ) ) * 6 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 2, 1 ) ) * 5 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 3, 1 ) ) * 4 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 4, 1 ) ) * 3 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 5, 1 ) ) * 2 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 6, 1 ) ) * 9 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 7, 1 ) ) * 8 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 8, 1 ) ) * 7 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 9, 1 ) ) * 6 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 10, 1 ) ) * 5 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 11, 1 ) ) * 4 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 12, 1 ) ) * 3 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 13, 1 ) ) * 2 )
)
, 11
) ) != VALUE( MID( CPF_ou_CNPJ__c , 14, 1 ))
)), false)
-
- brunol11
- August 03, 2015
- Like
- 3
- Continue reading or reply
"Interleaved 2 of 5" Barcode
Does anyone Know how to work with "Interleaved 2 of 5" Barcode font inside Salesforce?
Brazilian Banks works with this Bar Code and I´d like to know if someone did generate the bar code inside salesforce.
I did a VisualForce page and tagged the billing barcode number with <Font face="Interleaved2of5-Thin-Regular"> but i realized I can´t pass the barcode number directly into the font. It has to be changed in other char sequel and that´s what I don´t figure: How to build this char sequel and what characters do I have to use?
Any ideas?
Thx a lot in advance
-
- brunol11
- August 24, 2011
- Like
- 0
- Continue reading or reply
How to Pass a Value from a VF page to Iframe in other VF Page
Hi everybody!
I wrote 2 Visual Force Pages:
- The first one ("Autenticar_Cod") is a simple page wich refers to a custom object named "Faturamento__c" and shows the value of a field named "Autentica_Fatura__c" followed by the current date.
- The second one has a <apex:repeat> tag and, after select the records in a related tab, should open a page with <apex:Iframe> and show the content of the first page.
The issue is: I can´t pass "Autentica_Fatura__c" field value to the second page. The frames appears only with the current date and nothing else.
Is it possible to be done? How?
Here follows the 2 page code:
VF Page: Autenticar_Cod
<apex:page standardController="Faturamento__c" name="AuthCode" recordSetVar="MyFat" showHeader="False" sidebar="False" renderAs="html" > <apex:form title="Clique no código para autenticar" onclick="window.print()"> <html> <head> </head> <body> <apex:outputText >{!Faturamento__c.Autentica_Fatura__c}</apex:outputText> <apex:outputText value="{0,date,yyMMdd}"> <apex:param value="{!NOW()}" /> </apex:outputText> </body> </html> </apex:form></apex:page>
VF Page: Autenticar_Frame
<apex:page standardController="Faturamento__c" recordSetVar="MyFaturas" showHeader="False" sidebar="False" renderAs="html" > <apex:repeat value="{!selected}" var="Boleto" id="Repetidor" > <apex:form title="Clique no código para autenticar" onclick="window.history.go(-1)"> <html> <head> <script type="text/javascript"> function goBack() { window.history.go(-1) } </script> </head> <body> <apex:iframe frameborder="true" height="30" width="40%" src="Autenticar_Cod" scrolling="true" id="theIframe"> </apex:iframe> </body> </html> </apex:form> </apex:repeat> <input type="button" value="Retornar" onclick="goBack()" /> </apex:page>
Thanks in advance for any ideas!
-
- brunol11
- August 08, 2011
- Like
- 0
- Continue reading or reply
Trigger Duplicates Records when running for the first time
I Have 2 objects called "Contratacao__c" and "Faturamento__c".
When a field in Contratacao__c named "Status do Contrato" has the value "Emitir Boletos", the TRIGGER below generates 12 registers on "Faturamento__c".
But when the trigger runs for the first time after an user selected the value "Emitir Boletos" in "Contratacao__c", it generates 24 instead of 12. As far as I can see, the 12 extra registers are the original 12 registers duplicated.
If I Delete the 24 registers and select the field value again, the Trigger generates 12 "Faturamento__c" as I want to.
It happens only at first time the value is selected.
What could be happennig with this trugger?
How can I solve this?
Here´s the Code:
trigger CreateBilling on Contratacao__c (after update, after insert) {
for (Contratacao__c contract : Trigger.new) {
string dia_venc = contract.Vencimento__c;
integer boleto = 0;
date hoje = date.today();
string mes_venc = String.valueOf(hoje.month());
string ano_venc = String.valueOf(hoje.year());
string format_data = dia_venc + '/' + mes_venc + '/'+ ano_venc;
date data_venc = date.parse(format_data);
while (boleto < 12) {
boleto ++;
data_venc = data_venc.addMonths(1);
Contratacao__c[] Contratos = Trigger.new;
if (Contratos[0].Status_do_Contrato__c == 'Emitir Boletos')
{
Faturamento__c Billing = new Faturamento__c (
Contrato__c = Contratos[0].id,
F__c = Contratos[0].Total_do_Contrato__c,
V__c = data_venc );
insert Billing;
}
}
}
}
-
- brunol11
- July 18, 2011
- Like
- 0
- Continue reading or reply
Trigger error: execution of AfterUpdate caused by: System.StringException: Invalid id: 0001282:
Hi!
I Wonder if anyone could help me on this.
I Have a custom object named "Contratacao__c" and when the field "Status_do_Contrato__c" is filled with the value 'Emitir Boletos' it was suposed to create a new record on the related custom object "Faturamento__c".
But after insert or update a "Contratacao__c" record, the trigger below returns the following error:
Erro:O acionador CreateBilling do Apex causou uma exceção inesperada. Entre em contato com o administrador: CreateBilling: execution of AfterUpdate caused by: System.StringException: Invalid id: 0001282: Trigger.CreateBilling: line 8, column 36
Which means that the "Faturamento__c.Contrato__c" field related to the "Contratacao__c.name" is not filled with the right value.
In the above example, I have a record in "Contratacao__c" registered as "0001282" and the related record "Faturamento__c" should have a field "Faturamento__c.Contrato__c" filled with the same "0001282"
Faturamento__c.Contrato__C: Relationship field (Master and Detail)
Contratacao__c.name = automatica numbered
What am I doing wrong? How to Fix it?
Here´s the code:
trigger CreateBilling on Contratacao__c (after update, after insert) { Contratacao__c[] Contratos = Trigger.new; if (Contratos[0].Status_do_Contrato__c == 'Emitir Boletos') { Faturamento__c Billing = new Faturamento__c ( Contrato__c = Contratos[0].name, F__c = Contratos[0].Total_do_Contrato__c, V__c = Contratos[0].Nascimento__c); insert Billing; } } |
-
- brunol11
- June 26, 2011
- Like
- 0
- Continue reading or reply
apex:repeat - How to Count and Sum the Items and display it outside the apex:repeat
I Have an unsolved matter and can´t find solution anywhere.
My application has a custom object called "Contratacao__c".
I must generate a list from this object and I´m using the <apex:repeat> as follows.
The list contains a HEADER to display pre-formated information, then the <apex:repeat> form wich generates the list and a TRAILLER where i need to insert the count of itens wich are generated by the list and the sum of a field named "Escelsa_Valor_Nominal_do_Contrato__c".
I Navigated thru the board and the only solution found was to insert the "sum" inside the <apex:repeat></apex:repeat>
Is there a solution for this case?
Help!
The code:
-
- brunol11
- June 14, 2011
- Like
- 0
- Continue reading or reply
CNPJ Validation Rules - Regras de Validação de CNPJ
IF( LEN(CPF_ou_CNPJ__c)= 14 , OR(AND(MOD((
( VALUE( MID( CPF_ou_CNPJ__c , 1, 1 ) ) * 6 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 2, 1 ) ) * 5 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 3, 1 ) ) * 4 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 4, 1 ) ) * 3 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 5, 1 ) ) * 2 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 6, 1 ) ) * 9 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 7, 1 ) ) * 8 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 8, 1 ) ) * 7 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 9, 1 ) ) * 6 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 10, 1 ) ) * 5 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 11, 1 ) ) * 4 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 12, 1 ) ) * 3 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 13, 1 ) ) * 2 )
), 11
) <= 1
, VALUE( MID( CPF_ou_CNPJ__c , 14, 1 ) ) != 0
)
, AND(MOD((
( VALUE( MID( CPF_ou_CNPJ__c , 1, 1 ) ) * 6 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 2, 1 ) ) * 5 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 3, 1 ) ) * 4 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 4, 1 ) ) * 3 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 5, 1 ) ) * 2 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 6, 1 ) ) * 9 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 7, 1 ) ) * 8 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 8, 1 ) ) * 7 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 9, 1 ) ) * 6 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 10, 1 ) ) * 5 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 11, 1 ) ) * 4 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 12, 1 ) ) * 3 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 13, 1 ) ) * 2 ))
, 11 ) > 1
, ( 11 - MOD((
( VALUE( MID( CPF_ou_CNPJ__c , 1, 1 ) ) * 6 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 2, 1 ) ) * 5 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 3, 1 ) ) * 4 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 4, 1 ) ) * 3 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 5, 1 ) ) * 2 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 6, 1 ) ) * 9 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 7, 1 ) ) * 8 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 8, 1 ) ) * 7 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 9, 1 ) ) * 6 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 10, 1 ) ) * 5 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 11, 1 ) ) * 4 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 12, 1 ) ) * 3 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 13, 1 ) ) * 2 )
)
, 11
) ) != VALUE( MID( CPF_ou_CNPJ__c , 14, 1 ))
)), false)
-
- brunol11
- August 03, 2015
- Like
- 3
- Continue reading or reply
Invalid api version:0.0
- ranveer singh 8
- July 18, 2016
- Like
- 0
- Continue reading or reply
Lightning: How can I create Report and DashBoard Folders? How to schedule Reports?
Does anyone knows how to do that?
- brunol11
- February 21, 2016
- Like
- 0
- Continue reading or reply
CNPJ Validation Rules - Regras de Validação de CNPJ
IF( LEN(CPF_ou_CNPJ__c)= 14 , OR(AND(MOD((
( VALUE( MID( CPF_ou_CNPJ__c , 1, 1 ) ) * 6 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 2, 1 ) ) * 5 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 3, 1 ) ) * 4 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 4, 1 ) ) * 3 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 5, 1 ) ) * 2 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 6, 1 ) ) * 9 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 7, 1 ) ) * 8 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 8, 1 ) ) * 7 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 9, 1 ) ) * 6 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 10, 1 ) ) * 5 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 11, 1 ) ) * 4 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 12, 1 ) ) * 3 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 13, 1 ) ) * 2 )
), 11
) <= 1
, VALUE( MID( CPF_ou_CNPJ__c , 14, 1 ) ) != 0
)
, AND(MOD((
( VALUE( MID( CPF_ou_CNPJ__c , 1, 1 ) ) * 6 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 2, 1 ) ) * 5 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 3, 1 ) ) * 4 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 4, 1 ) ) * 3 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 5, 1 ) ) * 2 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 6, 1 ) ) * 9 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 7, 1 ) ) * 8 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 8, 1 ) ) * 7 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 9, 1 ) ) * 6 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 10, 1 ) ) * 5 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 11, 1 ) ) * 4 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 12, 1 ) ) * 3 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 13, 1 ) ) * 2 ))
, 11 ) > 1
, ( 11 - MOD((
( VALUE( MID( CPF_ou_CNPJ__c , 1, 1 ) ) * 6 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 2, 1 ) ) * 5 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 3, 1 ) ) * 4 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 4, 1 ) ) * 3 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 5, 1 ) ) * 2 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 6, 1 ) ) * 9 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 7, 1 ) ) * 8 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 8, 1 ) ) * 7 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 9, 1 ) ) * 6 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 10, 1 ) ) * 5 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 11, 1 ) ) * 4 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 12, 1 ) ) * 3 ) +
( VALUE( MID( CPF_ou_CNPJ__c , 13, 1 ) ) * 2 )
)
, 11
) ) != VALUE( MID( CPF_ou_CNPJ__c , 14, 1 ))
)), false)
- brunol11
- August 03, 2015
- Like
- 3
- Continue reading or reply
"Interleaved 2 of 5" Barcode
Does anyone Know how to work with "Interleaved 2 of 5" Barcode font inside Salesforce?
Brazilian Banks works with this Bar Code and I´d like to know if someone did generate the bar code inside salesforce.
I did a VisualForce page and tagged the billing barcode number with <Font face="Interleaved2of5-Thin-Regular"> but i realized I can´t pass the barcode number directly into the font. It has to be changed in other char sequel and that´s what I don´t figure: How to build this char sequel and what characters do I have to use?
Any ideas?
Thx a lot in advance
- brunol11
- August 24, 2011
- Like
- 0
- Continue reading or reply
How to Pass a Value from a VF page to Iframe in other VF Page
Hi everybody!
I wrote 2 Visual Force Pages:
- The first one ("Autenticar_Cod") is a simple page wich refers to a custom object named "Faturamento__c" and shows the value of a field named "Autentica_Fatura__c" followed by the current date.
- The second one has a <apex:repeat> tag and, after select the records in a related tab, should open a page with <apex:Iframe> and show the content of the first page.
The issue is: I can´t pass "Autentica_Fatura__c" field value to the second page. The frames appears only with the current date and nothing else.
Is it possible to be done? How?
Here follows the 2 page code:
VF Page: Autenticar_Cod
<apex:page standardController="Faturamento__c" name="AuthCode" recordSetVar="MyFat" showHeader="False" sidebar="False" renderAs="html" > <apex:form title="Clique no código para autenticar" onclick="window.print()"> <html> <head> </head> <body> <apex:outputText >{!Faturamento__c.Autentica_Fatura__c}</apex:outputText> <apex:outputText value="{0,date,yyMMdd}"> <apex:param value="{!NOW()}" /> </apex:outputText> </body> </html> </apex:form></apex:page>
VF Page: Autenticar_Frame
<apex:page standardController="Faturamento__c" recordSetVar="MyFaturas" showHeader="False" sidebar="False" renderAs="html" > <apex:repeat value="{!selected}" var="Boleto" id="Repetidor" > <apex:form title="Clique no código para autenticar" onclick="window.history.go(-1)"> <html> <head> <script type="text/javascript"> function goBack() { window.history.go(-1) } </script> </head> <body> <apex:iframe frameborder="true" height="30" width="40%" src="Autenticar_Cod" scrolling="true" id="theIframe"> </apex:iframe> </body> </html> </apex:form> </apex:repeat> <input type="button" value="Retornar" onclick="goBack()" /> </apex:page>
Thanks in advance for any ideas!
- brunol11
- August 08, 2011
- Like
- 0
- Continue reading or reply
Urgent : Recursively calling the same page
Hi All,
This is praveen, I am a salesforce user, i have written some part of visualforce code shown below,
<apex:page standardController="Account">
<apex:form >
<script>
if("{!$Profile.Name}".substr(0,3)=="GFO")
{
alert("New GFO accounts can only be created through lead conversion. If you need assistance creating a new account, please contact SFDCacctrequests@progress.com");
window.location="https://tapp0.salesforce.com/001/o";
}
else
{
window.location="https://tapp0.salesforce.com/setup/ui/recordtypeselect.jsp?ent=Account&retURL=%2F001%2Fo&save_new_url=%2F001%2Fe%3FretURL%3D%252F001%252Fo";
}
</script>
</apex:form>
</apex:page>
Now the issue what i am getting is ,this visualforce page is refreshing everytime when some users runs it other than GFO. If GFO users runs this it needs to show an alert with the above mentioned message...
I need an urgent solution for this issue...
if any one knows please send reply...
- praveenkumar
- August 04, 2011
- Like
- 0
- Continue reading or reply
Trigger Duplicates Records when running for the first time
I Have 2 objects called "Contratacao__c" and "Faturamento__c".
When a field in Contratacao__c named "Status do Contrato" has the value "Emitir Boletos", the TRIGGER below generates 12 registers on "Faturamento__c".
But when the trigger runs for the first time after an user selected the value "Emitir Boletos" in "Contratacao__c", it generates 24 instead of 12. As far as I can see, the 12 extra registers are the original 12 registers duplicated.
If I Delete the 24 registers and select the field value again, the Trigger generates 12 "Faturamento__c" as I want to.
It happens only at first time the value is selected.
What could be happennig with this trugger?
How can I solve this?
Here´s the Code:
trigger CreateBilling on Contratacao__c (after update, after insert) {
for (Contratacao__c contract : Trigger.new) {
string dia_venc = contract.Vencimento__c;
integer boleto = 0;
date hoje = date.today();
string mes_venc = String.valueOf(hoje.month());
string ano_venc = String.valueOf(hoje.year());
string format_data = dia_venc + '/' + mes_venc + '/'+ ano_venc;
date data_venc = date.parse(format_data);
while (boleto < 12) {
boleto ++;
data_venc = data_venc.addMonths(1);
Contratacao__c[] Contratos = Trigger.new;
if (Contratos[0].Status_do_Contrato__c == 'Emitir Boletos')
{
Faturamento__c Billing = new Faturamento__c (
Contrato__c = Contratos[0].id,
F__c = Contratos[0].Total_do_Contrato__c,
V__c = data_venc );
insert Billing;
}
}
}
}
- brunol11
- July 18, 2011
- Like
- 0
- Continue reading or reply
Dashboard to PDF
Hi All,
I have a similar req http://success.salesforce.com/ideaview?id=08730000000BrLkAAK.Any help is greatly appreciated.
Thanks.
- sfdc.dev.ax856
- July 11, 2011
- Like
- 1
- Continue reading or reply
New formula
Hello,
i am a newbie with SF and i am in desperate need to create a custom numeric field with inside a formula with the following validation rule:
1)take the first 9 number provided and multiply these numbers repectly with:6, 5, 7, 2, 3, 4, 5, 6, 7
for example if the 9 numbers are: 1,2,3,4,5,6,7,8,9 it is: (1*6) + (2*5) + (3*7) and so on....
2)Sum of the multiplications
3)Check of the last number provided (the 10th number) with the following: check digit = sum of the multiplications - (218/11) * 11
Thanks a lot very much.
- Larz78
- May 06, 2010
- Like
- 0
- Continue reading or reply
Callout from triggers are currently not supported.
![]() |
We are currently facing an issue regarding SMS
integration.
We
need to send the SMS automatically when a case is saved/edited. For
this we have
an apex class
which consists of HTTPS callouts to
access the SMS gateway of Value first
and a trigger which
invokes this apex class when ever a case is saved/edited.
Now, when ever the trigger is fired i'm getting this
exception "System.CalloutException: Callout from triggers are currently
not supported"
I think it can be possible by S-Control but
the process should automatic.
And this is very urgent for our project Pls suggest any solution /workaround for the same. Any help is appreciable.
Thanks
Jagan. |
- jagan
- January 28, 2009
- Like
- 0
- Continue reading or reply
How can I create an XML page?
<apex:page standardController="Account" renderAs="pdf"> |
<apex:page standardController="Account" renderAs="xml"> |
- Franco
- July 08, 2008
- Like
- 0
- Continue reading or reply